-
Notifications
You must be signed in to change notification settings - Fork 8
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 groups #1511
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1511 +/- ##
============================================
- Coverage 69.93% 69.90% -0.03%
- Complexity 1958 1959 +1
============================================
Files 250 250
Lines 7649 7656 +7
Branches 692 692
============================================
+ Hits 5349 5352 +3
- Misses 2037 2043 +6
+ Partials 263 261 -2 ☔ View full report in Codecov by Sentry. |
…ts contain correct groupKey
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.
Reviewed with Robert, looks good overall
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.
Couple Minor comments.
In Addition, we should update the libs/commcare
to point to the head of FP branch in this PR before you merge it (after merging the corresponding core PR) so that we don't overwrite any changes that got to libs/commcare
after you update the submodule. The practice I usually follow here is to not update the submodule at all in the formplayer PR until I am about to merge it. When the Prs are ready to be merged I do the following sequence of events -
- Merge
commcare-core
PR intoformplayer
branch - Update submodule in
Formplayer
PR to point to head offormplayer
branch incommcare-core
- Wait for tests to pass in formplayer PR and merge if the build passes.
src/main/java/org/commcare/formplayer/beans/menus/DisplayElement.java
Outdated
Show resolved
Hide resolved
OrderedHashtable<String, QueryGroup> queryGroupMap = queryScreen.getGroupHeaders(); | ||
groupHeader = new OrderedHashtable<>(); | ||
for (Map.Entry<String, QueryGroup> entry : queryGroupMap.entrySet()) { | ||
String key = entry.getKey(); | ||
QueryGroup queryGroupItem = entry.getValue(); | ||
String text = queryGroupItem.getDisplay().getText().evaluate(ec); | ||
groupHeader.put(key, text); | ||
} |
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.
would be nice to contain this logic in a query screen method itself like queryScreen.evalGroupHeaders()
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.
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.
queryResponseBean
is supposed to me more of a response model wrapper class over screen
classes with screen
classes being the classes that contain any evaluation logic. We don't follow it strictly but that's the idea atleast in theory.
src/main/java/org/commcare/formplayer/beans/menus/DisplayElement.java
Outdated
Show resolved
Hide resolved
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.
Approved (but core submodule need to be updated before merge)
Product Description
This change affects
queryResponse
. It addsgroupKey
todisplay
elements andgroupHeaders
dictionary toqueryResponse
. ThegroupKey
of each display element corresponds to a key ingroupHeaders
.Technical Summary
Tech Spec
Jira Ticket
Research Doc
Commcare-core PR: dimagi/commcare-core#1389
HQ PR: dimagi/commcare-hq#33828
Safety Assurance
Safety story
locally tested.
This does not alter existing response values but only adds new key:values.
Automated test coverage
Will add tests
QA Plan
Will QA
Special deploy instructions
Needs to be merged with/after dimagi/commcare-core#1389
Rollback instructions
Review