Hide top-level required tag toggle for independent multi-level tags#94760
Hide top-level required tag toggle for independent multi-level tags#94760MobileMage wants to merge 1 commit into
Conversation
|
@Eskalifer1 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f67aec50d9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| /> | ||
| </OfflineWithFeedback> | ||
| )} | ||
| {(!isMultiLevelTags || hasDependentTags) && ( |
There was a problem hiding this comment.
Keep global required flag clearable for independent tags
When an independent multi-level workspace already has policy.requiresTag === true (for example from the previously visible switch, or from the Rules require-fields flow which still calls setPolicyRequiresTag in src/pages/workspace/rules/RulesRequireFieldsPage.tsx:82-83), hiding this row leaves that global flag active while users only see per-list Required switches. The expense flow still ORs each list's required with policy.requiresTag in getTagVisibility (src/libs/TagsOptionsListUtils.ts:215-216) and violation recalculation still treats policy.requiresTag as requiring tags (src/libs/Violations/ViolationsUtils.ts:457-463), so every independent level can remain required even after the visible per-level switches are off; please clear/ignore the global flag for independent tags, or keep this control visible while it is on.
Useful? React with 👍 / 👎.
Explanation of Change
On Workspace → Tags → Settings, the top-level "Members must tag all expenses" (
requiresTag) toggle was shown for independent multi-level tags, where it should not appear — for independent multi-level tags the Required setting is configured per level inside each tag list's RHP, matching Expensify Classic. Per the agreed behavior in the issue:This change gates the top-level toggle in
WorkspaceTagsSettingsPagewith(!isMultiLevelTags || hasDependentTags), usinghasDependentTagsfromPolicyUtils. The per-level toggle on the individual tag-list page is already gated correctly and is left unchanged.Fixed Issues
$ #93731
PROPOSAL: #93731 (comment)
Tests
Prerequisite: a Control-plan workspace as an admin, with Tags enabled. Creating multi-level tags requires importing a CSV spreadsheet.
Offline tests
QA Steps
On staging as an admin on a Control-plan workspace with Tags enabled:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
Kapture.2026-06-27.at.06.15.09.mp4
Android: mWeb Chrome
iOS: Native
Kapture.2026-06-26.at.20.29.18.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
Kapture.2026-06-25.at.15.39.52.mp4