-
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
Show primary workspace chat first when creating expense #47437
Conversation
@allgandalf 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] |
@nkdengineer , if no workspace is active we should show the recents as they were before, is this result matched with this PR? |
@allgandalf Yes, if there is no WS |
@nkdengineer , when i have an active workspace, I don't see that at the top of recents |
Here is the cases and the expected result: Expected Result: |
@allgandalf I assume the primary WS here is the default WS that we set in old dot. Is that right? |
@mountiny Can you please confirm? |
Here are the expected results:
c.c. @trjExpensify correct me if i miss something |
Umm, from slack, i confirmed something different here that is why the comment was this on the issue:
lets wait for the internal engineers to clarify |
I think the |
That's correct. Though it's totally possible on OldDot to select your personal policy as the default, but we don't have that concept in NewDot (nor give them a workspace chat tbh). So we only want to set the default WS at the top of the option selector if the default workspace set is a group workspace (i.e |
okay i get that now, I will complete the review then |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-08-14.at.11.42.18.PM.movAndroid: mWeb ChromeScreen.Recording.2024-08-14.at.11.45.19.PM.moviOS: NativeScreen.Recording.2024-08-14.at.11.40.42.PM.moviOS: mWeb SafariScreen.Recording.2024-08-14.at.11.30.04.PM.movMacOS: Chrome / SafariScreen.Recording.2024-08-14.at.11.28.27.PM.movMacOS: DesktopScreen.Recording.2024-08-14.at.11.31.00.PM.mov |
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.
Looks good to me, works as expected
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.
@nkdengineer can you please rename it to activePolicyID so that matches the nvp key?
src/libs/OptionsListUtils.ts
Outdated
@@ -359,6 +359,12 @@ Onyx.connect({ | |||
callback: (value) => (allReportsDraft = value), | |||
}); | |||
|
|||
let primaryPolicyID: OnyxEntry<string>; |
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 we call it activePolicyID as thats how the nvp key is called?
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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.
@mountiny I updated.
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.
NAB, but i feel primaryPolicyID
is right over here, activePolicyID
is the policyID we are on currently
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.
@nkdengineer @allgandalf I realize this is not ideal, but we already call the variables from the NVP_ACTIVE_POLICY_ID
as activePolicyID elsewhere so I think we should just keep using that instead of using this term
src/libs/OptionsListUtils.ts
Outdated
return 0; | ||
} | ||
|
||
if (option.isPolicyExpenseChat && preferPolicyExpenseChat) { |
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.
@mountiny I have a question here: Do we also prefer re-order the other policy expense chat that isn't the active policy ID when we re-order the active policy expense chat.
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 implemented this logic. If we don't want to do that, I can remove this logic.
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.
@mountiny What do you think about my comment above?
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
It's not really working for me reliably on the adhoc build. 2024-08-14_20-38-09.mp4 |
@trjExpensify I can't reproduce this bug. It's late and I'm going to sleep now. Will check again tomorrow. |
Sounds good! |
Posted what I posted in Slack:
|
@mountiny So this isn't a bug from our PR, right? |
@nkdengineer its not |
I guess all the problems are solved here, we aren't holding on anything right? |
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.
Looks good, just need to resolve this thread in Slack https://expensify.slack.com/archives/C01GTK53T8Q/p1723704378019929
I think we're good here now? |
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!
✋ 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: 9.0.21-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.21-4 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.21-4 🚀
|
I just tried this on my account in production and it's not working. Any ideas? |
@shawnborton It is working for me
|
Ah apologies, I didn't realize this only showed the primary workspace... which my primary workspace is not in newDot |
Details
Show primary workspace chat first when creating expense
Fixed Issues
$ #46683
PROPOSAL: #46683 (comment)
Tests
Offline tests
Same as above
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-08-14.at.22.39.45.mov
Android: mWeb Chrome
Screen.Recording.2024-08-14.at.22.36.35.mov
iOS: Native
Screen.Recording.2024-08-14.at.22.39.27.mov
iOS: mWeb Safari
Screen.Recording.2024-08-14.at.22.37.45.mov
MacOS: Chrome / Safari
Screen.Recording.2024-08-14.at.22.34.21.mov
MacOS: Desktop
Screen.Recording.2024-08-14.at.22.42.10.mov