Shortcut - Workspace avatar next to request shortcut does not update when it is changed#39368
Conversation
…e when it is changed
|
@jjcoffee |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-app-2024-04-04_14.47.25.mp4Android: mWeb Chromeandroid-chrome-2024-04-04_14.52.45.mp4iOS: Nativeios-native-2024-04-04_16.03.25.mp4iOS: mWeb Safariios-safari-2024-04-04_16.12.51.mp4MacOS: Chrome / Safaridesktop-chrome-2024-04-04_14.19.50.mp4MacOS: Desktopdesktop-app-2024-04-04_14.22.03.mp4 |
|
|
||
| const quickActionReport = useMemo(() => (props.quickAction ? ReportUtils.getReport(props.quickAction.chatReportID) : 0), [props.quickAction]); | ||
|
|
||
| const policy = props.allPolicies ? props.allPolicies[`${ONYXKEYS.COLLECTION.POLICY}${quickActionReport.policyID}`] : undefined; |
There was a problem hiding this comment.
| const policy = props.allPolicies ? props.allPolicies[`${ONYXKEYS.COLLECTION.POLICY}${quickActionReport.policyID}`] : undefined; | |
| const quickActionPolicy = props.allPolicies ? props.allPolicies[`${ONYXKEYS.COLLECTION.POLICY}${quickActionReport.policyID}`] : undefined; |
To keep things consistent 😉
There was a problem hiding this comment.
Sound good )
Fixed )
| } | ||
| return []; | ||
| }, [props.personalDetails, props.session.accountID, quickActionReport]); | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps |
There was a problem hiding this comment.
I would add a brief explanatory comment here, so future visitors know why we've included policy as a dependency.
jjcoffee
left a comment
There was a problem hiding this comment.
Just some minor tweaks needed, otherwise looks great and tests well! 🙏
| } | ||
| return []; | ||
| }, [props.personalDetails, props.session.accountID, quickActionReport]); | ||
| // We added police depending on the fact that if the workspace changes, we would see these changes on Shortcut too |
There was a problem hiding this comment.
| // We added police depending on the fact that if the workspace changes, we would see these changes on Shortcut too | |
| // Policy is needed as a dependency in order to update the shortcut details when the workspace changes |
|
✋ 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/amyevans in version: 1.4.61-0 🚀
|
|
🚀 Deployed to staging by https://github.com/amyevans in version: 1.4.61-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.61-8 🚀
|
Details
Shortcut - Workspace avatar next to request shortcut does not update when it is changed
Fixed Issues
$ #39045
PROPOSAL: #39045 (comment)
Tests
Offline tests
QA Steps
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
android.mov
Android: mWeb Chrome
android.mov
iOS: Native
Screen.Recording.2024-04-01.at.18.17.21.mov
iOS: mWeb Safari
Screen.Recording.2024-04-01.at.18.18.21.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-01.at.14.22.03.mov
MacOS: Desktop
Screen.Recording.2024-04-01.at.18.09.43.mov