[Workspace Chats for All] Default QAB to primary workspace if no value#51836
[Workspace Chats for All] Default QAB to primary workspace if no value#51836puneetlath merged 14 commits intoExpensify:mainfrom
Conversation
|
@dukenv0307 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] |
src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx
Outdated
Show resolved
Hide resolved
src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx
Outdated
Show resolved
Hide resolved
src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx
Outdated
Show resolved
Hide resolved
src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx
Outdated
Show resolved
Hide resolved
| }, true); | ||
| }), | ||
| shouldShowSubscriptRightAvatar: true, | ||
| shouldRenderTooltip: false, |
There was a problem hiding this comment.
i am not sure about this one if we should show tool tip or not, my understanding is this QAB will be the first default QAB for new user so we should show but we also have quickAction.isFirstQuickAction logic so when its true it will show it again
thoughts? @puneetlath @dukenv0307
There was a problem hiding this comment.
Can you share the video when shouldRenderTooltip: quickAction.isFirstQuickAction? BTW I think we should show the tooltip for the first quick action, but I don't see it in your video
There was a problem hiding this comment.
I like the idea of showing it from the start.
There was a problem hiding this comment.
actually i have noticed that tooltip is not showing on staging even on first QAB action, might be a bug how we show it, but i am still investigating
There was a problem hiding this comment.
@dukenv0307 Can you please confirm ^ this on staging
There was a problem hiding this comment.
okay confirmed, showing green tooltip inside a Popover menu is broken at Base component on staging also, it came from #49913
There was a problem hiding this comment.
Ok maybe we fix that separately then?
There was a problem hiding this comment.
i think yes that's better, it seems to be tricky i can fix it by removing this logic here
https://github.com/Expensify/App/pull/49913/files#diff-947af496a4b67d6f1108d999ee2c45a718ba739e3605410e3c689cd89e06bb4d, but that might bring back the issue the PR solves
src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx
Outdated
Show resolved
Hide resolved
|
Alright, for the tooltip bug for quick action, let's create a separate issue |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-11-02.at.10.36.53.movAndroid: mWeb ChromeScreen.Recording.2024-11-02.at.10.35.22.moviOS: NativeScreen.Recording.2024-11-02.at.10.37.45.moviOS: mWeb SafariScreen.Recording.2024-11-02.at.10.34.04.movMacOS: Chrome / SafariScreen.Recording.2024-11-02.at.10.29.29.movMacOS: DesktopScreen.Recording.2024-11-02.at.10.41.01.mov |
|
LGTM, just left one minor comment |
…pover.tsx Co-authored-by: dukenv0307 <129500732+dukenv0307@users.noreply.github.com>
src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx
Outdated
Show resolved
Hide resolved
|
@puneetlath ready for you review |
puneetlath
left a comment
There was a problem hiding this comment.
Sorry for the delay. Looks like you have a conflict. Thanks for the quick work though!
|
i need to retest after merge but site seems down requests are processig very slow will try again after few minutes |
|
|
||
| function getWorkspaceChats(policyID: string, accountIDs: number[]): Array<OnyxEntry<Report>> { | ||
| const allReports = ReportConnection.getAllReports(); | ||
| function getWorkspaceChats(policyID: string, accountIDs: number[], allReports: OnyxCollection<Report> = ReportConnection.getAllReports()): Array<OnyxEntry<Report>> { |
There was a problem hiding this comment.
this is because ReportConnection.getAllReports() not always have latest snapshot of collection and has stale data which might cause to newly create workspace chat to never exist instead we subscribed to allreports in component using useOnyx which gurantees to have get latest data
more details:
App/tests/actions/EnforceActionExportRestrictions.ts
Lines 7 to 10 in 3c1a533
|
Ready for a re-review? |
|
yes it is @puneetlath |
|
✋ 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/puneetlath in version: 9.0.59-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.59-3 🚀
|
| const isValidReport = !(isEmptyObject(policyChatForActivePolicy) || ReportUtils.isArchivedRoom(policyChatForActivePolicy, reportNameValuePairs)); | ||
| const quickActionReportID = isValidReport ? policyChatForActivePolicy?.reportID ?? '-1' : ReportUtils.generateReportID(); | ||
| IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID ?? '-1', CONST.IOU.REQUEST_TYPE.SCAN, true); |
There was a problem hiding this comment.
Addition of this caused You no longer have access to your previous... to be displayed when first expense was submitted via QAB.
Explanation of Change
it looks for NVP_ACTIVE_POLICY_ID and policychat associated with that policy id where reportOwnerId is currentUserID and then if NVP_QUICK_ACTION_GLOBAL_CREATE not present we show Scan receipt QAB
Fixed Issues
$ #50728
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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-11-01.at.10.05.59.PM.mov
Android: mWeb Chrome
Screen.Recording.2024-11-01.at.10.11.20.PM.mov
iOS: Native
Screen.Recording.2024-11-01.at.9.59.07.PM.mov
iOS: mWeb Safari
Screen.Recording.2024-11-01.at.9.57.39.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2024-11-01.at.9.54.53.PM.mov
MacOS: Desktop
Screen.Recording.2024-11-01.at.10.14.02.PM.mov