-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(pronouns-page): pronouns displayed without search #26192
fix(pronouns-page): pronouns displayed without search #26192
Conversation
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.
In general, looks good!
Pinging @Santhosh-Sellavel here because he was reviewing the other regressions related to the SelectionList refactor |
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.
Adding myself as reviewer
@Santhosh-Sellavel Are you going to review this PR or is this waiting for me? |
I'll take care of this on Monday! |
|
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-09-04.at.2.14.53.AM.movMobile Web - Chrome & Mobile Web - SafariScreen.Recording.2023-09-04.at.2.27.34.AM.movDesktopScreen.Recording.2023-09-04.at.2.15.51.AM.moviOSSimulator.Screen.Recording.-.iPhone.14.-.2023-09-04.at.03.06.58.mp4AndroidScreen.Recording.2023-09-04.at.3.26.41.AM.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,Tests well 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.
Looks good, I'm going to hold for now though due to the merge freeze
✋ 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/amyevans in version: 1.3.68-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.68-17 🚀
|
As the author is already aware, this PR caused a small bug because a wrong key was being checked when calling the update function. |
Details
Pronouns were being displayed without searching.
Instead of patching to fix the issue, I decided to fix the root cause, which is that the PronounsPage was too convoluted, with a lot of unnecessary async code (setting state and relying on useEffects) causing unnecessary re-renders and difficulty to debug.
For example, there was a
loadData()
call on mount to generate the pronouns list. But that data was already available and could have been calculated on-the-fly, without relying on creating states, setting states, and listening to the change in useEffects.Refactored to make the information flow be synchronous, without any side-effects, and fixed the issue mentioned above.
Fixed Issues
$ #26074
PROPOSAL:
Tests
In Profile -> Pronouns:
Offline tests
QA Steps
In Profile -> Pronouns:
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
web.mov
Mobile Web - Chrome
android.web.mov
Mobile Web - Safari
ios.web.mp4
Desktop
desktop.mov
iOS
ios.native.mp4
Android
android.native.mov