-
Notifications
You must be signed in to change notification settings - Fork 4k
[feat] Simplify chat input UI with single-row layout for basic configurations #13364
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
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ PR preview is ready!
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
📈 Frontend coverage change detectedThe frontend unit test (vitest) coverage has increased by 0.0100%
✅ Coverage change is within normal range. |
frontend/lib/src/components/widgets/ChatInput/styled-components.ts
Outdated
Show resolved
Hide resolved
9f7b924 to
47699c8
Compare
1cab02f to
8ceac1f
Compare
ef12af3 to
a96a229
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR simplifies the ChatInput component UI by introducing a single-row layout for basic configurations where neither file upload nor audio recording features are enabled. The change reduces the component's height and visual complexity in these common use cases.
Key changes:
- Added
isSimpleModecondition to detect when simplified layout should be used - Created new
StyledSimpleRowcomponent for single-row layout with textarea and send button side-by-side - Added three new theme size variables for consistent sizing across chat input elements
- Updated button sizing to use new theme variables instead of hardcoded values
Reviewed changes
Copilot reviewed 3 out of 274 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
frontend/lib/src/theme/primitives/sizes.ts |
Added three new size constants for chat input: textarea min height, button size, and vertical offset |
frontend/lib/src/components/widgets/ChatInput/styled-components.ts |
Removed gap from StyledChatInput, added StyledSimpleRow component, updated button sizing, adjusted InputInstructions positioning |
frontend/lib/src/components/widgets/ChatInput/ChatInput.tsx |
Added isSimpleMode logic and conditional rendering for simple vs. extended layouts with duplicated textarea configuration |
e2e_playwright/__snapshots__/**/*.png |
Updated visual regression test snapshots to reflect new simplified UI layout |
a5b8c4a to
2a6cc22
Compare
2a6cc22 to
06fd5ca
Compare
SummaryThis PR refactors the Code QualityOverall the refactor is clear and maintainable:
Nits / small maintainability notes:
Test Coverage
E2E best-practices note: since snapshot churn is large, it’s worth ensuring the screenshots remain as small/specific as possible (element-level where feasible) to reduce future maintenance (per Backwards Compatibility
Security & Risk
Recommendations
VerdictAPPROVED: The refactor is clean, uses semantic sizing tokens, and the snapshot updates appear consistent with a UI-only change; only minor maintainability follow-ups are suggested. This is an automated AI review. Please verify the feedback and use your judgment. |
sfc-gh-bnisco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spot-checked the snapshots and they look good and expected. One minor styled-component suggestion inline, but LGTM after!
06fd5ca to
8bf0ca7
Compare
- Move mic button to right side (next to send button) - Reduce send button size from 40px to 32px - Reduce textarea min height from 40px to 24px - Add conditional single-row layout when no file/audio features - Add semantic theme values: chatInputTextareaMinHeight, chatInputPrimaryButtonSize
- Remove conditional single-row layout (was making height 73px instead of target 104px) - Keep two-row layout with reduced sizes: - Send button: 32px (was 40px) - Textarea min-height: 24px (was 40px) - Mic button remains on right side in action row - Revert character counter position to original
- Simple mode (no file upload, no audio): single-row layout with textarea and send button side by side - Extended mode (with file upload or audio): two-row layout with content area and action row - Mic button stays on right side in extended mode
…roper vertical centering
- Add chatInputButtonVerticalOffset theme size for button centering - Use flex-end with margin offset to center button in simple mode - Move character counter up to avoid button overlap - Remove gap between content and action row in extended mode
8bf0ca7 to
1bed6b2
Compare

Describe your changes
Simplified the ChatInput component UI by implementing a single-row layout for basic use cases. When neither file upload nor audio recording features are enabled, the component now displays a cleaner interface with the textarea and send button side-by-side in a single row, rather than the more complex two-row layout with separate action areas. This also makes it take up less height in that particular case.
Key improvements:
isSimpleModecondition that activates when no file upload or audio features are neededStyledSimpleRowcomponent for the simplified layoutScreenshot or video (only for visual changes)
The PR updates numerous snapshot tests to reflect the new simplified UI for the chat input component.
Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.