Add copyable functionality to various components#71899
Conversation
Codecov Report❌ Patch coverage is
... and 24 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@dukenv0307 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] |
|
@ShridharGoel Did you update the PR to fix the comment here? |
|
Yes, but the videos need to be updated. |
| return <ReportActionsSkeletonView />; | ||
| } | ||
|
|
||
| function getAttendeesTitle() { |
| onPressIn={() => shouldBlockSelection && shouldUseNarrowLayout && canUseTouchScreen() && ControlSelection.block()} | ||
| onPressOut={ControlSelection.unblock} | ||
| onSecondaryInteraction={copyable && !deviceHasHoverSupport ? secondaryInteraction : onSecondaryInteraction} | ||
| onSecondaryInteraction={copyable ? secondaryInteraction : onSecondaryInteraction} |
There was a problem hiding this comment.
Any reason for this change? Why don't we keep it as it is?
There was a problem hiding this comment.
We should be keeping it after the latest discussion. Updated.
|
@ShridharGoel I think we can create the variable for copyValue and use !!copyValue for copyable to prevent the duplications |
|
Can you please update the test steps with the expected behavior as well |
|
Is it correct to enable copyable for all read-only fields? Screen.Recording.2025-10-10.at.00.27.58.mov |
|
|
I think in general, that holds up. But we are definitely going to find some cases where we might not want/need it. Can you maybe share some more examples? Or maybe it can't hurt to try it as default behavior and then we can see how it feels from there (via an adhoc build)? cc @dubielzyk-expensify too |
|
It has been added to the following places (when they are read-only): MoneyRequestView page: WorkspaceOverviewPage: |
|
Yeah I could see it being ok for any read-only field, but like Shawn said, we might find some that don't need it / shouldn't have it. I'd be down to try it though. |
|
@dukenv0307 Updated. |
| selection: copyValue, | ||
| contextMenuAnchor: popoverAnchor.current, | ||
| }); | ||
| if (!deviceHasHoverSupport) { |
There was a problem hiding this comment.
Shouldn't be needed now, since we have restored the !deviceHasHoverSupport condition at the calling place
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-10-12.at.23.57.03.movAndroid: mWeb ChromeScreen.Recording.2025-10-12.at.23.52.24.moviOS: HybridAppScreen.Recording.2025-10-13.at.00.04.08.moviOS: mWeb SafariScreen.Recording.2025-10-12.at.23.53.22.movMacOS: Chrome / SafariScreen.Recording.2025-10-12.at.23.50.34.movMacOS: DesktopScreen.Recording.2025-10-12.at.23.59.41.mov |
|
Let us know when we should run a test build 👍 |
|
@dubielzyk-expensify Yeah we can start an Adhoc build |
|
Cool, I'll fire one up now. |
|
🚧 @shawnborton 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, Desktop, and Web. Happy testing! 🧪🧪
|
|
Feels pretty good to me: CleanShot.2025-10-13.at.10.05.02.mp4 |
|
@dukenv0307 Can you complete the review when possible? |
|
all yours @youssef-lr |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.2.33-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.33-4 🚀
|
| brickRoadIndicator={getErrorForField('comment') ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined} | ||
| errorText={getErrorForField('comment')} | ||
| numberOfLinesTitle={0} | ||
| copyValue={descriptionCopyValue} |
There was a problem hiding this comment.
Coming from #72826, descriptionCopyValue should be converted from html to text
Explanation of Change
Add copyable functionality to various components.
Fixed Issues
$ #71454
PROPOSAL: #71454 (comment)
Tests
Offline tests
QA Steps
Same.
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
Screen.Recording.2025-10-06.at.8.34.18.PM.mov
Android: mWeb Chrome
Screen.Recording.2025-10-06.at.8.36.15.PM.mov
iOS: Native
Simulator.Screen.Recording.-.iPhone.16.Plus.-.2025-10-06.at.20.38.48.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.16.Plus.-.2025-10-06.at.20.10.41.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-10-09.at.2.01.06.PM.mov
MacOS: Desktop
Screen.Recording.2025-10-09.at.2.10.40.PM.mov