-
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
Signin rhp #24083
Signin rhp #24083
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.
Screen.Recording.2023-08-07.at.23.16.25.mov
@daordonez11 Could you confirm if this issue already notice before and will be fixed later?
@daordonez11 @mollfpr for the test steps, also add the case to verify that the logged in user can send a message and other users receive it without refreshing the browser (you can use the same steps from here). |
For sure steps updated, will record again after fixing changes required by @mollfpr |
@marcochavezf what do you think of that issue, I have 2 ideas.
I think 1 is easier but users would still see for a fraction the view. Which one do you think we should use? Thanks for the report @mollfpr I did see it once I think it can also be reproduced by pressing back button. |
My first question is, why the validation code is set after refreshing the page? I think it's fine to show the sign-in modal when the user enters the URL, but it's weird that the form is displaying the validation code and trying to submit it |
So basically this occurs because the state of the component is mantained, since this was originally an unprotected view the user does not see it but its just the "final" state of the page. We could use something like |
@daordonez11 @marcochavezf I agree with this. |
Sounds good, let's go with that solution! |
Ok, guys issue is now solved with the last commit. Will now execute the tests requested by @marcochavezf and include videos with the new scenario 🫡 cc @mollfpr |
Ok guys had to implement a last detail in order for notifications and new scenarios to work. Final commit includes that implementation. Currently uploading videso with new implementation. So ready again for review with new scenario @mollfpr! |
Reviewer Checklist
Screenshots/VideosWebNew_Recording_-_8_18_2023._10_26_18_PM.mp4Mobile Web - ChromeScreen_Recording_20230818_224922_Chrome.mp4Mobile Web - SafariSimulator.Screen.Recording.-.iPhone.14.Pro.-.2023-08-18.at.22.46.52.mp4DesktopScreen.Recording.2023-08-18.at.22.41.27.moviOSSimulator.Screen.Recording.-.iPhone.14.Pro.-.2023-08-18.at.22.43.46.mp4AndroidScreen_Recording_20230818_235329_New.Expensify.Dev.mp4 |
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 for the delay, I am just feeling better now 🙏
The code mostly looks good, just couples of NABs.
There's a strange bug that showing the SignInModal
page after sign in.
Steps:
- Open a public room with anonymous account
- Clear the browser storage
- Open the sign-in page and complete the sign-in flow
- The user will be redirected to the sign-in-modal with the validate code filled.
I believe this is an edge-case, but I'm afraid we will have similar issue with no step reproduce it yet.
Screen.Recording.2023-08-13.at.14.27.48.mp4
Hey @mollfpr thanks for the update and hope you get better! I'll check the NAB's and the error tomorrow, I definitely need to make sure rhp is not shown if you are already logged in, probably with more than one check. I'll let you guys know when it's ready. |
Thanks for the report @mollfpr the issue was happening because navigation was not ready at that point so dismissModal did nothing. Just uploaded a commit with the NABs and the fix with the navigation promise. The easy way of replicating was just opening a new tab with the sign in modal url 😂. |
PS: Solved conflict that appeared today! |
Thanks, @daordonez11. Seems looks good now. I'll be finishing the records in an hour. |
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 and tests well 🚀
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 great, thank you guys, you're awesome!
✋ 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/marcochavezf in version: 1.3.56-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
@@ -35,6 +35,9 @@ const propTypes = { | |||
/** Whether to show welcome header on a particular page */ | |||
shouldShowWelcomeHeader: PropTypes.bool.isRequired, | |||
|
|||
/** Whether or not the sign in page is being rendered in the RHP modal */ | |||
isInModal: PropTypes.bool.isRequired, |
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.
When making this required, we forgot to update the props for this component in src/pages/signin/ThirdPartySignInPage.js
(https://github.com/Expensify/App/pull/23673/files#diff-7d96f9ceabb4069bb79fe99d6e1f2610c32b4190911f32f455e3cc16449c299bR59). This later caused #28255
Hi 👋🏼 The SignInPageLayout was dependent upon We addressed this bug in #28025 |
Hello You have forgot to take out extra padding for RHP, which caused #31445. |
@@ -48,6 +48,11 @@ Onyx.connect({ | |||
} | |||
|
|||
currentAccountID = val.accountID; | |||
if (Navigation.isActiveRoute(ROUTES.SIGN_IN_MODAL)) { | |||
// This means sign in in RHP was successful, so we can dismiss the modal and subscribe to user events | |||
Navigation.dismissModal(); |
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.
Seems we are closing the modal early which causes the issue #36976
if (Navigation.isActiveRoute(ROUTES.SIGN_IN_MODAL)) { | ||
// This means sign in in RHP was successful, so we can dismiss the modal and subscribe to user events | ||
Navigation.dismissModal(); | ||
User.subscribeToUserEvents(); |
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.
Came from this issue
To solve this error, we needed to make sure that Pusher instance initialization (Pusher.init()) is complete before any subscription calls are made.
Like here
App/src/libs/Navigation/AppNavigator/AuthScreens.tsx
Lines 255 to 261 in f58439c
Pusher.init({ | |
appKey: CONFIG.PUSHER.APP_KEY, | |
cluster: CONFIG.PUSHER.CLUSTER, | |
authEndpoint: `${CONFIG.EXPENSIFY.DEFAULT_API_ROOT}api/AuthenticatePusher?`, | |
}).then(() => { | |
User.subscribeToUserEvents(); | |
}); |
Details
Implementation to send sign in to RHP
Fixed Issues
$ #20558
PROPOSAL: #20558 (comment)
Tests
Open a public room as unauthenticated user (i.e. https://staging.new.expensify.com/r/8813851443373010)
Click on sign-in
Click on the back button, should see the public room instead of closing the app
Enter sign-in in RHP
//Validate claim
Enter a new email and enters the validation code
Verify the app loads with the authenticated data
Open in an incognito mode, sign in with another account and post something in the public room
Verify the message appears in the public room for the first user that claimed the anonymous account
Repeat the process again from step 4 to 8, but in step 5 enter the email of an existing account
Offline tests
N/A anonymous users only work online
QA Steps
Same as test 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
Web.Recording.2023-08-04.at.8.55.39.AM.mov
Web.Refresh.Testing.-.8_9_2023.8_33_09.PM.webm
Mobile Web - Chrome
mWeb.Chrome.Recording.2023-08-04.at.8.57.39.AM.mov
mWeb.Refresh.-.8_9_2023.8_38_46.PM.webm
Mobile Web - Safari
mWeb.Safari.2023-08-04.at.9.02.36.AM.mov
Desktop
N/A Public rooms are not supported in desktop
iOS
iOS.login.2023-08-07.at.1.04.18.AM.mov
Android
Android.login.2023-08-07.at.12.59.11.AM.mov