Skip to content

Expense - Long email is centered in description field #93068

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.4.1-4
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #92776
Email or phone of affected tester (no customers): jsodinjosdjsoinjsiojs@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense with long email or long link as description - sdsidjsdsoidnjsoidjso@gmail.com
  4. Open the expense.

Expected Result:

Long email will be left-aligned in description field.

Actual Result:

Long email is centered in description field.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Image
Bug7175955_1781009041343.11.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7175955

Activity

  1. applause-bot commented on Jun 9, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/e7b7ea7f0f7dff00b7b01e9453f2625ada021e5a32a1e7be66eb6061c6682455

  2. added
    DeployBlockerCash
    Bug
    on Jun 9, 2026
  3. melvin-bot commented on Jun 9, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #92776

  4. melvin-bot commented on Jun 9, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jun 9, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. MelvinBot commented on Jun 9, 2026

    @MelvinBot
    Contributor

    Proposal

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

    When an expense's description is a single long auto-linked email/URL (e.g. sdsidjsdsoidnjsoidjso@gmail.com), opening the expense shows the wrapped description centered instead of left-aligned.

    This is a follow-on regression from #92776 (the PR this issue auto-assigned for). That PR fixed the same centering bug for chat message rows but did not cover the expense description field, which is a separate render surface.

    What is the root cause of that problem?

    Same mechanism as the original regression (#92668), in a new surface:

    1. #92776 removed styles.dInlineFlex from comment anchors in AnchorRenderer.tsx, which exposed a pre-existing inherited text-align: center.
    2. The description renders via MenuItemWithTopDescription with shouldRenderAsHTML → MenuItem. The wrapping PressableWithSecondaryInteraction defaults to role="button", which react-native-web renders as a native <button>. The browser UA stylesheet sets text-align: center on <button>, and text-align is inherited.
    3. The HTML title branch wraps <RenderHTML> in a plain <View> — not a <Text>. RNW <Text> always emits a textAlign reset; <View> does not. With no resetting <Text> between the <button> and the anchor, the inherited center cascades to the wrapped second line. (The sibling non-HTML branch uses <Text>, so it's unaffected.)
    Evidence / cascade chain (verified by code read)
    PressableWithSecondaryInteraction (role=button → <button>, source of center)  MenuItem.tsx:851
      └── View … View (no textAlign anywhere)                                       MenuItem.tsx:888-1020
          └── View style={styles.renderHTMLTitle}  (no textAlign)                   MenuItem.tsx:1025
              └── RenderHTML                                                        MenuItem.tsx:1026
                  └── AnchorForCommentsOnly → Text (wrapped 2nd line inherits center)
    

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

    Recommended (fixes the whole class, prevents the next whack-a-mole): reset alignment once in MenuItem's HTML title branch, mirroring what the <Text> branch already does implicitly. Add styles.textAlignLeft to the <View> wrapping <RenderHTML> at MenuItem.tsx:1025:

    <View style={[styles.renderHTMLTitle, styles.textAlignLeft]}>
        <RenderHTML html={processedTitle} />
    </View>

    This protects every shouldRenderAsHTML MenuItem (description, and other fields that render HTML) from the same regression — important because this exact bug has already regressed twice (#92668 chat rows, now #93068 description).

    What alternative solutions did you explore?

    Most surgical (deploy-blocker-only): add styles.textAlignLeft to the description item's wrapperStyle at MoneyRequestView.tsx:1041, exactly matching the #92776 pattern:

    wrapperStyle={[styles.pv2, styles.taskDescriptionMenuItem, styles.textAlignLeft]}

    This fixes only this issue but leaves other HTML-rendering MenuItems exposed to the same root cause.

    Confidence: High — fully verified by static code read; this is a purely client-side CSS-cascade issue, so no production logs are needed.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/93068) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. added
    Reviewing
    on Jun 9, 2026
  8. Beamanator commented on Jun 9, 2026

    @Beamanator
    Contributor

    Revert merged, working on CPing

  9. m-natarajan commented on Jun 9, 2026

    @m-natarajan

    Not repro, Win 11/Chrome, v9.4.1-5

    Recording.2989.mp4
  10. Beamanator commented on Jun 9, 2026

    @Beamanator
    Contributor

    great! closing!

  11. removed
    DeployBlockerCash
    on Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugEngineeringHourlyReviewing

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions