Add small improvements related to introducing React strict mode#44155
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
@shubham1206agra 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] |
|
@mountiny FYI this is the PR with less important changes from the other PR like we discussed |
|
I think @rayane-djouah should review this. |
|
Sounds like a good idea, perhaps someone from Expensify could re-assign the reviewers. |
|
I will start the review in a few hours, I need to read through the issue to get context |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-06-24.at.4.48.56.PM.movAndroid: mWeb ChromeScreen.Recording.2024-06-24.at.4.44.30.PM.moviOS: NativeSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-06-24.at.16.53.58.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-06-24.at.14.17.28.mp4MacOS: Chrome / SafariScreen.Recording.2024-06-24.at.1.06.52.PM.movMacOS: DesktopScreen.Recording.2024-06-24.at.4.56.05.PM.mov |
mountiny
left a comment
There was a problem hiding this comment.
Looks good to me @rayane-djouah can you please prioritize this review and make sure the changes from the reportScreenIDSetter do not cause any regressions? thanks!
|
@Kicu - Can you please fill out Offline tests, QA Steps, and Screenshots/Videos sections in the author checklist? Thanks! |
|
@rayane-djouah since this PR introduces no specific feature only cleans up some unused code and refactors 1 screen without any logic changes, Im not sure what Im supposed to put into those categories? |
Yes, you can type "Same as tests" in these sections to make it clear for QA team |
| const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT, {allowStaleData: true}); | ||
| const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {allowStaleData: true}); | ||
| const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST); | ||
| const [isFirstTimeNewExpensifyUser] = useOnyx(ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER, {initialValue: false}); |
There was a problem hiding this comment.
NAB but you initialValue is kind of outdated for useOnyx. IMO this is a clearer way to achieve the same thing, and the resultant type is boolean instead of boolean | undefined.
| const [isFirstTimeNewExpensifyUser] = useOnyx(ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER, {initialValue: false}); | |
| const [isFirstTimeNewExpensifyUser = false] = useOnyx(ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER); |
There was a problem hiding this comment.
hey thanks, I will keep this in mind moving forward.
This was an experiment in rewriting, so I wanted to be very 1-to-1 in regards to withOnyx -> useOnyx
|
✋ 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/roryabraham in version: 9.0.2-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
Details
changes:
ReportScreenIDSetter- moving forward we want to use onlyuseOnyx, as a test I rewritten this one screen to useOnyx for safety and performance; oldwithOnyxis not fully safe to use with concurrent reactimport 'shim-keyboard-event-key- Internet Explorer is not supported by MS since 2022, and I believe we should not be supporting "dead" browsersFixed Issues
$ #33531
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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
MacOS: Desktop