Skip to content

[$250] Misaligned Arrow Icons in Trip Summary #61740

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

Open
2 of 16 tasks
m-natarajan opened this issue May 8, 2025 · 21 comments
Open
2 of 16 tasks

[$250] Misaligned Arrow Icons in Trip Summary #61740

m-natarajan opened this issue May 8, 2025 · 21 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented May 8, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number:
Reproducible in staging?: Needs Reproduction
Reproducible in production?: Needs Reproduction
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @coleaeason
Slack conversation (hyperlinked to channel name): #Travel

Action Performed:

  1. Book a rails round trip between Seattle King Street Station and Portland Union Station.
  2. Open the policy expense chat with the trip summary.
  3. Locate the arrows next to sections.
  4. Observe the misalignment.

Expected Result:

Arrows should be vertically and horizontally aligned

Actual Result:

Arrows appear off-center or misaligned

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021920839738421141603
  • Upwork Job ID: 1920839738421141603
  • Last Price Increase: 2025-05-09
  • Automatic offers:
    • twilight2294 | Contributor | 107280110
Issue OwnerCurrent Issue Owner: @twilight2294
@m-natarajan m-natarajan added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels May 8, 2025
Copy link

melvin-bot bot commented May 8, 2025

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@ChavdaSachin
Copy link
Contributor

ChavdaSachin commented May 8, 2025

Proposal

Please re-state the problem that we are trying to solve in this issue.

Misaligned Arrow Icons in Trip Summary

What is the root cause of that problem?

Arrow icon not centered.
The icon may look vertically misaligned but it is not, it is only horizontally misaligned.

What changes do you think we should make in order to solve the problem?

Add additional styles here to horizontally center the arrow.

    additionalStyles={styles.alignSelfCenter}

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

NA

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

Copy link
Contributor

github-actions bot commented May 8, 2025

⚠️ @ChavdaSachin Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

@bfitzexpensify
Copy link
Contributor

cc @Expensify/design - kinda looks like we have set this to always be a certain distance away from the destination station, but perhaps we should have it equidistant between the departure and destination stations?

Not 100% sure where we set this - perhaps in https://github.com/Expensify/Expensify/issues/390709?

@dannymcclain
Copy link
Contributor

Yeah I kinda feel like each location (start and stop) should have equal width and the arrow should sit perfectly in between them. That way the arrows should always line up down the center. Does that make sense?

@rlinoz rlinoz added External Added to denote the issue can be worked on by a contributor and removed Needs Reproduction Reproducible steps needed labels May 9, 2025
Copy link

melvin-bot bot commented May 9, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021920839738421141603

@melvin-bot melvin-bot bot changed the title Misaligned Arrow Icons in Trip Summary [$250] Misaligned Arrow Icons in Trip Summary May 9, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 9, 2025
Copy link

melvin-bot bot commented May 9, 2025

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (External)

@shawnborton
Copy link
Contributor

That makes sense to me, and then maybe we truncate after 2 lines for both the left and right sides of the arrow? I think we'll eventually revisit this design entirely but I think that's a good path forward for now.

@khhamdan
Copy link

khhamdan commented May 9, 2025

Please re-state the problem that we are trying to solve in this issue.

The arrow icon between the origin and destination station names in the Trip Summary is not vertically aligned with the text. This misalignment creates a visually unbalanced look across platforms, particularly noticeable on mobile and web.

What is the root cause of that problem?
The root cause is that the arrow icon is placed inside a layout that does not ensure vertical alignment with the text, likely due to missing alignment styles. This causes the icon to shift slightly above or below the text baseline, depending on the platform.

What changes do you think we should make in order to solve the problem?
We should ensure the origin text, arrow icon, and destination text are all placed inside a horizontal layout that centers its children vertically. This will align the icon with the surrounding text and create a consistent look across platforms. Spacing around the icon should be added to maintain visual clarity.

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

Ensure the layout aligns all elements (origin, arrow, and destination) correctly across web, iOS, and Android.

Snapshot tests to catch visual regressions.

Responsive layout checks with varying station name lengths.

Tests for different font sizes and system accessibility settings.

Visual confirmation that the layout remains consistent in RTL (right-to-left) locales.

What alternative solutions did you explore? (Optional)

I considered using inline text formatting or inserting a Unicode arrow directly within the text. However, this approach didn’t offer precise control over alignment and spacing, and results varied across platforms. A more flexible layout approach is the better solution.

Copy link

melvin-bot bot commented May 9, 2025

📣 @khhamdan! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@khhamdan
Copy link

khhamdan commented May 9, 2025

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~0163d4f5809e5a5b45

Copy link

melvin-bot bot commented May 9, 2025

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@twilight2294
Copy link
Contributor

twilight2294 commented May 10, 2025

Proposal

Please re-state the problem that we are trying to solve in this issue.

Misaligned Arrow Icons in Trip Summary.

What is the root cause of that problem?

Currently we use flexShrink1 to display the text:

<Text style={[styles.labelStrong, styles.flexShrink1]}>{startName}</Text>

This causes the text to spread, this is the RCA, we don't have any way to align the items propperly

What changes do you think we should make in order to solve the problem?

According to the comments from design team here and here, we should update the styling a bit:

<Text style={[styles.labelStrong, styles.flexShrink1]}>{startName}</Text>

        titleComponent = (
            <View style={[styles.flexRow, styles.alignItemsCenter]}>
                <View style={[styles.flex1, styles.flexRow]}>
                    <Text
                        style={[styles.labelStrong]}
                        numberOfLines={2}
                    >
                        {startName}
                    </Text>
                </View>

                <View
                    style={{
                        width: variables.iconSizeSmall + 8, // icon width + some margin (adjust as needed)
                        alignItems: 'center',
                        justifyContent: 'center',
                    }}
                >
                    <Icon
                        src={Expensicons.ArrowRightLong}
                        width={variables.iconSizeSmall}
                        height={variables.iconSizeSmall}
                        fill={theme.icon}
                    />
                </View>

                <View style={[styles.flex1, styles.flexRow, styles.justifyContentEnd]}>
                    <Text
                        style={[styles.labelStrong, styles.textAlignRight]}
                        numberOfLines={2}
                    >
                        {endName}
                    </Text>
                </View>
            </View>
        );

Image

we can render the previous code for flight details and this current code for train details specifically, if we want both of them to be separate. minor design changes can be done during PR phase

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A ui bug

What alternative solutions did you explore? (Optional)

N/A

@RitvikSh
Copy link

is this issue resolved?

Copy link

melvin-bot bot commented May 11, 2025

📣 @RitvikSh! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@Ollyws
Copy link
Contributor

Ollyws commented May 11, 2025

@twilight2294's proposal LGTM.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented May 11, 2025

Triggered auto assignment to @rafecolton, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@dubielzyk-expensify
Copy link
Contributor

That makes sense to me, and then maybe we truncate after 2 lines for both the left and right sides of the arrow? I think we'll eventually revisit this design entirely but I think that's a good path forward for now.

I like that idea 👍

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 12, 2025
Copy link

melvin-bot bot commented May 12, 2025

📣 @twilight2294 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels May 13, 2025
@twilight2294
Copy link
Contributor

PR ready for review @Ollyws

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Development

No branches or pull requests