Skip to content

fix(activity-feed-v2): cap task message textarea at 6 rows#4691

Merged
tjuanitas merged 1 commit into
box:masterfrom
jackiejou:task-modal-v2-message-max-rows
Jul 10, 2026
Merged

fix(activity-feed-v2): cap task message textarea at 6 rows#4691
tjuanitas merged 1 commit into
box:masterfrom
jackiejou:task-modal-v2-message-max-rows

Conversation

@jackiejou

@jackiejou jackiejou commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

In the task modal v2, a long message with many line breaks grew the message textarea without bound, pushing the modal footer buttons out of view.

The Blueprint TextArea autosize supports a maxRows cap: the field grows up to the cap and then scrolls internally. Added maxRows={6} to the task message field (minRows={3} unchanged). Six rows matches the effective cap on the v1 task form, which limits the same field with max-height: 140px in TaskForm.scss.

Testing

  • yarn test --watchAll=false --testPathPattern="task-modal-v2" - 4 suites, 65 tests passed.
  • The grow-then-scroll behavior itself is implemented and tested in @box/blueprint-web and is not observable in jsdom, so no new unit test; verified visually that the textarea stops growing at 6 rows and scrolls, keeping the footer buttons in view.

Summary by CodeRabbit

  • Improvements
    • Limited the task message field to six visible rows for a more compact form layout.

@jackiejou
jackiejou requested review from a team as code owners July 10, 2026 20:51
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5d37a2f2-bc07-4fc5-8bdf-d3590e16e0b1

📥 Commits

Reviewing files that changed from the base of the PR and between 8a818a6 and 823313d.

📒 Files selected for processing (1)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx

Walkthrough

The task message TextArea in TaskFormV2 now uses maxRows={6}, limiting its rendered height while preserving existing form behavior.

Changes

Task message layout

Layer / File(s) Summary
Limit task message rows
src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx
The task message TextArea now caps its rendered height at six rows.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: zhirongwang, jmcbgaston, jpan-box

Poem

I’m a rabbit with rows to spare,
Six neat lines now fit with care.
The message grows, then gently stays,
No towering box on busy days.
Hop, hop—form height finds its place!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: capping the task message textarea at six rows.
Description check ✅ Passed The description explains the issue, the fix, and testing results, so it is sufficiently complete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tjuanitas
tjuanitas merged commit b6ebe89 into box:master Jul 10, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants