-
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
Feat/workspace categories settings #37133
Feat/workspace categories settings #37133
Conversation
@cubuspl42 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: NativeScreen.Recording.2024-02-27.at.11.46.02.AM.movAndroid: mWeb ChromeScreen.Recording.2024-02-27.at.11.43.38.AM.moviOS: NativeScreen.Recording.2024-02-27.at.11.37.46.AM.moviOS: mWeb SafariScreen.Recording.2024-02-27.at.11.32.51.AM.movMacOS: Chrome / SafariScreen.Recording.2024-02-27.at.11.20.51.AM.movScreen.Recording.2024-02-27.at.11.22.52.AM.movMacOS: DesktopScreen.Recording.2024-02-27.at.11.29.01.AM.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.
Nice, changes LGTM. Did some basic testing and things seem to work well. I'm gonna add the following to the test steps:
- Navigate to
Workspace Settings > Collect Workspace > Categories > Settings
- Verify that
Members must categorize all spend
is off - Navigate to the Workspace chat for that Workspace
+ > Request money and verify that
Category` is not required- Navigate to
Workspace Settings > Collect Workspace > Categories > Settings
- Turn on
Members must categorize all spend
- Repeat step 4 and verify that category shows up as required. Note that we can still submit the request without adding a category, this is intended as we don't block the user and instead show a violation after the request is made.
- Make the request, verify that there's a RBR icon next to the request and the category shows an error.
Screen.Recording.2024-02-23.at.10.31.36.AM.mov
BUG Setting the toggle optimistically does not result in the category option showing up as required. Screen.Recording.2024-02-23.at.11.11.38.PM.mov |
@ArekChr we also have conflicts now |
Even when I am online, the Screen.Recording.2024-02-23.at.11.30.38.PM.mov |
@allroundexperts oh that's weird. I definitely saw the required flag (see my video in the OP). Is the call to |
Conflicts resolved |
You're right, last time i saw in year of birth page but it seems it has been removed, fixing |
Will this require a double C+ review? I see that @allroundexperts started working on this |
@ArekChr Did you manage to find a solution for #37133 (comment)? |
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.
Left a comment about the offline styles. Everything else looks good to me.
I'm not seeing the issue with the required
flag that @allroundexperts mentioned. It works for me both online and offline.
Screen.Recording.2024-02-26.at.12.12.01.PM.mov
src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx
Outdated
Show resolved
Hide resolved
@cubuspl42 I think we can let @allroundexperts handle this once since they already got started. Thanks for checking though |
@ArekChr Are you waiting on translations for the checklist? |
On a Paid workspace whose trial is expired, we're showing the option to enforce categories but when requesting money from the workspace, the category does not show up as required. @ArekChr Can you maybe check why is this the case? |
I have the same issue when setting requires category to true, category is still not required in manual request. Checked that and this is because requires category flag is set to require a logical AND condition together with the
|
Translations reviewed, all good! |
The same as above, I think this relates to |
Nice find @ArekChr. That's just a check to verify that the user is part of the violations beta, but we can remove that and always show the |
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.
LGTM!
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 other than the NAB.
Hmm actually @JmillsExpensify just mentioned that we should keep that beta check for now. So I'm just gonna update the test steps and I think we're good to merge. |
✋ 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/luacmartins in version: 1.4.45-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.45-6 🚀
|
> | ||
<View style={[styles.mt2, styles.mh4]}> | ||
<View style={[styles.flexRow, styles.mb5, styles.mr2, styles.alignItemsCenter, styles.justifyContentBetween]}> | ||
<Text style={[styles.textNormal, styles.colorMuted]}>{translate('workspace.categories.requiresCategory')}</Text> |
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.
The text does not wrap properly which caused #38370
Details
This PR addresses the implementation of the categories settings page, allowing to enable or disable the expense category requirement.
Fixed Issues
$ #35706
PROPOSAL: https://docs.google.com/document/d/1gk3xqOs7epMbUrSSiX8K7YcqfPLVgqEos0sf-D-GMDA/edit#bookmark=id.2cvhhb9mrm8w
Tests
Pre-requisite: an account in the violations beta
Workspace Settings > Collect Workspace > Categories > Settings
+ > Request money and verify that Category
is not requiredScreen.Recording.2024-02-23.at.10.31.36.AM.mov
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
307329869-4164c182-d822-44b4-b21c-983f5a26a8bb.mov
MacOS: Desktop