-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Due for payment 2025-03-31] [$250] Enable copy action on mobile for select travel details (minimally address and confirmation number) #57800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Triggered auto assignment to @strepanier03 ( |
Job added to Upwork: https://www.upwork.com/jobs/~021897065395249352167 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
@blimpich Missing the screenshot: |
Should be fixed now, @gijoe0295 can you see it now? |
🚨 Edited by proposal-police: This proposal was edited at 2025-03-06 03:37:20 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Enable copy action on mobile for select travel details (minimally address and confirmation number) What is the root cause of that problem?New feature What changes do you think we should make in order to solve the problem?We need to update App/src/pages/Travel/HotelTripDetails.tsx Lines 74 to 77 in f9c552a
For the design, we have several options: 1️⃣ Center the copy button with the content itselfIf we want to show the copy icon right next to the address text, we can leverage the Lines 256 to 265 in 533230a
titleComponent={
<CommunicationsLink value={reservation.start.address ?? ''}>
<Text style={styles.w100}>
{reservation.start.address ?? ''}
</Text>
</CommunicationsLink>
} ![]() We might want to suppress the fixed ![]() We might need further style adjustments to align the copy icon position. Maybe middle align the copy icon, or move it closer to the inner text... This needs design team confirmation. 2️⃣ Center the copy button with the entire row (and right align the icon)In App/src/components/CommunicationsLink.tsx Lines 27 to 34 in d766103
To make it middle-aligned, we can wrap it inside a ![]() 3️⃣ Show a smaller copy icon next to the push row label (or menu item's description)Introduce new props for <View style={[styles.flexRow, styles.alignItemsEnd, styles.w100]}>
<Text
style={descriptionTextStyles}
numberOfLines={numberOfLinesDescription}
>
{description}
</Text>
{shouldShowCopyIcon && !!copyValue && (
<ContextMenuItem
icon={Expensicons.Copy}
...
onPress={() => Clipboard.setString(copyValue)}
/>
)}
</View> To make the copy icon smaller, introduce We can extract the ![]() What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA - UI improvement What alternative solutions did you explore? (Optional)
In this case, we can use App/src/pages/settings/Security/TwoFactorAuth/CopyCodesPage.tsx Lines 114 to 123 in 6ba1ae6
|
I feel the copy icon should be right next to the address rather than in the top right corner of the menu item. ![]() |
Hmm good point, there are a couple cases here I hadn't considered. Lets bring a member of the design team here to get their opinion on how it should look. |
Triggered auto assignment to @dannymcclain ( |
👋 @dannymcclain hello! We have a couple questions about how this new copy functionality should look in the trip preview UI:
|
Definitely going to need @Expensify/design and specifically @shawnborton to weigh in on this one, but I think we could approach it one of two ways: Center the copy button with the entire row (and right align the icon)This does not follow the same pattern for copying a user's email from their profile, but does kinda jive with our general patterns regarding alignment. The copy button does feel a bit disconnected from the content though... Center the copy button with the content itselfThis more closely follows the pattern from profile, and seems to work pretty well with one line and multi-line content, so this is probably the way to go. I'd like a gut check from the design team, but I think this is what I would recommend. |
Oh also, for this question, I think it could go either way depending on what data we get, right? I was under the impression we didn't have much control over this. |
We definitely have the power to remove line breaks from the address in the trip preview. Adding line breaks if the address doesn't come with them would be more of a pain since we'd have to parse the address and figure out where to put them. Getting rid of them is totally doable though 👍 |
Asked here if the newline is intentional on our side or if it just happens to be how the data is coming in from Spotnana. |
Same same! 🤝
So will this be available for any read-only push row? |
I think to apply this to ALL read-only menu items are out of scope of this issue. A majority of them can be "copiable" by default but we still need to go through all the The general idea is that: Read-only menu items are marked with
const copyValue = copyValueProp ?? (!interactive && title); @blimpich It's up to you to decide whether we want to incorporate this improvement globally in this issue or to resolve them in a separate one. I'm happy with any option though. cc @ntdiary |
@dannymcclain, not sure if there was a similar definition for the So far, the information in trip detail page uses BTW, as a fundamental and widely used component, Finally, If there are no other thoughts, let's proceed with @gijoe0295's proposal. 🎀 👀 🎀 C+ reviewed |
Current assignee @blimpich is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
Lets keep is scoped to just the trip preview UI for now. And handle the rest of the read-only push rows in a different issue 👍 |
📣 @gijoe0295 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.17-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2025-03-31. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Select only one test case for regression test. Precondition:Test:
Do we agree 👍 or 👎 |
Payment summary
|
@ntdiary - Payment summary above, please feel free to request payment. @gijoe0295 - I paid and closed your Upwork contract. Thank you both for your work on this! |
$250 approved for @ntdiary |
Uh oh!
There was an error while loading. Please reload this page.
At the moment, it's not possible to copy key travel information. Minimally this is the hotel address and confirmation number, though there could be more examples. To address this issue, let's add a "copy" icon next to common travel info. This both communicates that copying is possible, and gives users a one-tap way to take that action.
Here's a screenshot of what the hotel trip details currently looks like, for reference.
Example of our copy icon used elsewhere:
Screen.Recording.2025-03-04.at.3.11.13.PM.mov
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @strepanier03The text was updated successfully, but these errors were encountered: