Prevent upload button from overlaying textarea content#8740
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Reworked it: the input border/background now lives on |
There was a problem hiding this comment.
Pull request overview
Adjusts webview comment textarea styling so the upload button no longer overlays scrolled content, by moving the “input chrome” to the wrapper and reserving a dedicated button strip. Also updates a proposed VS Code type definition to add a workingDirectory option for language model tool invocation metadata.
Changes:
- Reworks
.textarea-wrapper/textareastyling in editor and activity bar webviews to prevent the upload button from covering text/caret while scrolling. - Tweaks upload button positioning (
bottom: 4px) to align with the newly reserved strip. - Adds
workingDirectory?: Urito proposed chat participant tool invocation option types.
Show a summary per file
| File | Description |
|---|---|
| webviews/editorWebview/index.css | Moves textarea border/background to .textarea-wrapper, reserves bottom strip for upload button, removes textarea padding hack. |
| webviews/activityBarView/index.css | Mirrors the wrapper/textarea styling change for activity bar comment forms. |
| src/@types/vscode.proposed.chatParticipantPrivate.d.ts | Adds workingDirectory?: Uri to LM tool invocation option interfaces. |
Copilot's findings
- Files reviewed: 2/3 changed files
- Comments generated: 2
Bug Fix
What was the bug?
The cloud-upload button in comment textareas was absolutely positioned inside the textarea (
left: 6px; bottom: 8px), with apadding-bottom: 32pxworkaround meant to reserve space. Once the textarea scrolled, content rendered under the icon — overlaying the cursor and any text near the bottom-left.How did you fix it?
Move the visual "input" chrome from the
<textarea>onto.textarea-wrapperand reserve a strip at the bottom of the wrapper for the upload button. The textarea now physically occupies only the wrapper's content area, so text and the caret can never reach the button row, while the button still appears inside the textarea's visual border (one "line" below where typing stops).webviews/activityBarView/index.cssandwebviews/editorWebview/index.css:.textarea-wrapper: holds the visual border, background, border-radius, and a:focus-withinoutline; addspadding-bottom: 28pxto reserve the button area..textarea-wrapper textarea: borderless / transparent background /outline: none, fills the wrapper's content area only..comment-upload-button:position: absolute; left: 6px; bottom: 4px;inside the reserved bottom strip.padding-bottom: 32pxhack on the textarea (no longer needed)..title-action(top-right generate button) is unaffected — it remains absolutely positioned relative to the wrapper.Testing
Manually verify in both the activity bar comment form and the editor webview comment/edit forms that:
title-action(generate) button still renders in place.