-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jt/visually segmented case search group #1389
Conversation
Can we populate PR description to facilitiate review here. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kudos for a well structured PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense overall, not sure I feel personally confident enough to approve.
@Override | ||
public QueryGroup parse() throws InvalidStructureException, IOException, XmlPullParserException, | ||
UnfullfilledRequirementsException { | ||
checkNode("group"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use NAME_PROMPT
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes 2b4ba65
while (nextTagInBlock(NAME_PROMPT)) { | ||
if (NAME_DISPLAY.equalsIgnoreCase(parser.getName())) { | ||
display = parseDisplayBlock(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what this block is doing? It seems like display
may get set multiple times here, not sure to what end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suite would look like this for a group
block. nextTagInblock
iterates through the elements within group
(it automatically iterates to the next element within the block without needing to increment anything in the body of the while
loop). The first would be display
and that whole display
block will be parsed via parseDisplayBlock
. The parsed values will then be used to created an instance of QueryGroup
so that instance can be used to pull values as needed.
<group key="group_header_0">
<display>
<text>
<locale id="search_property.m0.group_header_0"/>
</text>
</display>
</group>
You're right that if there were multiple display
blocks in the group
element, only the last display
block will be saved. But there should be only one
…queryPrompts so utillizes order of queryPrompts
Product Description
Parses the
group
block and populates a newqueryGroup
model. Also parses agroup_key
fromprompt
block and stores that inqueryPrompt
model. Both are added to theRemoteQueryDatum
.Technical Summary
Tech Spec
Jira Ticket
Research Doc
Formplayer PR: dimagi/formplayer#1511
HQ PR: dimagi/commcare-hq#33828
Safety Assurance
Safety story
Locally tested.
In parsing suite, the new
group
block andgroup-key
forprompt
block are optional so will not affect existing applications where these blocks do not exist.groupKey
inqueryPrompt
model is nullable.groupPrompts
passed toremoteQueryDatum
is instantiated as empty OrderedHashtable.Automated test coverage
Will add tests
QA Plan
Will QA
Special deploy instructions
Rollback instructions
Review
Duplicate PR
Automatically duplicate this PR as defined in contributing.md.