Skip to content

Fix: make company card CSV import help links reliably tappable on Android - #99783

Merged
youssef-lr merged 11 commits into
mainfrom
youssef-fixCompanyCardImportGuideLinkTappable
Aug 28, 2026
Merged

youssef-lr merged 11 commits into
mainfrom
youssef-fixCompanyCardImportGuideLinkTappable

Conversation

@youssef-lr

@youssef-lr youssef-lr commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Fixes the deploy blocker where the inline "help guide" (and "Download our template") links on the company-card CSV import step were not tappable on Android at the minimum device font size.

The help text was rendered as a single <Text> with two bare <TextLink> children nested inline. On Android, a link nested inside a <Text> becomes a native ClickableSpan whose touch area is limited to the glyph bounds, so it can become unreliable to tap (reproduced at the minimum device font size). This is the same rendering an <a> gets through RenderHTML for non-comment links, so switching back to RenderHTML would not have fixed it — and RenderHTML can't invoke the client-side template download that #98058 requires.

This change keeps both links inline (preserving the inline template link required by #98058) but renders each link as its own PressableWithoutFeedback, which gives it a real native touch target. The surrounding copy is split into words inside a flexWrap row so the paragraph still flows and wraps naturally. This mirrors the existing TextLinkBlock approach already used in the app for reliably tappable link text.

Fixed Issues

$ #99719
PROPOSAL:

Tests

  1. On Android, set device font size to minimum.
  2. Launch Expensify app.
  3. Go to Workspace settings > Company cards.
  4. Tap Add cards.
  5. Select United States > Next.
  6. Select Import transactions from files > Next.
  7. Tap "guide" in the Help guide link. Verify it opens the help guide.
  8. Tap "Download our template" link. Verify it downloads the CSV template.
  9. Verify the surrounding paragraph still reads and wraps normally.
  • Verify that no errors appear in the JS console

Offline 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

Screen.Recording.2026-08-28.at.20.37.33.mov

MelvinBot and others added 9 commits August 28, 2026 03:33
…roid

Co-authored-by: Nyoman Jyotisa <nyomanjyotisa@users.noreply.github.com>
Co-authored-by: Nyoman Jyotisa <nyomanjyotisa@users.noreply.github.com>
Co-authored-by: Nyoman Jyotisa <nyomanjyotisa@users.noreply.github.com>
Co-authored-by: Nyoman Jyotisa <nyomanjyotisa@users.noreply.github.com>
Co-authored-by: Nyoman Jyotisa <nyomanjyotisa@users.noreply.github.com>
…ink coverage

Co-authored-by: Nyoman Jyotisa <nyomanjyotisa@users.noreply.github.com>
Co-authored-by: Nyoman Jyotisa <nyomanjyotisa@users.noreply.github.com>
…oc header

Co-authored-by: Nyoman Jyotisa <nyomanjyotisa@users.noreply.github.com>
Co-authored-by: Nyoman Jyotisa <nyomanjyotisa@users.noreply.github.com>
@youssef-lr
youssef-lr requested review from a team as code owners August 28, 2026 18:39
@melvin-bot
melvin-bot Bot requested a review from nyomanjyotisa August 28, 2026 18:39
@melvin-bot

melvin-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

@nyomanjyotisa 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 JmillsExpensify and removed request for a team August 28, 2026 18:39
@youssef-lr

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 1f8e1e8c9b

ℹ️ 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".

…spaced locales

Split spliced comment sentence. Hide per-word Text nodes from accessibility
and expose one screen-reader-only node per run so TalkBack announces coherent
prose instead of per-word nodes. Replace whitespace regex with
Intl.Segmenter word segmentation so locales without spaces (ja, zh-hans) get
real break points and wrap within the run.
@youssef-lr

Copy link
Copy Markdown
Contributor Author

Working on getting my android emulator running

@codecov

codecov Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
...rkspace/companyCards/addNew/ImportFromFileStep.tsx 96.07% <100.00%> (+91.42%) ⬆️
...ges/workspace/companyCards/addNew/WrappingText.tsx 100.00% <100.00%> (ø)
... and 128 files with indirect coverage changes

@youssef-lr

Copy link
Copy Markdown
Contributor Author
image PR is currently crashing. Debugging now.

Hermes doesn't implement Intl.Segmenter, causing a render crash
(undefined cannot be used as a constructor) on the company-card CSV
import screen. Fall back to a whitespace split that preserves the
same segment structure.
@AndrewGable

AndrewGable commented Aug 28, 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

@youssef-lr
youssef-lr merged commit b45b324 into main Aug 28, 2026
43 of 44 checks passed
@youssef-lr
youssef-lr deleted the youssef-fixCompanyCardImportGuideLinkTappable branch August 28, 2026 20:45
@github-actions

Copy link
Copy Markdown
Contributor

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

OSBotify pushed a commit that referenced this pull request Aug 28, 2026
…GuideLinkTappable

Fix: make company card CSV import help links reliably tappable on Android
(cherry picked from commit b45b324)

(cherry-picked to staging by AndrewGable)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Aug 28, 2026
@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify OSBotify mentioned this pull request Aug 28, 2026
65 tasks done
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 9.4.63-1 🚀

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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/AndrewGable in version: 9.4.63-1 🚀

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

Bundle Size Analysis (Sentry):

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site changes are required for this PR, so I did not create a docs PR.

This PR only changes how the existing help text is rendered — it swaps the two inline <TextLink> children for PressableWithoutFeedback nodes inside a flexWrap row so they get real native touch targets on Android. No translation strings changed, no steps changed, and no user-facing behavior changed. The links still do exactly what they did before: src/languages/en.ts:6041-6047 is untouched by the diff.

The flow is already documented at Import Company Card Transactions From a Spreadsheet, and nothing in that article is invalidated by this change.


Separate finding: three stale labels in that article

While verifying labels against the live UI, I found three capitalization/wording mismatches in the same article. These are pre-existing and unrelated to this PR — they were not introduced here, so I left them out rather than shipping them under a Docs updates for E/A#99783 title.

Article text Actual UI label Source
"Company Cards" (steps 2, 20, 53, 67) Company cards verified in UI + en.ts:4712
"Add card" / "Add Card" (step 3) Add cards verified in UI + en.ts:6026
"Add card" sub-bullet is also numbered wrong (3 → 5, skipping 4) — formatting

"Import transactions from file" in step 5 is correct (en.ts:6039).

Reply with @MelvinBot fix those labels too and I'll open a separate draft docs PR for them.


UI verification detail

I drove the web app to confirm the labels rather than trusting the article. Result: partial — the first two labels and the More features toggle were confirmed, but the flow hit an account-validation magic-code gate on "Add cards", which needs email inbox access I don't have. The remaining two labels were confirmed from en.ts instead.

Step Status Observation
Exact label of workspace company cards menu item pass Tab and page heading both render "Company cards"
Exact label of the add-card button pass Button reads "Add cards" (plural)
Exact label of the import-from-file option fail (UI) Blocked by validate-account magic code screen; confirmed from en.ts:6039 as "Import transactions from file"
Exact wording of the CSV import help paragraph fail (UI) Same blocker; confirmed unchanged from en.ts:6041-6047
Exact label of the More features toggle pass "Company cards" with subtitle "Connect the cards you already have."
Evidence (3)

Workspace More features page showing the Company cards toggle

Workspace More features page showing the Company cards toggle

Workspace Company cards page showing the Add cards button

Workspace Company cards page showing the Add cards button

Account validation magic-code screen that blocked further progress

Account validation magic-code screen that blocked further progress

view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 9.4.64-0 🚀

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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/francoisl in version: 9.4.64-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

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants