Reorganize UI controls and improve form interactions#500
Merged
mostlygeek merged 2 commits intomainfrom Feb 1, 2026
Merged
Conversation
Move clear buttons to bottom bar for consistent UI across playground tabs. - Images: move clear button next to Generate, also clears prompt text - Transcription: move clear button next to Transcribe - ExpandableTextarea: make expand icon visible on mobile (opacity-60) - ExpandableTextarea: fix cursor jumping to end on mobile by using untrack https://claude.ai/code/session_01XvnL5FJF4fBRNh9oKXSYrm
WalkthroughThis PR reorganizes UI elements across three playground components. Clear buttons are relocated from control areas to action areas in AudioInterface and ImageInterface, with updated disable logic in the latter. ExpandableTextarea refactors its focus handler using Svelte's untrack and adjusts button opacity styling. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
rohitpaul
pushed a commit
to rohitpaul/llama-swap
that referenced
this pull request
Mar 29, 2026
Reorganizes control placement in the playground interfaces and improves form interactions for better UX, particularly on mobile devices. ## Key Changes - **AudioInterface & ImageInterface**: Moved "Clear" buttons from the top control bar into the action button group below the form inputs for better visual hierarchy and logical grouping - **ImageInterface**: - Added prompt clearing to the `clearImage()` function so the input field is reset when clearing generated images - Updated Clear button disabled state to also check if prompt is empty, allowing users to clear an empty prompt - Added responsive flex styling (`flex-1 md:flex-none`) to the Clear button for better mobile layout - **ExpandableTextarea**: - Imported `untrack` from Svelte to properly handle reactive dependencies - Wrapped `expandedValue.length` in `untrack()` to prevent unnecessary reactivity when setting cursor position - Improved button visibility on mobile by changing opacity from `opacity-0` to `opacity-60` with `md:opacity-0` breakpoint, making the expand button more discoverable on touch devices ## Implementation Details The `untrack()` usage in ExpandableTextarea ensures that reading the text length doesn't create a reactive dependency, preventing potential infinite loops while still allowing the effect to run when `isExpanded` changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR reorganizes control placement in the playground interfaces and improves form interactions for better UX, particularly on mobile devices.
Key Changes
clearImage()function so the input field is reset when clearing generated imagesflex-1 md:flex-none) to the Clear button for better mobile layoutuntrackfrom Svelte to properly handle reactive dependenciesexpandedValue.lengthinuntrack()to prevent unnecessary reactivity when setting cursor positionopacity-0toopacity-60withmd:opacity-0breakpoint, making the expand button more discoverable on touch devicesImplementation Details
The
untrack()usage in ExpandableTextarea ensures that reading the text length doesn't create a reactive dependency, preventing potential infinite loops while still allowing the effect to run whenisExpandedchanges.https://claude.ai/code/session_01XvnL5FJF4fBRNh9oKXSYrm
Summary by CodeRabbit
Style
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.