Fix: Read API is not triggered consistently when switching between features of a Collect workspace#38613
Conversation
…res of collect workspace
|
@eVoloshchak 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: Native24-03-19-17-19-43.mp4Android: mWeb ChromeScreen.Recording.2024-04-02.at.15.05.15.moviOS: NativeScreen.Recording.2024-04-02.at.14.54.27.moviOS: mWeb SafariScreen.Recording.2024-04-02.at.15.02.17.movMacOS: Chrome / SafariScreen.Recording.2024-04-02.at.14.35.40.movMacOS: DesktopScreen.Recording.2024-04-02.at.14.59.05.mov |
|
@tienifr, I'm facing a bug with app not loading, the skeleton UI is displayed indefinitely |
|
@eVoloshchak I've merged main and retested well. |
|
Perf-test is failing on |
eVoloshchak
left a comment
There was a problem hiding this comment.
- Log out
- Log in back again
- Open a collect workspace settings page
- Click on
Membersmenu item - Notice
OpenWorkspaceMembersPagerequest is triggered twice
Screen.Recording.2024-03-21.at.16.26.06.mov
This is reproducible only after the first login and I couldn't reproduce this on staging, looks like a bug
RCAApp/src/pages/workspace/WorkspaceMembersPage.tsx Lines 128 to 130 in bbbb8e6
App/src/pages/workspace/WorkspaceMembersPage.tsx Lines 147 to 151 in 288bd8c SolutionNeither could we remove
|
|
@eVoloshchak Above is my suggestions. Wdyt? |
I agree with this approach, web works well, cannot test this on native platforms due to a bug not related to this PR (the workspace settings are not active on native platforms), will come back to this tomorrow Screen.Recording.2024-03-31.at.23.40.37.mov |
@eVoloshchak This was fixed on |
|
✋ 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/Julesssss in version: 1.4.60-13 🚀
|
| // useFocusEffect would make getWorkspaceMembers get called twice on fresh login because policyMember is a dependency of getWorkspaceMembers. | ||
| useEffect(() => { | ||
| if (!isFocused) { | ||
| return; | ||
| } | ||
| getWorkspaceMembers(); | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps | ||
| }, []); | ||
| }, [isFocused]); |
There was a problem hiding this comment.
This also executed after closing RHP. Coming from #61061
Details
Read API is not triggered consistently when switching features of Collect workspace. This PR fixes that.
Fixed Issues
$ #38378
PROPOSAL: #38378 (comment)
Tests
TaxesandMore featuresfeaturesOpenAPI is called (OpenPolicyTaxesPageandOpenPolicyMoreFeaturesPagerespectively in this case)Offline tests
NA
QA Steps
NA
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2024-03-20.at.00.28.08-compressed.mov
Android: mWeb Chrome
Screen.Recording.2024-03-20.at.00.34.16-compressed.mov
iOS: Native
Screen.Recording.2024-03-20.at.00.26.12-compressed.mov
iOS: mWeb Safari
Screen.Recording.2024-03-20.at.00.25.19-compressed.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-20.at.00.22.15-compressed.mov
MacOS: Desktop
Screen.Recording.2024-03-20.at.00.22.15-compressed.mov