-
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: OpenWorkspaceView API call is made on pages that do not need it #42979
Fix: OpenWorkspaceView API call is made on pages that do not need it #42979
Conversation
@truph01 please get this PR ready for a review as soon as you can. Do not post new proposals on issues until this is merged. Thanks for understanding |
|
I just updated comment |
@hoangzinh 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] |
@hoangzinh Based on my comment, this PR is to make sure "the default should be that we do not call the API command and specify the param only if we need it" |
@truph01 can you make sure we do not call the API request when the |
@mountiny I think we can do it by updating:
to:
What do you think? |
We can do it, but do we ensure this data |
I tried to follow this step to setup VBBA to check if FE can receive a Pusher event regarding
|
@hoangzinh Ah, that makes sense. So I think I need to consider my plan "do not call the API request when the reimbursementAccount is present", it can lead to the reimbursementAccount is outdated |
@mountiny Can you confirm "if FE can receive a Pusher event regarding reimbursementAccount update" like @hoangzinh mentioned in this ? Then we can consider whether we should "do not call the API request when the reimbursementAccount is present" or not. Thanks |
From testing, it seems we don't have that Pusher event. Moreover, the
|
@hoangzinh Based on it, you can review this PR now |
@hoangzinh Can you help review it because it is HIGH priority task, thanks |
Sorry for late. @truph01 Based on what you found here, I think it's valid to call |
@hoangzinh Yes. So that is why I said that:
|
right, let's wait if @mountiny agrees on it. |
Ok, lets continue with this, but we will need to reconsider a backend solution for this |
@hoangzinh the current changes in the PR are enough |
@truph01 can you add test steps in the PR description? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-06-08.at.11.12.17.android.movAndroid: mWeb ChromeScreen.Recording.2024-06-08.at.11.23.47.android.chrome.moviOS: NativeScreen.Recording.2024-06-08.at.11.24.45.ios.moviOS: mWeb SafariScreen.Recording.2024-06-08.at.11.26.14.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2024-06-08.at.10.55.08.web.movMacOS: DesktopScreen.Recording.2024-06-08.at.11.00.38.desktop.mov |
@hoangzinh Since this PR is solely a migration and doesn't address any bugs, I'm currently quite confused about the appropriate test steps for this scenario. I added the test steps in the PR's author, if you have any feedback, let me know. Thanks |
@truph01 I think none neither of them. If it's possible, is there any way that (I know it's quite of hard)
|
@hoangzinh There are many similar pages, such as settings/workspaces/:policyID/bills, settings/workspaces/:policyID/card, settings/workspaces/:policyID/invoices, settings/workspaces/:policyID/travel, etc. In each page, we can have the same behavior as workspace profile page (navigate to other page then go back). So we should ensure consistent handling across all these pages, not just the workspace profile page. |
Yes, if it's possible @truph01. Do you have any viable solution for it? |
@hoangzinh It is Option 1 in above, right? |
This option @truph01 #42979 (comment) |
I mean your suggestion here #42979 (comment) is the same as my option 1 #42979 (comment), do you think that is correct? |
It's almost the same @truph01, there are a few other ways to visit Workspace profile page, for example direct link, deep-link, from list WS -> profile. |
@hoangzinh Ok, got it. |
@truph01 @hoangzinh this is tricky, I think we should not call it again when the RHP modal is closed, but I can see we do that on other pages too and I think it would be out of scope for this PR, so lets do nothing now |
@hoangzinh Based on it, I remove the change which fixed your concern #42979 (comment). You can review PR now |
sure @truph01. I will try to complete review checklist today. Meanwhile, can you add recordings on all platforms as requirements in PR checklist? Thanks |
@hoangzinh Sure, will do it today |
@truph01 because all of those routes are only accessible in free Workspace. It looks like we can't create a new Free workspace atm. Therefore it's hard to test with current steps. I think the viable steps should be
What do you think? |
@hoangzinh I agree. I just updated the test steps |
@hoangzinh I added recording in chrome |
cool thanks @truph01, as a PR checklist, let me know when you complete all platforms. |
@hoangzinh I completed checklist |
@hoangzinh Did you finish reviewing step? |
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, congrats for the 1st PR @truph01
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 for help here!
@mountiny I merged main |
✋ 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/mountiny in version: 1.4.82-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.82-4 🚀
|
Details
Fixed Issues
$ #42900
PROPOSAL: #42900 (comment)
Tests
Offline tests
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-08.at.20.59.06.mov
Android: mWeb Chrome
Screen.Recording.2024-06-08.at.20.56.04.mov
iOS: Native
output.mp4
iOS: mWeb Safari
Screen.Recording.2024-06-08.at.20.46.37.mov
MacOS: Chrome / Safari
Screen.Recording.2024-06-08.at.12.59.41.mov
MacOS: Desktop
Screen.Recording.2024-06-08.at.20.34.07.mov