forked from getodk/collect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Visible groups in jump screen (getodk#2764)
* De-duplicate idential groupIsFieldList functions * Add getAppearanceAttr for form index * Add braces to big switch statement to prevent var collisions * Display groups that have 'nested' appearance attribute Doesn't handle taps yet. * Show children of displayable groups in their own screen * Change key from 'nested' to 'visible'; make static * Fix stepping logic now that groups can be visible Now a 'screen event' entails either a repeat or a visible group. * Update appearance to hierarchy-visible * Fix updated HierarchyElement type VISIBLE_GROUP * Fix a few PMD rule violations * Check for label instead of visibility attribute * Remove redundant forceStepOverGroup method * Don't skip over the next group when rendering hierarchy Fix for when two visible groups are in a row. Would previously miss the second one. * Add 'folder' icon to visible groups * Use better Material Design padding on hierarchy icons * PR fix: Rename isGroupLabeled * Rename repeatGroupRef => visibleGroupRef And move some comments around for clarity. * Save visible groups to visibleGroupRef, not just repeats * Reverse conditional to make logic more readable * Stop stringifying refs, just use TreeReference * Use stricter equals() to check repeat group membership Just to be safe; this doesn't change anything for most forms. * Don't render other visible groups' instances * Prevent a redundant middle screen (common on some forms) * Remove redundant getLabel method shortText falls back to longText automatically. * Use shortText to determine group label Now labels with a `ref` will also be detected (previously only explicit XML inner text for labels was supported). * Simplify logic for skipping past the group Instead of going back to allow it to go forward, simply `continue` the loop early. This fixes a bug in some forms where the last item in a group is displayed outside of the group. * Rename isGroupLabeled => isPresentationGroup for clarity Matches language in the docs * Allow empty string for group name Otherwise the hierarchy would be inconsistent depending on text value. * Also check isLogicalGroup before making a group visible This works, but it's gross. We should make JavaRosa support this explicitly.
- Loading branch information
1 parent
1da225d
commit ec8f5cc
Showing
6 changed files
with
183 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.