-
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 member is unselected when refresh at workspace invite message page and go back #44189
Fix member is unselected when refresh at workspace invite message page and go back #44189
Conversation
@ishpaul777 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-06-23.at.3.56.53.AM.movAndroid: mWeb ChromeScreen.Recording.2024-06-23.at.4.04.30.AM.moviOS: NativeScreen.Recording.2024-06-24.at.2.41.33.PM.moviOS: mWeb SafariScreen.Recording.2024-06-24.at.3.22.16.PM.movMacOS: Chrome / SafariScreen.Recording.2024-06-23.at.3.39.46.AM.movMacOS: DesktopScreen.Recording.2024-06-24.at.3.28.09.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.
LGTM!
✋ 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 🚀
|
This PR is failing because of issue #42533 The issue is reproducible in: mWeb 1719377927765.b113fbb1-4f91-41c5-96bb-0a4be0c2e304.mp4 |
☝️ I'll look into it in ~2hours cc @bernhardoj if you are available please help resolving |
From the video, the selected user that doesn't get re-selected is a new user. We save the selected user logins and retrieve each login from the personal detail. If not found, then we skip it. App/src/pages/workspace/WorkspaceInvitePage.tsx Lines 109 to 124 in 060160e
In the above case, the new user doesn't have the personal detail saved in the onyx. Maybe we should refactor it so we save all the necessary information. |
@bernhardoj As per my understanding, initialOptions are loaded from personalDetails (ONYXKEYS.PERSONAL_DETAILS_LIST) But new user is added to ONYXKEYS.COLLECTION.WORKSPACE_INVITE_MEMBERS_DRAFT and never added to personalDetails App/src/libs/actions/Policy/Member.ts Line 671 in 060160e
is this the RC? if yes do you think you can do a follow up PR to fix this edge case |
Hmm, there are a few concerns.
We also already create an optimistic personal detail when inviting the users. App/src/libs/actions/Policy/Member.ts Lines 522 to 528 in 060160e
I think what we can do is to return a default personal detail when it's a new user. So, in here, App/src/pages/workspace/WorkspaceInvitePage.tsx Lines 121 to 126 in 060160e
instead of early return, we can give it a fallback value as below
Wdyt? |
That sound good to me, but only concern that for why we have a comment App/src/pages/workspace/WorkspaceInvitePage.tsx Lines 118 to 126 in 060160e
|
okay i think we can do followup with your solution it looks good to me 👍 cc @roryabraham |
🚀 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
The selected member is gone when we refresh at the invite message page and go back.
Fixed Issues
$ #42533
PROPOSAL: #42533 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
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
Screen.Recording.2024-06-22.at.12.02.09.mov
Android: mWeb Chrome
Screen.Recording.2024-06-22.at.11.57.57.mov
iOS: Native
Screen.Recording.2024-06-22.at.11.59.11.mov
iOS: mWeb Safari
Screen.Recording.2024-06-22.at.11.57.13.mov
MacOS: Chrome / Safari
Screen.Recording.2024-06-22.at.11.52.32.mov
MacOS: Desktop
Screen.Recording.2024-06-22.at.11.53.17.mov