-
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
[Workspace Chats for All] Default QAB to primary workspace if no value #51836
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of showing it from the start.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dukenv0307 Can you please confirm ^ this on staging
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok maybe we fix that separately then?
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.
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 |
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.
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 |
@@ -7326,8 +7326,7 @@ function canCreateRequest(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>, | |||
return requestOptions.includes(iouType); | |||
} | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
// There are some methods that are OK to use inside an action file, but should not be exported. These are typically methods that look up and return Onyx data. | |
// The correct pattern to use is that every file will use it's own withOnyx or Onyx.connect() to access the Onyx data it needs. This prevents data from becoming stale | |
// and prevents side-effects that you may not be aware of. It also allows each file to access Onyx data in the most performant way. More context can be found in | |
// https://github.com/Expensify/App/issues/27262 |
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 🚀
|
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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-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