-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Split Screen Case Search Title and Subtitle Display #33359
Conversation
…oth initial search and results case list header
Is “Label for Searching” used anywhere on UI for split case search with this change ? If not, should we hide it on HQ UI when SSCS is enabled. |
@shubham1g5 Yes it is, it's still used as the text for the "search" button if it's not a "search first" workflow |
@@ -114,7 +114,8 @@ hqDefine("cloudcare/js/formplayer/menus/controller", function () { | |||
var menuData = menusUtils.getMenuData(menuResponse); | |||
menuData["triggerEmptyCaseList"] = true; | |||
menuData["sidebarEnabled"] = true; | |||
menuData["title"] = menuResponse.resultsTitle; |
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 main change in the original PR was to add results-title
field to suite file and then use it from menuResponse
. Since we are no longer using it can we remove results-title
from suite file now ?
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 we can. I was thinking of handling the reversions in a separate PR just make this simpler and get it out for this deploy, but it makes sense to just do it now for the HQ and formplayer side too. eb7f65f
Just double checking, any built suites will still have the results-title
, but what you found previously was that formplayer will just skip any unknown nodes (since it's just an elseif) so it'll be fine.
return { | ||
startPage: paginateItems.startPage, | ||
title: this.options.title, | ||
title: title.trim(), | ||
description: description === undefined ? "" : DOMPurify.sanitize(markdown.render(description.trim())), |
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.
curious why we are only doing markdown.render()
for description
and not title
?
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.
When description
was added, it seems to explicitly support markdown (based on the help text). It doesn't seem to be called out for titles, and in the html template, it uses the raw output of title (via <%- %>), so the markdown wouldn't display correctly. I could change that, but just keeping as is to preserve current behavior.
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.
thanks! Looks good to me.
Product Description
Two changes for Split Screen Case Search:
Technical Summary
Jira Ticket: https://dimagi-dev.atlassian.net/browse/USH-3539
Related to #33261
Formplayer PR: dimagi/commcare-core#1320
Split Screen case search has two view states:
query
typemenuResponse
)entity
typemenuResponse
)In 1, the description is pulled from
this.options.description
and in 2, the description is pulled fromthis.options.collection.queryResponse.description
Reasoning for why "title" configuration was switched to using "Search Screen Title":
In app configuration, there is both “Label for Searching” and “Search Screen Title” where:
With SSCS, both the search screen and results screen are the same thing. In the original implementation here, the “Label for Searching” is used as the header. But when USH_INLINE_SEARCH is enabled, the “Label for Searching” configuration is hidden so it can't be configured. "Search Screen Title" is still available.
Feature Flag
SPLIT_SCREEN_CASE_SEARCH
Safety Assurance
Safety story
Local testing. The change only affects Split Screen Case Search which has limited usage. The change only affects display of title and subtitle.
Automated test coverage
No Automated test
QA Plan
No QA
Rollback instructions
Labels & Review