-
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
Fix - Multilevel tags - "no longer valid" violation is shown after selecting all the tags #38881
Fix - Multilevel tags - "no longer valid" violation is shown after selecting all the tags #38881
Conversation
@dukenv0307 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] |
@FitseTLT Pls use |
No other place that fits with the function. The closest is this one Lines 196 to 198 in e72e186
But it is taking a policy object and returning ordered policy array. |
@FitseTLT I believe we need to update other places as well. You can search Screen.Recording.2024-03-25.at.22.26.19.mov |
will review in a few hours |
@FitseTLT What about that place App/src/libs/Violations/ViolationsUtils.ts Lines 19 to 20 in 9d9757f
We're getting the first tag key, so I think it should be sorted We also need to sort policyTagKeys here App/src/libs/ModifiedExpenseMessage.ts Line 197 in 9d9757f
to preserve the sort order |
First one is a single level tag no need for sorting Lines 189 to 190 in 9012606
It gets the right tag name ,and the other place it uses the index is on splittedTag splittedOldTag which are also ordered.
|
For the second one you pointed I have applied it for logic clarity but it wasn't necessary as I explained it ^ |
@FitseTLT Thanks for your explanation, I didn't realize that policyTagKey is unused variable. Our target is to get the value, but I don't know why we have to do that logic below while we can get the value directly App/src/libs/ModifiedExpenseMessage.ts Line 198 in 9d9757f
Even though you fixed the order problem, it seems redundant to me since we have to sort the tagKeys 2 times and there's a unused variable. Here's my suggestion
|
There's only one point that needs to improve. The rest looks good to me |
U can proceed |
code looks good, starting to record videos now |
@FitseTLT Pls update Offline test and QA tests. We can simply add |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeweb-resize.mp4Android: mWeb Chromeweb-resize.mp4iOS: Nativeweb-resize.mp4iOS: mWeb Safariweb-resize.mp4MacOS: Chrome / Safariweb-resize.mp4MacOS: Desktopweb-resize.mp4 |
@FitseTLT Pls ping/tag C+ whenever you need to review again. Thanks |
@cead22 You're up when you get a chance! |
@@ -2403,7 +2403,7 @@ function buildOptimisticPolicyRecentlyUsedTags(policyID?: string, transactionTag | |||
} | |||
|
|||
const tagListKey = policyTagKeys[index]; | |||
newOptimisticPolicyRecentlyUsedTags[tagListKey] = [...new Set([...tag, ...(policyRecentlyUsedTags[tagListKey] ?? [])])]; | |||
newOptimisticPolicyRecentlyUsedTags[tagListKey] = [...new Set([tag, ...(policyRecentlyUsedTags[tagListKey] ?? [])])]; |
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 this change?
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 got another bug and fixed. spreading tag means every letter in the tag will be included in the list that's why recently used tags now doesn't work BTW.
@cead22 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/cead22 in version: 1.4.59-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.60-13 🚀
|
Details
Fixed Issues
$ #38044
PROPOSAL: #38044 (comment)
Tests
Precondition:
no longer valid
violation is not displayedOffline tests
same
QA Steps
same
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(themeColors.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
nativ.mp4
Android: mWeb Chrome
and.we.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.web.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
d.mp4