Hides required toggle in case dependent tags is enabled#43769
Conversation
|
@jayeshmangwani 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] |
|
@rlinoz Please let me know if PR needs a C+ review. |
|
Hey @jayeshmangwani, yes please review it, I think it will be good just in case we fall in any weird layout/scenario for dependent tags |
|
While testing, I found two issues. Later, when I compared it with the production, I noticed that the issue occurs on the main as well. It is related to multiple levels of tags, so I'm just adding the bugs here: |
|
Go to any independent workspace tags.
The switch changes states like this: Enabled for a moment -> then Disabled -> Enabled after a second. multiple-level-bug.mov |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid.movAndroid: mWeb ChromemWeb-chrome.moviOS: NativeiOS.moviOS: mWeb SafarimWeb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
jayeshmangwani
left a comment
There was a problem hiding this comment.
Code changes looks good 🎉
|
@youssef-lr 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] |
hayata-suenaga
left a comment
There was a problem hiding this comment.
the code looks good to me as well 😄
|
✋ 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/rlinoz in version: 1.4.86-0 🚀
|
1 similar comment
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 1.4.86-0 🚀
|
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 1.4.86-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.0-9 🚀
|
|
I think this PR might've led to surfacing of the following issue: Which was solved on the FE side by implementing a check to see if any tags are enabled. If none -> call the setPolicyTagsRequired function to turn off the required toggle. More details in the proposal. |

Details
Dependent tags can't be set as required, this PR hides the Required toggle in case there are dependent tags.
cc: @hayata-suenaga if you could review it
Fixed Issues
$ #43758
PROPOSAL:
Tests
Are these independent tags?checkboxMembers must tag all expensesAre these independent tags?checkedOffline tests
QA Steps
Same as testing steps.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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 and/or tagged@Expensify/designso 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
Inependent tags
Screen.Recording.2024-06-14.at.10.25.48.mov
Dependent tags
Screen.Recording.2024-06-14.at.10.25.29.mov