-
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
Fix pronouns is empty when we access by deep link after signing in #28368
Conversation
@thesahindia 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] |
Taking this one over! |
onChangeText={setSearchValue} | ||
initiallyFocusedOptionKey={currentPronounsKey} | ||
/> | ||
{isLoadingReportData && _.isEmpty(currentUserPersonalDetails.login) ? ( |
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.
Shouldn't this be ||
instead @dukenv0307?
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 we already have currentUserPersonalDetail, we don't need to wait isLoadingReportData
as false.
if ((isLoadingReportData && _.isEmpty(currentUserPersonalDetails.login)) || loadingCompleteRef.current) { | ||
return; | ||
} | ||
loadingCompleteRef.current = true; |
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.
@dukenv0307 Can you please explain this condition? I'm not able to understand fully why we need to use the ref here.
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 believe the expectation here is only to set the current pronouns to the state the first time. After that, if we update this on another device, we don't want to update this to search text because we are finding another in the current device.
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.
@dukenv0307 I think if we use IS_LOADING_APP
instead of IS_LOADING_REPORT_DATA
, there would be no need for the ref. Can you please verify / confirm?
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.
Actually, we are using IS_LOADING_REPORT_DATA
from other components and only use IS_LOADING_APP
in AuthScreen
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.
Sorry, is this an issue? I mean, we can use it anywhere. Essentially, it is just setting the value of the constant as true
when openApp
is called. The command openApp
is called only once on the first load and this is what we need here as well I assume.
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 think so.
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.
Let's try it!
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.
Updated.
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.
Does it work fine? 😸
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.
Tested and it works fine.
Reviewer Checklist
Screenshots/VideosWebscreen-recording-2023-10-03-at-72200-am_VX1wXAS7.mp4Mobile Web - ChromeScreen.Recording.2023-10-03.at.7.27.05.AM.movMobile Web - SafariScreen.Recording.2023-10-03.at.7.24.36.AM.movDesktopscreen-recording-2023-10-03-at-74728-am_62o6dn84.mp4iOSScreen.Recording.2023-10-03.at.7.36.11.AM.movAndroidScreen.Recording.2023-10-03.at.8.00.23.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.
Looks good!
@allroundexperts see an edge case in which we can change pronouns before changing the contact method from another device. So update to remove dependency. |
✋ 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.78-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.78-4 🚀
|
🚀 Deployed to staging by https://github.com/amyevans in version: 1.3.79-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀
|
Details
We will display loading page until the data is loaded and display the correct pronouns of the user
Fixed Issues
$ #27675
PROPOSAL: #27675 (comment)
Tests
Offline tests
None
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 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
web1.mov
Mobile Web - Chrome
Record_2023-09-28-13-59-11.mp4
Mobile Web - Safari
safari.mov
Desktop
desktop1.mov
iOS
ios.mov
Android
android.mov