-
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
Make sort tag consistent with oldDot #38949
Make sort tag consistent with oldDot #38949
Conversation
…x/33650-implement-sortBy-tag
…x/33650-implement-sortBy-tag
fill={theme.icon} | ||
/> | ||
</View> | ||
lodashSortBy(Object.values(policyTagList.tags || []), 'name', localeCompare).map((value) => ({ |
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.
Why not re-use OptionsListUtils.sortTags?
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.
@situchan they have different types; one is Tag
and the other one is PolicyTag
Object.values(policyTagList.tags || []) | ||
.sort((a, b) => localeCompare(a.name, b.name)) | ||
lodashSortBy(Object.values(policyTagList.tags || []), 'name', localeCompare) | ||
.filter((value): value is OnyxCommon.OnyxValueWithOfflineFeedback<OnyxTypes.PolicyTag> => typeof value === 'object' && value !== null) |
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.
NAB: I don't see this pattern throughout the app. No other way?
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've resolved new conflict and replaced the pattern as well:
.map((policyTagList) =>
lodashSortBy(Object.values(policyTagList.tags || []), 'name', localeCompare).map((value) => {
const tag = value as OnyxCommon.OnyxValueWithOfflineFeedback<OnyxTypes.PolicyTag>;
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
…x/33650-implement-sortBy-tag
@madmax330 looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
Tests were passing |
✋ 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/madmax330 in version: 1.4.58-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.58-8 🚀
|
@situchan @madmax330
Details
The PR will ensure tags sorted consistently between newDot and oldDot (ascending)
Fixed Issues
$ #33650
PROPOSAL: #33650 (comment)
Tests
Preconditions:
tag-case-1.csv
test-case-2.csv
test-case-3.csv
Tip
Before moving on to the next text file, rather than deleting each tag manually, we can clean all tags by toggling the 'Use multiple levels of tags' option on and off.
Important
When switching test files on mobile, the tags might not be reloaded if we stay at tag list, do two steps back/recreate the money request to ensure the tag list is updated.
Steps:
Offline tests
Same as 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 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-03-25.at.23.17.16.mp4
Android: mWeb Chrome
Screen.Recording.2024-03-25.at.23.24.07.mp4
iOS: Native
Screen.Recording.2024-03-25.at.22.33.27.mp4
iOS: mWeb Safari
Screen.Recording.2024-03-25.at.22.50.41.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-03-25.at.22.10.32.mp4
MacOS: Desktop
Screen.Recording.2024-03-25.at.23.00.35.mp4