Skip to content

[Payment due @abzokhattab] Add Share to the report More menu - #103141

Merged
mollfpr merged 32 commits into
Expensify:mainfrom
allgandalf:share-report-more-menu
Oct 16, 2026
Merged

mollfpr merged 32 commits into
Expensify:mainfrom
allgandalf:share-report-more-menu

Conversation

@allgandalf

@allgandalf allgandalf commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Adds Share to the report More menu, with Share report, Share code, Refer a friend and Copy URL under it. Share report opens a page to pick one person and emails them the report. It shows on submitted expense reports for the submitter, the approver and workspace admins.

Fixed Issues

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

Tests

  1. Open a submitted expense report as the submitter
  2. Click More > Share and verify Share report, Share code, Refer a friend and Copy URL are listed
  3. Click Share report, pick a contact or type an email that has no Expensify account, then click Share report
  4. Verify the page closes and that person gets an email with the report PDF attached
  5. Click More > Share > Copy URL and verify the report link is on the clipboard
  6. Click More > Share > Share code and verify the share code page opens
  7. Click More > Share > Refer a friend and verify the Refer a friend page opens
  8. Open a draft report and verify More > Share has no Share report option
  • Verify that no errors appear in the JS console

Offline tests

  1. Go offline, open a submitted expense report and share it with More > Share > Share report
  2. Go back online and verify the email arrives

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 verified any copy / text that was added to the app 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 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 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.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@melvin-bot

melvin-bot Bot commented Oct 6, 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

@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
src/CONST/index.ts 95.90% <ø> (ø)
src/ROUTES.ts 32.23% <100.00%> (+0.40%) ⬆️
src/SCREENS.ts 100.00% <ø> (ø)
src/libs/API/types.ts 100.00% <ø> (ø)
src/libs/Navigation/linkingConfig/config.ts 62.50% <ø> (ø)
src/libs/PopoverMenuSections.ts 100.00% <ø> (ø)
src/libs/ReportSecondaryActionUtils.ts 96.36% <100.00%> (+<0.01%) ⬆️
src/libs/ReportUtils.ts 88.67% <100.00%> (+0.09%) ⬆️
src/libs/actions/Report/index.ts 73.30% <100.00%> (+0.23%) ⬆️
src/pages/inbox/report/withReportOrNotFound.tsx 100.00% <ø> (ø)
... and 6 more
... and 474 files with indirect coverage changes

# Conflicts:
#	src/components/MoneyReportHeaderActions/MoneyReportHeaderSecondaryActions.tsx
#	src/libs/PopoverMenuSections.ts
# Conflicts:
#	src/components/MoneyReportHeaderActions/MoneyReportHeaderSecondaryActions.tsx
#	src/libs/PopoverMenuSections.ts
@allgandalf
allgandalf marked this pull request as ready for review October 10, 2026 05:23
@allgandalf
allgandalf requested review from a team as code owners October 10, 2026 05:23
@melvin-bot
melvin-bot Bot requested review from abzokhattab and trjExpensify and removed request for a team October 10, 2026 05:23
@allgandalf

Copy link
Copy Markdown
Contributor Author

done here, Share code from the Share menu shows only the QR code now

@allgandalf

Copy link
Copy Markdown
Contributor Author

@abzokhattab can you test for the ^ please

@allgandalf

This comment has been minimized.

@abzokhattab

Copy link
Copy Markdown
Contributor

Thanks for tackling it, i am reviewing now

@abzokhattab

abzokhattab commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Question:

When the user is offline, the Report shared badge still shows immediately even though API.write only queues the request. The report hasn't actually been shared yet .. the user could close the app thinking it was shared and the request might never reach the backend. What should be the expected UI state in this case?

Screen.Recording.2026-10-14.at.13.06.28.mov

@allgandalf

Copy link
Copy Markdown
Contributor Author

it's expected, the share is saved and sent once they're back online, even if they close the app, same as approving or submitting offline

@abzokhattab

Copy link
Copy Markdown
Contributor

I see ... the changes LGTM .. also updated the screenshots

@mollfpr
mollfpr merged commit 364fb3d into Expensify:main Oct 16, 2026
36 of 38 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

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

@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

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/mollfpr in version: 9.5.13-0 🚀

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

@MelvinBot

MelvinBot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Help site update needed. I opened a draft docs PR: Docs updates for E/A#103141 Add Share to report More menu actions table

Why: This PR adds a new feature. The More menu now has a Share option for all users, with no beta check. The "Additional report actions available from the More menu" table in Expense and Report Actions lists the More menu actions, but it doesn't include Share.

Change: The docs PR adds one row for Share to that table. The row covers Share code, Refer a friend, and Copy URL, plus Share report for the submitter, approver, and workspace admin on expense reports that aren't Draft. I checked these labels against the dev web build.

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


view run · view recording

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/grgia in version: 9.5.13-6 🚀

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

Bundle Size Analysis (Sentry):

@melvin-bot

melvin-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

🤖 Payment issue created: #104380

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.

7 participants