[CP Staging][Fix Blocker] Close DatePicker on browser navigation#90168
[CP Staging][Fix Blocker] Close DatePicker on browser navigation#90168MelvinBot wants to merge 1 commit into
Conversation
…t to true Co-authored-by: Georgia Monahan <grgia@users.noreply.github.com>
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@dukenv0307 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] |
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
All code checks (ESLint, TypeScript, tests, prettier, Storybook, perf-tests, etc.) are passing. ✅ The only failing checks are process/approval gates:
These aren't code failures — they need human review and approval to proceed. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
| anchorPosition, | ||
| onSelected, | ||
| shouldCloseWhenBrowserNavigationChanged = false, | ||
| shouldCloseWhenBrowserNavigationChanged = true, |
There was a problem hiding this comment.
Not sure that we should change the default value rather than just enabling this in the BBA flow
|
We're going to revert |
Explanation of Change
The
DatePickerModalcomponent defaultsshouldCloseWhenBrowserNavigationChangedtofalse, which prevents the existingpopstatelistener inPopoverfrom closing the date picker when browser back/forward navigation occurs. After the USD bank account flow refactor in PR #86645, sub-step navigation uses URL params instead of full navigation stack push/pop, so the date picker's local state persists across sub-step transitions.This PR changes the default value of
shouldCloseWhenBrowserNavigationChangedfromfalsetotrueinDatePickerModal.tsx:35, enabling the existingpopstatelistener inPopoverto automatically close the date picker on browser navigation events.Fixed Issues
$ #90109
PROPOSAL: #90109 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
N/A — this change only affects browser popstate behavior.
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari