fix: don't reserve space for attach button when upload is disabled#257
Merged
Conversation
When enableUpload is false, the attach button is not rendered, but the input was still applying padding-left: 36px unconditionally. Use :has(.shiny-chat-btn-attach) to only add left padding when the button is actually present. Closes #256
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.
Problem
When
allow_attachmentsis not set (the default), the chat input was still reservingpadding-left: 36pxon the text field — the same space used by the attach button when uploads are enabled. This left a visible gap on the left side of the input with no button to fill it.Closes #256
Fix
The unconditional
padding-left: 36pxon.tiptapis replaced with a:has(.shiny-chat-btn-attach)rule, so left padding is only applied when the attach button is actually rendered in the DOM.Also removes the dead
textarearule inside.shiny-chat-input—textareawas replaced by Tiptap in #251 and the CSS was never cleaned up.