-
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 join workspace flow #39991
Fix join workspace flow #39991
Conversation
@DylanDylann 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] |
@@ -39,7 +39,7 @@ function WorkspaceJoinUserPage({route, policy}: WorkspaceJoinUserPageProps) { | |||
}, []); | |||
|
|||
useEffect(() => { | |||
if (!policy || isUnmounted.current || isJoinLinkUsed) { | |||
if (isUnmounted.current || isJoinLinkUsed) { |
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.
@nkdengineer Why do you remove this condition !policy
? Should we check isEmptyObject(policy)
instead of removing 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.
@DylanDylann In the past we use getPolicy
function which returns empty object by default so the check !policy
is always false
. Now, we're get policy
from Onyx so we should remove this check that is preventing join workspace flow.
isEmptyObject(policy)
also returns true for undefined
or null
.
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-04-11.at.15.06.29.movAndroid: mWeb ChromeScreen.Recording.2024-04-11.at.15.08.15.moviOS: NativeScreen.Recording.2024-04-11.at.14.53.22.moviOS: mWeb SafariScreen.Recording.2024-04-11.at.14.50.33.movMacOS: Chrome / SafariScreen.Recording.2024-04-10.at.17.44.13.mov |
@nkdengineer BUG: Not found page display when clicking back button Screen.Recording.2024-04-11.at.15.09.34.mov |
@DylanDylann Reverted to the previous version before we made Screen.Recording.2024-04-11.at.15.49.14.mov |
return; | ||
} | ||
if (!isEmptyObject(policy)) { | ||
if (!isEmptyObject(policy) && !policy?.isJoinRequestPending) { |
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.
@nkdengineer Why change 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.
@DylanDylann After we request to join the workspace, policy will not be empty. So if we click the join link again, we will go to initial page. !policy?.isJoinRequestPending
is added to prevent it. !isEmptyObject(policy) && !policy?.isJoinRequestPending
is the same with isPolicyMember
check.
✋ 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/tgolen in version: 1.4.63-0 🚀
|
Ah its probably already from some previous PR 🙈 |
Haha yup, I remember working with @narefyev91 on the badge styles for this one at least. |
that is what I meant haha |
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
Details
Fixed Issues
$ #38959
PROPOSAL:
Tests
requested
labelOffline tests
None
QA Steps
requested
labelPR 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-04-10.at.14.49.23.mov
Android: mWeb Chrome
Screen.Recording.2024-04-10.at.14.47.07.mov
iOS: Native
Screen.Recording.2024-04-10.at.14.50.56.mov
iOS: mWeb Safari
Screen.Recording.2024-04-10.at.14.42.35.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-10.at.14.39.23.mov
MacOS: Desktop
Screen.Recording.2024-04-10.at.14.52.23.mov