Skip to content

Workspace - Upgrade success description is left-aligned when RHP is resized to wide #105269

Open

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.24-5
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #104573
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • Enable resizableRHP beta
  1. Go to staging.new.expensify.com
  2. Create a Collect workspace.
  3. Go to workspace settings > Overview.
  4. Click Plan type.
  5. Select Control.
  6. Click Save.
  7. Resize RHP to wide.

Expected Result:

Upgrade success description should be centered.

Actual Result:

Upgrade success description is left-aligned when RHP is resized to wide.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7298924_1793202411519.8.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7298924

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 28, 2026
  2. melvin-bot commented on Oct 28, 2026

    @melvin-bot

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

  3. melvin-bot commented on Oct 28, 2026

    @melvin-bot

    @JS00001 @Krishna2323 you have been assigned to this deploy blocker because you reviewed the offending PR: #104573

  4. melvin-bot commented on Oct 28, 2026

    @melvin-bot

    @war-in you have been assigned to this deploy blocker because you authored the offending PR: #104573

  5. melvin-bot commented on Oct 28, 2026

    @melvin-bot

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

  6. github-actions commented on Oct 28, 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.
  7. war-in commented on Oct 28, 2026

    @war-in
    Contributor

    Enable resizableRHP beta

    @JS00001 we have another one 😄 could you demote? 🙏

  8. MelvinBot commented on Oct 28, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Investigation

    Causing PR: [Resizable RHP] Basic drag logic (high confidence). It added the resizableRHP beta and the drag-to-widen behavior, so this bug can't happen without it.

    Recommendation: Demote and fix as a follow-up. Don't revert. The bug is cosmetic, only shows with the resizableRHP beta on, and only after a manual drag on desktop. Reverting would remove the whole beta feature (34 files).

    Candidate fix (not yet tested in a browser): in UpgradeConfirmation.tsx:56, center the description wrapper, for example by adding styles.alignItemsCenter.

    Investigation details

    Next Steps: An internal engineer should decide whether to remove DeployBlockerCash. Reply with @MelvinBot <your feedback> to refine this analysis.


    view run

  9. JS00001 commented on Oct 28, 2026

    @JS00001
    Contributor

    behind a beta

  10. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Oct 28, 2026
  11. apoorv-xs commented on Oct 28, 2026

    @apoorv-xs

    Proposal

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

    In Workspace Settings > Overview, when upgrading a workspace from Collect to Control and resizing the Right Hand Panel (RHP) to wide, the upgrade confirmation description ("You've successfully upgraded [Workspace] to the Control plan! View your subscription for more details.") is left-aligned instead of centered.

    What is the root cause of that problem?

    In src/pages/workspace/upgrade/UpgradeConfirmation.tsx, while specific upgrade variations (isCategorizing, isReporting, isTravelUpgrade, isDistanceRateUpgrade) render with <Text style={[styles.textAlignCenter, styles.w100]}>, the general plan upgrade flow renders HTML via <RenderHTML> inside:

    <View style={[styles.renderHTML, styles.w100]}>
        <RenderHTML html={translate('workspace.upgrade.completed.successMessage', policyName, planName ?? translate('workspace.type.control'), subscriptionLink)} />
    </View>

    The wrapper <View> is missing styles.textAlignCenter and styles.alignItemsCenter. When the RHP expands to a wide width, the styles.w100 container stretches across the modal, but its contents remain left-aligned.

    Additionally, in src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx, the custom <centered-text> tag is defined as:

    'centered-text': HTMLElementModel.fromCustomModel({
        tagName: 'centered-text',
        mixedUAStyles: {...styles.textAlignCenter},
        contentModel: HTMLContentModel.block,
    }),

    Because defaultViewProps in BaseHTMLEngineProvider enforces styles.alignItemsStart on block elements, a block element without styles.alignItemsCenter and styles.w100 is positioned at the flex-start (left) of the container.

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

    1. In src/pages/workspace/upgrade/UpgradeConfirmation.tsx, add styles.textAlignCenter and styles.alignItemsCenter to the wrapper <View> around <RenderHTML>:
    <View style={[styles.renderHTML, styles.textAlignCenter, styles.alignItemsCenter, styles.w100]}>
        <RenderHTML html={translate('workspace.upgrade.completed.successMessage', policyName, planName ?? translate('workspace.type.control'), subscriptionLink)} />
    </View>

    This matches the existing standard used in WorkspaceConnectionsPage.tsx and WorkspaceTagsPage.tsx.

    1. In src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx, enhance the custom model for centered-text to include styles.alignItemsCenter and styles.w100:
    'centered-text': HTMLElementModel.fromCustomModel({
        tagName: 'centered-text',
        mixedUAStyles: {...styles.textAlignCenter, ...styles.alignItemsCenter, ...styles.w100},
        contentModel: HTMLContentModel.block,
    }),

    What alternative solutions did you explore? (Optional)

    Changing contentModel of centered-text to HTMLContentModel.textual was explored. However, <centered-text> is frequently used in locales and outcome screens wrapped around or containing other custom block tags (such as <muted-text>), so maintaining HTMLContentModel.block with explicit flex centering and full width is safer and avoids invalid HTML content-model nesting.

    What automated tests can you add to prevent this from re-occurring?

    Add a unit test in tests/ui/UpgradeConfirmationTest.tsx verifying that the container rendered for the HTML description contains styles.textAlignCenter and styles.alignItemsCenter.

    Contributor details:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions