UX: Auto-resize the AI bot docked composer with content#39837
Merged
SamSaffron merged 5 commits intomainfrom May 10, 2026
Merged
UX: Auto-resize the AI bot docked composer with content#39837SamSaffron merged 5 commits intomainfrom
SamSaffron merged 5 commits intomainfrom
Conversation
Adds an `@autoResize` mode to the shared `DockedComposer` so the input grows with its content up to a viewport-bounded max height instead of requiring a manual resize handle. The textarea path uses CSS `field-sizing: content` (with a JS fallback for older browsers), while the rich editor relies on a capped `max-height` with internal scroll. The AI bot docked composer adopts the new mode and drops its custom resize-handle styling. The `--docked-composer-max-resize-offset` custom property is now kept in sync on viewport and window resize so the cap tracks available space on mobile keyboards. Internally renames `textarea` to `inputElement` since the reference can now point at either a `<textarea>` or the ProseMirror contenteditable.
Member
Author
|
@patch-triage can you rebase? |
# Conflicts: # frontend/discourse/app/components/docked-composer.gjs # plugins/discourse-ai/assets/javascripts/discourse/components/ai-bot-docked-composer.gjs
Member
Author
|
@patch-triage ... fix linting |
Contributor
|
Applied suggestions and committed the fix. Fix indentation linting in docked composer components
|
Member
Author
|
@patch-triage oh my ... previous commit utf-8 mangled some lines fix that |
Contributor
|
Could not apply all suggestions:
|
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.
Adds an
@autoResizemode to the sharedDockedComposerso the inputgrows with its content up to a viewport-bounded max height instead of
requiring a manual resize handle. The textarea path uses CSS
field-sizing: content(with a JS fallback for older browsers), whilethe rich editor relies on a capped
max-heightwith internal scroll.The AI bot docked composer adopts the new mode and drops its custom
resize-handle styling. The
--docked-composer-max-resize-offsetcustomproperty is now kept in sync on viewport and window resize so the cap
tracks available space on mobile keyboards.
Internally renames
textareatoinputElementsince the reference cannow point at either a
<textarea>or the ProseMirror contenteditable.