Add tag GL code display in tag picker - #97094
Conversation
Mirror the category GL code pattern with a showTagGLCodes policy toggle, picker alternateText rendering, GL code search, and SetPolicyShowTagGLCodes API action.
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
@DylanDylann 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec4795bbb8
ℹ️ 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".
Capture prior showTagGLCodes value on API failure, dedupe GL code stripping in PolicyUtils, remove redundant useCallback, and add workspace.tags.showTagGLCodes to all locale files.
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@DylanDylann we need a backend change - |
|
@blimpich Could you handle the required backend changes? ☝️ |
|
Sure, but for future reference this should've been handled probably from the beginning if we knew this was gonna need backend work. @flaviadefaria I would've asked a backend contributor to do the necessary work before tagging this |
|
Backend PRs are in review. Should be merged and deployed probably by Friday? |
Explanation of Change
This PR adds the ability for admins to display tag GL codes when selecting a tag in the tag picker
Changes include:
showTagGLCodespolicy flag andSetPolicyShowTagGLCodesAPI action with optimistic update / failure rollbackgetGLCodeFromPolicyTagandgetPolicyTagGLCodehelpers inPolicyUtils.tsTagsOptionsListUtilsto render GL codes asalternateText(muted second line) and include GL codes intokenizedSearchTagPickerto read!!policy?.showTagGLCodes && !!policy?.glCodesand passshouldShowGLCodedownWorkspaceTagsSettingsPage, gated onpolicy.glCodesPolicyTagTest,PolicyUtilsTest, andTagsOptionsListUtilsTestBackend dependency: This PR requires a backend
SetPolicyShowTagGLCodescommand (same pattern as category GL codes). Until the backend is deployed, toggling the setting on will optimistically show GL codes briefly, then roll back with an error when the API call fails.Fixed Issues
$ #96390
PROPOSAL: #96390 (comment)
Tests
policy.glCodesis enabled)SetPolicyShowTagGLCodesis deployed; GL codes still appear optimistically for a few seconds)Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-07-27.at.6.21.04.PM.mov