-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add new error message in selection pages #47091
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
Add new error message in selection pages #47091
Conversation
@ikevin127 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
I see another bug: The background highlight isn't updated when selecting an option (This bug also happen on the staging) Screen46.mov |
ℹ️ Will review this on Saturday (PST) when I'll return to office. @cretadn22 Regarding the highlight bug that you found, it should only be fixed here if it's an easy fix - otherwise we should report it and treat it separately, since it was already on staging 👍 |
To resolve the above problem, we can pass shouldSingleExecuteRowSelect, shouldUpdateFocusedIndex params to SelectionList. Screen47.movHowever, it fails during the initial selection, as the blue box appears around the selected item. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.webmAndroid: mWeb Chromeandroid-mweb.webmiOS: Nativeios.mp4iOS: mWeb Safariios-mweb.mp4MacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
@cretadn22 ✅ Completed the PR Reviewer Checklist, however I'm holding off on Approve until we figure out what we want to do with the other bug found here, for which I think we need design's help to select the best option moving forward. What's the issue ?Coming from #47091 (comment) (bug was mentioned first time by PR author), a partial fix mentioned in #47091 (comment) would be the way to go if we want to highlight the selected option. Since we now unified both selection pages to use the Next button and have validation that requires selection: This means that both the above page selection and the How should this custom segment be displayed in Expensify? page should have the same validation error message and also the same UI behaviour: This leaves us with two options:
cc @Expensify/design Please chime in here regarding which option we should go with. |
I will wait for the design team before continuing to the highlight bug. |
My take is that whenever the checkmark is present on these list, we should also have the highlight so I think option 2 is the right move. Keen to hear what @shawnborton and @dannymcclain thinks though |
Yup, definitely agree with that - if it has a checkmark, it should have a BG. Is there a way to fix this globally? I feel like we keep seeing this one pop up across various places. |
Thanks for confirmation, I will give an update soon |
100% agree with Shawn and Jon. And I'd be absolutely thrilled if we could figure out a way to fix this globally. |
@@ -118,6 +118,7 @@ function WorkspaceEditCardLimitTypePage({route}: WorkspaceEditCardLimitTypePageP | |||
onSelectRow={({value}) => setTypeSelected(value)} | |||
sections={[{data}]} | |||
shouldUpdateFocusedIndex | |||
shouldSingleExecuteRowSelect |
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.
I noticed this bug also occurs on this page, the root cause and solution are similar to our issue. Therefore, I will address it here as well.
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.
Thank you!
if ( | ||
(prevTextInputValue === textInputValue && flattenedSections.selectedOptions.length === prevSelectedOptionsLength) || | ||
flattenedSections.allOptions.length === 0 || | ||
shouldUpdateFocusedIndex |
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.
If shouldUpdateFocusedIndex is true, we should avoid resetting the focus index to -1 when the length of the selected options changes.
@ikevin127 I've resolved the highlight issue. Could you please review it again? Screen56.mp4 |
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 for fixing the highlight issue!
LGTM, tests well 🟢
highlight.mov
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.
LGTM
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/blimpich in version: 9.0.21-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.21-4 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.21-4 🚀
|
Details
Adding new error message in selection page
Fixed Issues
$ #46536
PROPOSAL: #46536 (comment)
Tests
QA Steps
Offline tests
QA Steps
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2024-08-11.at.16.21.05.mov
Android: mWeb Chrome
Screen.Recording.2024-08-11.at.16.19.59.mov
iOS: Native
Screen.Recording.2024-08-11.at.16.19.15.mov
iOS: mWeb Safari
Screen.Recording.2024-08-11.at.16.16.26.mov
MacOS: Chrome / Safari
Screen50.mov
MacOS: Desktop
Screen.Recording.2024-08-11.at.16.25.07.mov