-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 small improvements related to introducing React strict mode #44155
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 |
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.
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!
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.
Works good!
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; oldwithOnyx
is 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 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop