Skip to content

[Due for payment 2026-09-04] Reduce wasted white space when editing expense/report fields (let the input grow) #96905

Closed

Description

@melvin-bot

Problem

When editing a field on an expense or report in NewDot — for example the report title — there's a lot of wasted vertical space around the input. The edit view feels sparse and the text box doesn't make good use of the available space.

This is distinct from #95564, which covers reducing scrolling on the main expense creation form. This issue is specifically about the field-editing views (e.g. editing the report title).

Proposed change

Let the input/text box grow to make better use of the space and reduce the wasted white space in the field-editing view.

Context

Raised via customer feedback (customer finds a lot of wasted space when editing things like the report title in ND). In the discussion, the team agreed we should let the text box grow, and that this needs its own issue separate from the expense-form scrolling work.

Reported in Slack.

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. trjExpensify commented on Jul 28, 2026

    @trjExpensify
    Contributor

    CC: @Expensify/design for vis.

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    ExternalAdded to denote the issue can be worked on by a contributor
    and removed on Jul 28, 2026
  3. melvin-bot commented on Jul 28, 2026

    @melvin-bot
    Author

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

  4. melvin-bot commented on Jul 28, 2026

    @melvin-bot
    Author
  5. MelvinBot commented on Jul 28, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The single-field edit pages (report title/text field, room name, expense merchant, etc.) wrap the form in styles.flexGrow1 so the form region expands to fill the whole screen, but the input inside it is a fixed single-line TextInput sitting in a non-growing <View style={styles.mb4}> wrapper. The input never grows, so all of the flexGrow1 space below it is left empty until the Save button — that's the wasted white space.

    For the report title specifically, the responsible layout is EditReportFieldText.tsx:68-89 (rendered from DynamicEditReportFieldPage.tsx:194-203). The same fixed-input pattern lives in RoomNamePage.tsx and IOURequestStepMerchant.tsx.

    The good news: TextInput already supports a grow-to-fill mode (autoGrowHeight + maxAutoGrowHeight) — see BaseTextInput/types.ts:71-90. It's simply not enabled on these pages. Sibling pages already use it: RoomDescriptionPage.tsx:128-129 and IOURequestStepDescription.tsx:219-220.

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

    Enable the existing grow mode on the field-edit inputs, mirroring the description pages that already work this way:

    1. On the input in EditReportFieldText.tsx, pass autoGrowHeight with a maxAutoGrowHeight, as done in RoomDescriptionPage/IOURequestStepDescription.
    2. If the goal is for the input to fill the entire remaining space (not just up to the default 115px cap in variables.ts:364), also make the wrapping <View style={styles.mb4}> and the input flexible (e.g. flex1) so it consumes the flexGrow1 region instead of stopping at the fixed cap.
    Investigation details & scope notes
    • FormProvider gets styles.flexGrow1 at EditReportFieldText.tsx:69, expanding to full height; the input at line 78-89 is a plain single-line TextInput (no multiline/autoGrowHeight), so it stays ~52px tall (variables.componentSizeLarge).
    • In BaseTextInput, autoGrowHeight flips the input to multiline and applies the growing container style; height clamps between a min and maxAutoGrowHeight, then scrolls above the max.
    • Open design question for @Expensify/design: a report title is conceptually one line — should it truly grow to fill the screen, or just become a taller/multiline box up to a sensible cap? This decision drives whether we use option 1 (capped grow) or option 2 (fill remaining space). The wasted-space fix is the same mechanism either way; the cap is the design call.
    • This is a frontend-only change in Expensify/App; no other repos involved.

    What alternative solutions did you explore? (Optional)

    Instead of growing the input, the layout could be top-anchored (remove flexGrow1) so the input sits naturally with content below it — but that leaves the space empty rather than using it, which is the opposite of the request. Letting the input grow (reusing the existing autoGrowHeight support) is the lower-risk, already-proven approach.


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

  6. mkhutornyi commented on Jul 29, 2026

    @mkhutornyi
    Contributor

    @MelvinBot's proposal looks good to me.
    🎀 👀 🎀 C+ reviewed

  7. melvin-bot commented on Jul 29, 2026

    @melvin-bot
    Author

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

  8. MelvinBot commented on Jul 29, 2026

    @MelvinBot
    Contributor

    Thanks for the review, mkhutornyi! 🎀

    One thing to lock down before implementation: the proposal flagged an open design decision that changes what gets built:

    • Option 1 — capped grow: enable autoGrowHeight + maxAutoGrowHeight (input grows up to a sensible cap, ~115px default). Matches how the description pages already behave.
    • Option 2 — fill remaining space: additionally make the wrapper and input flex1 so the box consumes the full flexGrow1 region down to the Save button.

    A report title is conceptually one line, so growing it to fill the entire screen may look odd — this is a call for @Expensify/design / Julesssss. The wasted-space mechanism is identical either way; only the cap differs.

    Once someone confirms which option, reply with @MelvinBot implement [this](https://github.com/Expensify/App/issues/96905#issuecomment-5110986586) and I'll open a draft PR.

  9. mkhutornyi commented on Jul 29, 2026

    @mkhutornyi
    Contributor
    • Option 1 — capped grow: enable autoGrowHeight + maxAutoGrowHeight (input grows up to a sensible cap, ~115px default). Matches how the description pages already behave.
    • Option 2 — fill remaining space: additionally make the wrapper and input flex1 so the box consumes the full flexGrow1 region down to the Save button.

    Option 1 is the production behavior on all multiline input pages so I prefer this.

    @Expensify/design which option do you prefer?

  10. 24 remaining items

  11. mkhutornyi commented on Sep 2, 2026

    @mkhutornyi
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: improvement

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/679771

    Regression Test Proposal

    Test:

    Precondition:

    • Open an expense report on a workspace where you can still edit the report title (not closed or paid)
    • Open the report and click/tap the report title in the header to open the title editor. Run cases 1-6 on every platform.

    Case 1. The box grows with the text

    1. Open the report title editor.
    2. Type a title long enough to wrap onto a second and then a third line.
    3. Verify the box grows taller as the text wraps.
    4. Keep typing until the text is about 5 lines long.
    5. Verify the box stops growing at around 4 lines and starts scrolling inside itself.

    Case 2. Enter saves the title

    1. Open the report title editor and type a new title.
    2. Press Enter (on a phone or tablet, press the go key on the keyboard).
    3. Verify no new line is added inside the box.
    4. Verify the editor closes and the new title appears in the report header.
    5. Reopen the editor and verify the new title is still there.

    Case 3. Shift+Enter also saves (desktop web only)

    1. Open the report title editor and type a new title.
    2. Hold Shift and press Enter.
    3. Verify no new line is added and the title saves, exactly as in Case 2.

    Case 4. Pasting text that spans several lines

    1. Copy two or three lines of text from anywhere (a chat message, a document).
    2. Paste it into the title box. It may appear as several lines while you are editing - that is expected.
    3. Press Save.
    4. Verify the saved title is a single line, with each line break replaced by a space.
    5. Verify the report header shows that same single-line title.

    5. Editing a long title that already exists

    1. Save a title long enough to fill more than 4 lines (about 200 characters).
    2. Reopen the title editor.
    3. Verify the box opens showing the end of the text, with the cursor after the last character - not at the beginning.

    Do we agree 👍 or 👎


    The linked 2 deploy blockers are not regressions. Reasoning:

    Zapier Logs Run ID: 00040eee-affe-ac48-df50-763550629fa4
  12. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Sep 2, 2026
  13. melvin-bot commented on Sep 3, 2026

    @melvin-bot
    Author

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  14. melvin-bot commented on Sep 3, 2026

    @melvin-bot
    Author

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  15. mallenexpensify commented on Sep 8, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @mkhutornyi due $250 via NewDot

  16. trjExpensify commented on Sep 17, 2026

    @trjExpensify
    Contributor

    approved $250 for @mkhutornyi

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions