Skip to content

Shorten commuter exclusion option copy - #100211

Merged
Gonals merged 2 commits into
Expensify:mainfrom
fedirjh:fix/shorten-commuter-exclusion-copy
Sep 4, 2026
Merged

Gonals merged 2 commits into
Expensify:mainfrom
fedirjh:fix/shorten-commuter-exclusion-copy

Conversation

@fedirjh

@fedirjh fedirjh commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

The commuter exclusion option descriptions are truncated after two lines, preventing users from seeing the full explanation. This shortens the option names and supporting text across all supported languages so the explanations remain visible.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/676565
PROPOSAL:

Tests

Preconditions: Use an account with commuter exclusion beta enabled

  1. Open a workspace.
  2. Go to More features → Distance rates → Exclude commutes.
  3. Verify the options use the shortened names and supporting text.
  4. Verify each option's supporting text is fully visible within two lines.
New option name New supporting text
Do not exclude commute No commute is removed from claims.
Exclude usual commute Subtracts each member's regular commute based on their home, work arrangement, and office.
Remove fixed distance Subtracts the same distance from every claim.
  • Verify that no errors appear in the JS console

Offline tests

Same as Tests.

QA Steps

Same as Tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native Screenshot 2026-09-02 at 8 04 32 PM Screenshot 2026-09-02 at 8 04 42 PM Screenshot 2026-09-02 at 8 07 24 PM
MacOS: Chrome / Safari Screenshot 2026-09-02 at 7 43 42 PM Screenshot 2026-09-02 at 7 43 45 PM Screenshot 2026-09-02 at 7 43 55 PM Screenshot 2026-09-02 at 7 44 08 PM

@melvin-bot

melvin-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

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 bun ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx bun ./scripts/generateTranslations.ts --compare-ref main

@fedirjh
fedirjh marked this pull request as ready for review September 2, 2026 19:09
@fedirjh
fedirjh requested review from a team as code owners September 2, 2026 19:09
@melvin-bot
melvin-bot Bot requested review from Krishna2323 and removed request for a team September 2, 2026 19:09
@melvin-bot

melvin-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

@Krishna2323 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]

@melvin-bot
melvin-bot Bot requested review from garrettmknight and removed request for a team September 2, 2026 19:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T19:24:18.424451Z 0d911d2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@fedirjh
fedirjh removed the request for review from Krishna2323 September 2, 2026 19:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d911d232b

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/languages/en.ts
optionHomeAndOfficeHelp: 'Use member’s home address, work arrangement, and office assignment to calculate commute exclusions.',
optionFixedDistanceTitle: 'Remove fixed distance',
optionFixedDistanceHelp: 'Subtracts the same distance from every claim.',
optionHomeAndOfficeTitle: 'Exclude usual commute',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Rename the address warning with the option

When a workspace has no address, choosing this renamed row triggers the workspaceAddressRequired modal, but its prompt still says the user cannot enable the “calculate by home and office” setting; the corresponding prompts in the other locales retain their old names as well. Since no option now has that name, users receive an error referring to a different setting, so update these prompts alongside the option rename.

Useful? React with 👍 / 👎.

Comment thread src/languages/fr.ts
optionHomeAndOfficeTitle: 'Calculer par domicile et bureau',
optionHomeAndOfficeHelp: 'Utiliser l’adresse personnelle du membre, son mode de travail et son affectation de bureau pour calculer les exclusions de trajet.',
optionHomeAndOfficeTitle: 'Exclure le trajet domicile-travail habituel',
optionHomeAndOfficeHelp: 'Soustrait le trajet domicile-travail habituel de chaque membre en fonction de son domicile, de son mode de travail et de son bureau.',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the French help text within two lines

In the French locale this replacement remains truncated: PolicyCommuterExclusionsPage limits alternate text to two lines, and BaseSelectListItem caps its width at 303 px, while this sentence is approximately 754 px wide at the default 13 px Expensify Neue size and therefore requires at least three lines. It is also slightly wider than the text it replaces, so it does not resolve the reported visibility problem for French users.

Useful? React with 👍 / 👎.

Comment thread src/languages/de.ts
summaryDisabled: 'Kein Ausschluss von Pendelstrecken',
summaryFixedDistance: ({distance, unit}: {distance: number; unit: string}) => `${distance} ${unit} pro Abrechnung ausschließen`,
optionDisabledTitle: 'Pendelfahrten nicht ausschließen',
optionDisabledTitle: 'Pendlerpauschale nicht ausschließen',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Refer to the commute rather than the commuter allowance

For German users, Pendlerpauschale denotes the commuter tax allowance rather than the commute distance that this disabled mode stops subtracting. The resulting title describes preserving a tax allowance while both the helper text and the actual behavior concern commute trips, so use a commute term such as Pendelfahrt or Arbeitsweg here.

Useful? React with 👍 / 👎.

@garrettmknight garrettmknight left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🚧 JmillsExpensify has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@JmillsExpensify JmillsExpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much more legible. Thank you!

Image

@Gonals

Gonals commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari

@Gonals
Gonals merged commit 6362753 into Expensify:main Sep 4, 2026
41 of 48 checks passed
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🚧 Gonals has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/Gonals in version: 9.4.73-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 failure ❌

@fedirjh
fedirjh deleted the fix/shorten-commuter-exclusion-copy branch September 7, 2026 11:07
@MelvinBot

Copy link
Copy Markdown
Contributor

No help site changes are required for this PR

This is a copy-only change to the Exclude commutes option names and supporting text. There is nothing to update in App/docs/articles, so I did not create a draft docs PR.

Three reasons:

  1. No help article documents this feature. Searching App/docs/articles for commut, exclude commute, fixed distance, and home and office returns no match for the Exclude commutes setting. The only hit for "commut" anywhere in docs/ is an unrelated Expensify Classic expense category list in docs/articles/expensify-classic/workspaces/Expense-Settings.md:123. The New Expensify article docs/articles/new-expensify/workspaces/Set-distance-rates.md covers adding rates, tax tracking, effective dates, and Auto-update government rate — it never mentions commute exclusion. So none of the strings this PR changed appear in the help site, old or new.

  2. No behavior changed. The diff touches only src/languages/*.ts. No new setting, no navigation change, no plan or permission change — nothing a help article would need to describe differently.

  3. The feature is still beta-gated. The row is rendered behind CONST.BETAS.COMMUTER_EXCLUSIONS at src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx:79 and :258. Documenting a beta on the public help site would show customers a setting most of them can't see.


One in-app copy mismatch worth fixing

Not a docs issue, but this PR renamed the option and left a reference to the old name behind:

src/languages/en.ts:7560-7561 still tells the user:

Exclude commutes needs route data, so map or GPS distance is always required while it's on. To change this setting, set Exclude Commutes to "Do not exclude commutes".

The option is now Do not exclude commute (singular). That quoted instruction no longer matches any label in the UI, so a user following it looks for an option that doesn't exist. It also renders Exclude Commutes in title case, while the setting is Exclude commutes. Worth updating in the other locales too, since each has its own copy of this string.


When this will need a help article

Once commuterExclusions leaves beta, Exclude commutes will need its own article under docs/articles/new-expensify/workspaces/ — it has three exclusion methods, a workspace office-address prerequisite, and it forces map or GPS distance while enabled. That is new-article work rather than an update this PR triggers, so it belongs in a separate HelpDot issue rather than a docs PR tied to a copy tweak. Happy to draft it if you'd like — just say the word and confirm whether it should publish before GA.

What I checked
  • Full PR diff: 11 src/languages/*.ts files (de, el, en, es, fr, it, ja, nl, pl, pt-BR, zh-hans). No source, component, or docs files touched.
  • grep -ril "commut" docs/ → one unrelated Expensify Classic match.
  • grep -rn -i "exclude a fixed distance|calculate by home|home and office|fixed distance|exclude commute" docs/ → no matches.
  • Distance-related articles reviewed: new-expensify/workspaces/Set-distance-rates.md, new-expensify/reports-and-expenses/Distance-Expenses.md, expensify-classic/workspaces/Set-time-and-distance-rates.md.
  • Searched Expensify/App for an existing commuter-exclusion docs PR or HelpDot issue → none open.

I did not run a UI verification pass, since the option labels are gated behind the commuterExclusions beta and no docs copy depended on them.


@fedirjh, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review

@OSBotify

OSBotify commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.4.73-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants