[CP Staging]Always sorting tags by orderWeight#37681
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-03-04.at.8.03.15.PM.movAndroid: mWeb ChromeScreen.Recording.2024-03-04.at.7.40.51.PM.moviOS: NativeScreen.Recording.2024-03-04.at.8.07.03.PM.moviOS: mWeb SafariScreen.Recording.2024-03-04.at.7.23.07.PM.movMacOS: Chrome / SafariScreen.Recording.2024-03-04.at.7.14.18.PM.movMacOS: DesktopScreen.Recording.2024-03-04.at.8.11.52.PM.mov |
|
@rlinoz options switch places after selection, is this intentional i don't see this behavior other places. Screen.Recording.2024-03-04.at.8.15.48.PM.mov |
|
I believe it is intentional as it has the same behavior when selecting categories. If you have enough tags/categories there will a Also, if you have less categories it will behave the same way. |
|
@cristipaval 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] |
|
@grgia @cristipaval already completed the checklist #37681 (comment) not sure what melvin wants 😕 |
|
Melvin had a rough weekend I think 😂 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Always sorting tags by orderWeight (cherry picked from commit 4d4eaad)
|
🚀 Cherry-picked to staging by https://github.com/roryabraham in version: 1.4.46-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/roryabraham in version: 1.4.46-2 🚀
|
| return Object.values(policyTagList).filter((policyTagListValue) => policyTagListValue !== null); | ||
| return Object.values(policyTagList) | ||
| .filter((policyTagListValue) => policyTagListValue !== null) | ||
| .sort((tagA, tagB) => tagA.orderWeight - tagB.orderWeight); |
There was a problem hiding this comment.
Coming from #37783.
The index produced by orderWeight here may be inconsistent with the index produced by Object.keys in getTagListName. Therefore, we have also changed the latter to orderWeight. :)
Details
Fixed Issues
$ #37658
PROPOSAL:
Tests
Preconditions:
In OldDot under admin, create a Collect group policy
Multi level test
Single tag test
Offline tests
QA Steps
Preconditions:
In OldDot under admin, create a Collect group policy
Multi level test
Single tag test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Uploading Screen Recording 2024-03-04 at 12.54.15.mov…
MacOS: Desktop