Add share option to saved searches overflow menu#88768
Conversation
|
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 |
ee0bd6c to
dda5591
Compare
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.
|
|
@jayeshmangwani 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] |
50d0704 to
0429426
Compare
|
I will review this today. I was OOO, sorry for the delay. |
|
@aswin-s I initially faced a crash when opening the Spend tab. I suspect the change from |
|
The Share text
|
|
@jayeshmangwani Good catch! The confirmation state now matches the Context Menu:
Saved Search:
@shawnborton Quick question: should we add an exclamation mark after "Copied" to match the context menu's "Copied!" text? |
|
Yeah, that makes sense to me. cc @Expensify/marketing for viz on that but let's do it! |
|
And yes, I agree we want the styles/colors to exactly match what we have for the Copy text action. |
|
@aswin-s, checkbox icon should be green. Also, I think that once the Share button is pressed and ‘URL copied’ appears, the modal should close automatically after ~2 seconds. |
970903e to
7efb7e8
Compare
|
@jayeshmangwani I've updated the implementation to replicate the ContextMenu behaviour for consistency
So the green checkmark shown in the issue video is not how the existing ContextMenu pattern works. |
|
Also looks like typecheck is failing on main branch. It is unrelated to our changes. |
|
@aswin-s Can we also close the modal on mobile devices? Also, can we mobile-bug.mov |
bc8af4d to
94750ff
Compare
|
@jayeshmangwani Fixed the native experience as well and updated the videos for all devices in OP. Rebased with main but the fix for typescript lint has not landed yet. |
- Remove useCallback from useShareSavedSearch hook (React Compiler handles memoization) - Move shouldCloseModalOnSelect check into PopoverMenu to avoid duplication - Remove redundant guards from ThreeDotsMenu and SearchTypeMenuNarrow callers
… state Matches context menu copy pattern: grey checkmark icon with black label text.
…e menu close logic
00d5a20 to
9eb891f
Compare
…and guard ThreeDotsMenu hide Restores the onItemSelected call in PopoverMenu's shouldCloseModalOnSelect===false branch to preserve generic behaviour for all callers (e.g. ButtonWithDropdownMenu). Guards ThreeDotsMenu.hidePopoverMenu against shouldCloseModalOnSelect===false so the menu stays open for items like Copy Link, matching the existing shouldKeepModalOpen pattern.
…election Guard onItemSelected in SearchTypeMenuNarrow to not close the popover when shouldCloseModalOnSelect is false, matching the same pattern used in ButtonWithDropdownMenu and ThreeDotsMenu.
|
@jayeshmangwani Fixed everything and rebased with main. |
|
@aswin-s , everything looks good to me. Could you please add the Slack link for the translation confirmation? |
|
@jayeshmangwani Added translation request here. Yet to get a confirmation. |
|
@jayeshmangwani Re-requested the translation and it is approved. https://expensify.slack.com/archives/C01GTK53T8Q/p1778527194871009 |
|
Thanks for confirming the translation. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @aldo-expensify 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/aldo-expensify in version: 9.3.73-0 🚀
Bundle Size Analysis (Sentry): |
|
Yes, the help site needs a minor update. The article Using-Reports-in-New-Expensify.md describes saved search management actions (rename, delete) but doesn't mention the new Share option. I've created a draft PR with the update: #90427 Changes made:
|
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.3.73-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.73-4 🚀
|






Explanation of Change
Adds a Share option to the saved searches overflow menu (both in the wide layout
SavedSearchListand narrow layoutSearchTypeMenuNarrow). Tapping Share copies the search URL to the clipboard and briefly shows a "URL copied" confirmation with a checkmark icon for 1.8 seconds. The menu stays open during the feedback so the user can see the confirmation.Fixed Issues
$ #87627
PROPOSAL: #87627 (comment)
Tests
Offline tests
The share action only copies a URL to the clipboard — no network requests are made. Behavior is identical offline.
QA Steps
Same as tests above.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
88768-android-native.mp4
Android: mWeb Chrome
88768-android-web.mp4
iOS: Native
8878-ios-native.mp4
iOS: mWeb Safari
8878-ios-web.mp4
MacOS: Chrome / Safari
88768-MacOS.mp4