-
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
Show composer on public rooms after signing in #42497
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
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.
This is a nice little useful hook and nicely documented too. Code LGTM.
But this does not yet give the expected result for the mentioned use case using Google SignIn
.
Digging a little deeper, I notice that the report.permissions
are not yet updated to permissions: ["read", "write", "share”]
after signing in. And it seems like the staging server is not sending back the updated permissions.
I am also attaching a test video to demonstrate this. Please have a look.
Note: For testing on development environment, I enabled the Google SignIn
here and also ensured that user->shouldUseStagingServer
Onyx entry is set to true within OpenApp
.
20240523_133319.mp4
@rojiphil huh interesting, thanks. I will try to take a look soon and figure out what's going on. |
@rojiphil would you please test again? I merged main and tested using the web proxy against the staging server, with the actual google sign in flow, and it seems to work well. I'll include the updated video in the description and updated test steps. |
Ah nice! It works. Will upload the test videos and complete the checklist in a few hours. |
I also included a fix to make the composer show immediately after signing into a public room, vs having to wait for the OpenReport response. I can't capture a test video right now since the backend is really slow and having problems. |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safari42497-web-chrome-004.mp4Android: Native42497-android-native-003.mp4Android: mWeb Chrome42497-mweb-chrome-003.mp4iOS: Native42497-ios-native-003.mp4iOS: mWeb Safari42497-mweb-safari-003.mp4MacOS: DesktopI am unable to test this on desktop as the public room does not open after google signin as demonstrated. Most likely I am missing something here as part of testing google signin locally. But I don’t think this is a blocker as this tests well on other platforms. 42497-desktop-notest.mp4 |
It's too late for me here. And I will address your further feedback in my morning. |
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.
Thanks @neil-marcellini. LGTM and works well too.
@Julesssss 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] |
✋ 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 production by https://github.com/luacmartins in version: 1.4.81-11 🚀
|
Details
When a user views a public room, the
report.permissions
array initially only contains"read"
. After signing in the permissions are updated topermissions: ["read", "write", "share"]
. That change makes the composer visible since hideComposer becomes falseApp/src/pages/home/report/ReportFooter.tsx
Line 88 in 1f01ef6
However, since we useMemo for the report, the permissions array wasn't getting updated, because the array is really a reference which doesn't change when new values are added to it. The solution is to do a deep comparison and update the dependency when the values change.
Fixed Issues
$ #41955 (comment)
PROPOSAL: N/A
Tests
Dev setup
App/src/pages/signin/LoginForm/BaseLoginForm.tsx
Line 291 in 6106eca
Test
/r/868417741568295
Offline tests
N/A
QA Steps
Same at tests
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
I only tested on web because the changes are small and platform independent.
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
public-google.-2024-06-03.at.5.44.19.PM.mov
MacOS: Desktop