-
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
[OldDot Rules Migration] Add "Rules" Row/toggle to "More Features" page #47083
[OldDot Rules Migration] Add "Rules" Row/toggle to "More Features" page #47083
Conversation
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.
Minor things to clarify, but overall seems fine
@mkhutornyi 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] |
When you go to upgrade your policy after tapping on the Rules toggle, I would think that the rules toggle should be toggled on automatically as soon as you upgrade. But right now it seems like you have to press the toggle a second time after the upgrade is complete. |
Totally agree—was just about to make this comment! The rules toggle is otherwise looking good to me. |
Thanks for noticing that! It has already been fixed :) Screen.Recording.2024-08-14.at.15.41.02.movScreen.Recording.2024-08-14.at.15.40.33.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 so far. Had a few small notes. Gonna do some testing.
src/CONST.ts
Outdated
@@ -86,6 +86,9 @@ const CONST = { | |||
DEFAULT_TABLE_NAME: 'keyvaluepairs', | |||
DEFAULT_ONYX_DUMP_FILE_NAME: 'onyx-state.txt', | |||
DEFAULT_POLICY_ROOM_CHAT_TYPES: [chatTypes.POLICY_ADMINS, chatTypes.POLICY_ANNOUNCE, chatTypes.DOMAIN_ALL], | |||
EMPTY_MAX_EXPENSE_AMOUNT_NO_RECEIPT: 10000000000, | |||
EMPTY_MAX_EXPENSE_AMOUNT: 10000000000, | |||
EMPTY_MAX_EXPENSE_AGE: 10000000000, |
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 this DISABLED_MAX_EXPENSE_VALUE
and just use it for all three of these cases?
src/libs/API/types.ts
Outdated
@@ -548,6 +550,7 @@ type WriteCommandParameters = { | |||
[WRITE_COMMANDS.REQUEST_EXPENSIFY_CARD_LIMIT_INCREASE]: Parameters.RequestExpensifyCardLimitIncreaseParams; | |||
[WRITE_COMMANDS.CLEAR_OUTSTANDING_BALANCE]: null; | |||
[WRITE_COMMANDS.CANCEL_BILLING_SUBSCRIPTION]: Parameters.CancelBillingSubscriptionParams; | |||
|
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.
src/languages/en.ts
Outdated
rules: { | ||
individualExpenseRules: { | ||
title: 'Expenses', | ||
subtitle: 'Set spend controls and defaults for individual expenses. You can also create rules for categories and tags.', |
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.
Did we want "categories" and "tags" to be links?
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.
Yes, these should be links :) I've already fixed that
Screen.Recording.2024-08-19.at.15.59.16.mov
Screen.Recording.2024-08-19.at.15.58.44.mov
I hid this feature behind the @marcaaron All comments have been resolved :) |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.mp4Android: mWeb Chromemchrome.mp4iOS: Nativeios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.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.
Still waiting for translations to be reviewed internall. But everything looks good here!
I renamed the rules
beta to workspaceRules
. We will have to wait some time for the beta changes to reach production.
@marcaaron @pecanoro I updated translations and renamed the beta :) |
Awesome thanks @pecanoro again for checking the translations 🙇 Just gonna pop a quick hold on here as we need the beta code to get deployed, but everything LGTM @WojtekBoman. @mkhutornyi looks like you started testing here are you going to review this PR and/or finish testing? |
src/libs/Permissions.ts
Outdated
@@ -36,6 +36,10 @@ function canUseNetSuiteUSATax(betas: OnyxEntry<Beta[]>): boolean { | |||
return !!betas?.includes(CONST.BETAS.NETSUITE_USA_TAX) || canUseAllBetas(betas); | |||
} | |||
|
|||
function canWorkspaceRules(betas: OnyxEntry<Beta[]>): boolean { |
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.
should this be canUseWorkspaceRules
to be consistent with other names?
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.
Yes, it should be :) I've adjusted it
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. The beta PR should be on production now so pulling out all the stops here! Nice changes overall and also thank you @mkhutornyi for the review and testing 🙇
✋ 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/marcaaron in version: 9.0.25-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/marcaaron in version: 9.0.25-0 🚀
|
Holding on production deploy:
Details
This PR adds a button to toggle rules on the More Features screen. Now the rules screen only contains empty sections that will be added in the next PRs
Fixed Issues
$ #46935
PROPOSAL:
Tests
Preconditions:
Make sure you have access to the
workspaceRules
beta. If you run the app locally you can modify thecanUseWorkspaceRules
orcanUseAllBetas
function inPermissions.ts
to always returntrue
.Offline tests
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.09.10.56.mov
Android: mWeb Chrome
Screen.Recording.2024-08-14.at.09.18.58.mov
iOS: Native
Screen.Recording.2024-08-14.at.08.42.29.mov
iOS: mWeb Safari
Screen.Recording.2024-08-14.at.08.46.42.mov
MacOS: Chrome / Safari
Screen.Recording.2024-08-14.at.08.50.03.mov
MacOS: Desktop
Screen.Recording.2024-08-14.at.08.58.50.mov