-
Notifications
You must be signed in to change notification settings - Fork 3k
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: category settings page #37209
feat: category settings page #37209
Conversation
…settings and categories settings
@ishpaul777 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] |
Also added a fix for the CategoriesSettingsPage: the offline indicator now correctly appears at the bottom of the screen on mobile devices. |
I'm wondering about page naming, to change from |
[SCREENS.WORKSPACE.CATEGORY_SETTINGS]: { | ||
path: ROUTES.WORKSPACE_CATEGORY_SETTINGS.route, | ||
parse: { | ||
categoryName: (categoryName: string) => decodeURI(categoryName), |
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.
Regarding to checklist, It appears that this is a new pattern. Previously, parsing and linking were not utilized in this manner, In my opinion, it would be more effective to decode the category name before passing it to the route props.
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.
@luacmartins ☝️ any thoughts ?
If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
Do we need a scroll view on this page? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-02-29.at.9.25.06.PM-1.movScreen.Recording.2024-02-29.at.9.27.09.PM-1.movAndroid: mWeb ChromeScreen.Recording.2024-02-29.at.10.09.27.PM.moviOS: NativeScreen.Recording.2024-02-29.at.10.24.16.PM.moviOS: mWeb SafariScreen.Recording.2024-02-29.at.11.08.57.PM-1.movMacOS: Chrome / SafariScreen.Recording.2024-02-29.at.9.06.38.PM.movMacOS: DesktopScreen.Recording.2024-02-29.at.11.50.39.PM.movScreen.Recording.2024-02-29.at.11.49.49.PM.mov |
when deeplinking to category settings of unknown category the background screen is not category page Screen.Recording.2024-02-29.at.9.17.49.PM.mov |
@ArekChr how do you simulate a error while updating a category setting ? |
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.
@Expensify/design |
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 and tests well!
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
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
✋ 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.47-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.4.47-10 🚀
|
@@ -526,6 +526,10 @@ const ROUTES = { | |||
route: 'workspace/:policyID/categories', | |||
getRoute: (policyID: string) => `workspace/${policyID}/categories` as const, | |||
}, | |||
WORKSPACE_CATEGORY_SETTINGS: { | |||
route: 'workspace/:policyID/categories/:categoryName', | |||
getRoute: (policyID: string, categoryName: string) => `workspace/${policyID}/categories/${encodeURI(categoryName)}` as const, |
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 line introduced regression #37885, because encodeURI
won't encode /
.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI#description
Details
Fixed Issues
#35708
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests
rest steps the same as above for test and offline
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.mov
Android: mWeb Chrome
web.chrome.mov
iOS: Native
ios.mov
iOS: mWeb Safari
web.safari.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov