-
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
fix The tag and category lists lack consistent alphabetical order #45236
Conversation
@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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeRecord_2024-07-15-01-58-54.mp4Android: mWeb ChromeRecord_2024-07-15-02-20-31.mp4iOS: NativeScreen.Recording.2024-07-13.at.2.59.49.AM.moviOS: mWeb SafariScreen.Recording.2024-07-13.at.2.55.33.AM.movMacOS: DesktopScreen.Recording.2024-07-13.at.3.08.04.AM.mov |
@ishpaul777 PR is updated |
Also, I updated the test steps to match the current code changes. |
@@ -59,6 +61,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) { | |||
const backTo = route.params?.backTo; | |||
const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyId}`); | |||
const [policyCategories] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyId}`); | |||
const sortedPolicyCategories = lodashSortBy(Object.values(policyCategories ?? {}), 'name', localeCompare) as PolicyCategory[]; |
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.
is there a reason to sort this outside useMemo @dominictb ?
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.
gentle bump @dominictb
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 do it for easier readability
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 we can put this as it is, inside usememo, just so it is memoized we dont sort on every render
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.
@ishpaul777 I updated
Just for clarity, We are aligning sorting behaviour for tags sectionlist, WorkspaceCategories list , WorkspaceTags list. Category list will be as is and its expected behviour since doing it same way broke parent: child list structure in list, Am i correct ? @dominictb |
Yes |
✋ 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/chiragsalian in version: 9.0.11-0 🚀
|
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 9.0.11-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.11-5 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.12-0 🚀
|
Details
Fixed Issues
$ #44922
PROPOSAL: #44922 (comment)
Tests
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-07-11.at.20.20.58.mov
Android: mWeb Chrome
Screen.Recording.2024-07-11.at.20.23.25.mov
iOS: Native
Screen.Recording.2024-07-11.at.20.18.55.mov
iOS: mWeb Safari
Screen.Recording.2024-07-11.at.20.25.14.mov
MacOS: Chrome / Safari
Screen.Recording.2024-07-11.at.17.36.01.mov
MacOS: Desktop
Screen.Recording.2024-07-11.at.17.36.01.mov