Repository navigation
Fix: Tags description "You're using dependent tags..." has a distorted view - #82218
Conversation
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.
|
| <RenderHTML | ||
| html={ | ||
| hasDependentTags | ||
| ? `<muted-text>${translate('workspace.tags.subtitle')} ${translate( |
There was a problem hiding this comment.
❌ CONSISTENCY-2 (docs)
The string literals '<muted-text>' and '</muted-text>' are hardcoded magic strings used multiple times in the HTML construction logic. These should be defined as named constants to improve code maintainability and prevent inconsistencies.
Suggested fix:
const MUTED_TEXT_TAG = '<muted-text>'as const;
const MUTED_TEXT_CLOSING_TAG = '</muted-text>'as const;
// Then use in the function:
hasDependentTags
? `${MUTED_TEXT_TAG}${translate('workspace.tags.subtitle')} ${translate(
'workspace.tags.dependentMultiLevelTagsSubtitle',
isQuickSettingsFlow
? `${environmentURL}/${ROUTES.SETTINGS_TAGS_IMPORT.getRoute(policyID, ROUTES.SETTINGS_TAGS_ROOT.getRoute(policyID, backTo))}`
: `${environmentURL}/${ROUTES.WORKSPACE_TAGS_IMPORT_OPTIONS.getRoute(policyID)}`,
)
.replace(MUTED_TEXT_TAG, '')
.replace(MUTED_TEXT_CLOSING_TAG, '')}</muted-text>`
: `${MUTED_TEXT_TAG}${translate('workspace.tags.subtitle')}${MUTED_TEXT_CLOSING_TAG}`Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
| <RenderHTML | ||
| html={ | ||
| hasDependentTags | ||
| ? `<muted-text>${translate('workspace.tags.subtitle')} ${translate( |
There was a problem hiding this comment.
This is against our philosophy. See https://github.com/Expensify/App/blob/main/contributingGuides/philosophies/INTERNATIONALIZATION.md#--string-concatenation-should-not-be-used-for-translations.
subtitle and dependentMultiLevelTagsSubtitle should be merged into one translation
There was a problem hiding this comment.
Got it, I've updated the PR and re-tested the changes
|
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 |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.mov |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good from product 👍
|
This is ready for final approve and merge. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @NikkiWines has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/NikkiWines in version: 9.3.20-0 🚀
|
[CP Staging] Revert "Merge pull request #82218 from nyomanjyotisa/issue-70991"
…nyomanjyotisa/issue-70991""
…t-82218 Revert "[CP Staging] Revert "Merge pull request #82218 from nyomanjyotisa/issue-70991""
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.20-6 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.20-6 🚀
|


Explanation of Change
Restructured the subtitle rendering to use
RenderHTMLwithin aViewfor all cases, combining subtitle texts into a single HTML string when dependent tags are present.Fixed Issues
$ #70991
PROPOSAL: #70991 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.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
Android-Native.mp4
Android: mWeb Chrome
Android-mWeb.Chrome.mp4
iOS: Native
iOS-Native.mp4
iOS: mWeb Safari
iOS-mWeb.Safari.mp4
MacOS: Chrome / Safari
MacOS-Chrome.mp4