Fix/37095: Tag list show required#37388
Conversation
| const policyTagLists = useMemo(() => PolicyUtils.getTagLists(policyTags), [policyTags]); | ||
|
|
||
| // Check if it is the multiple levels tags or not | ||
| const isMultipleLevelsTags = policyTagLists && policyTagLists.length > 1; |
There was a problem hiding this comment.
I think we need to return required field in case of single tag. Because with the current solution, in case of multiple tags but just have one tag list, isMultipleLevelsTags is false
|
@akinwale Ping to review in case you miss it |
Thanks for the bump. I will review today. |
|
@dukenv0307 Please upload test videos or screenshots for Android native, iOS native and Desktop. |
|
You also need to clarify your test steps because there are two things that can be disabled when dealing with tag lists: the Required flag for a tag list, or each individual tag when a user clicks on edit tags for a particular tag list.
What should be marked as disabled? The Required switch or an individual tag when the user clicks on Edit tags?
What should not appear here? The "Required" text next to the tag name, or each individual disabled tag that corresponds to a tag list? |
Reviewer Checklist
Screenshots/VideosAndroid: Native37388-android-native.mp4Android: mWeb Chrome37388-android-chrome.mp4iOS: Native37388-ios-native.mp4iOS: mWeb Safari37388-ios-safari.mp4MacOS: Chrome / Safari37388-web.mp4MacOS: Desktop37388-desktop.mp4 |
akinwale
left a comment
There was a problem hiding this comment.
Just a couple of things to address: #37388 (comment) and #37388 (comment).
| disabled={didConfirm} | ||
| interactive={!isReadOnly} | ||
| rightLabel={isTagRequired ? translate('common.required') : ''} | ||
| rightLabel={required ? translate('common.required') : ''} |
There was a problem hiding this comment.
We use required field in both single tag and mulitple levels tags case based on comment
| isSupplementary: !isTagRequired, | ||
| })), | ||
| ..._.map(policyTagLists, ({name, required}, index) => { | ||
| const isTagRequired = !isUndefined(required) && required; |
There was a problem hiding this comment.
Why we removed canUseViolations?
And this does not work for single level tags where required is not set for each tag, right?
There was a problem hiding this comment.
And this does not work for single level tags where required is not set for each tag, right?
In single-level tag, it still works because we also have required field. But we have the issue with BE side so that field is not returned correctly (Known issue mentioned here). Below is the data returned from BE side in case of single-level tag:
There was a problem hiding this comment.
Why we removed canUseViolations
I updated the PR to add the canUseViolations
There was a problem hiding this comment.
This is held on backend change as per https://expensify.slack.com/archives/C01GTK53T8Q/p1708948376264389?thread_ts=1708732718.173419&cid=C01GTK53T8Q?
There was a problem hiding this comment.
Is it still on HOLD? What PR?
There was a problem hiding this comment.
@MonilBhavsar @akinwale BE is fixed (See comment). I just tested it again and it works well
|
@MonilBhavsar Con you help review PR again? |
|
Sorry looking
|
@MonilBhavsar Yes, I did retest on all platforms. |
MonilBhavsar
left a comment
There was a problem hiding this comment.
Thanks for confirming!
|
✋ 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/MonilBhavsar in version: 1.4.61-0 🚀
|
|
🚀 Deployed to staging by https://github.com/MonilBhavsar in version: 1.4.61-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.61-8 🚀
|

Details
Fixed Issues
$ #37095
PROPOSAL: #37095 (comment)
Tests
required(See the below image)Offline tests
QA Steps
required(See the below image)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
Screencast.from.04-03-2024.01.10.37.webm
Android: mWeb Chrome
Screencast.from.28-02-2024.09.13.37.webm
iOS: Native
Screencast.from.04-03-2024.01.04.14.webm
iOS: mWeb Safari
Screencast.from.28-02-2024.09.13.04.webm
MacOS: Chrome / Safari
Screencast.from.28-02-2024.09.12.27.webm
MacOS: Desktop
Screencast.from.04-03-2024.00.50.14.webm