Remove text label from Add Context button in chat input, show only centered paperclip icon#267160
Conversation
…ip icon Co-authored-by: eli-w-king <201316543+eli-w-king@users.noreply.github.com>
Co-authored-by: eli-w-king <201316543+eli-w-king@users.noreply.github.com>
|
@copilot the paperclip icon is not centered in the button, everything else looks and works great! |
…n-label element Co-authored-by: eli-w-king <201316543+eli-w-king@users.noreply.github.com>
Fixed the icon centering issue in commit 6df1207. The problem was that the CSS was targeting the wrong DOM element - it needed to target the |
|
@copilot now the heights of the attach button and attached context are misaligned. the height of the square button should match the height of attached context. they should remain alinged, the size of the attach button must increase |
Co-authored-by: eli-w-king <201316543+eli-w-king@users.noreply.github.com>
Fixed the height alignment issue in commit e6280ec. The problem was a box-sizing mismatch - the attached context items use the default content-box sizing (18px content + 2px borders = 20px total), while my button was using border-box sizing (18px total including borders). Increased the button size to 20x20px to match the attached context items' visual height. |
Summary
Successfully modified the 'Add Context' button in VS Code's chat input to remove the text label and show only the paperclip icon as requested.
Changes Made
Modified AddFilesButton class in
src/vs/workbench/contrib/chat/browser/chatInputPart.ts:icon: false, label: truetoicon: true, label: falseupdateLabel()method that was manually rendering icon + textrenderLabelWithIcons,assertType)Updated CSS styling in
src/vs/workbench/contrib/chat/browser/media/chat.css:.action-label)align-items: centerandjustify-content: centeron the label element!importantdeclarations to override conflicting stylesPreserved functionality and accessibility:
workbench.action.chat.attachContext)Technical Details
.action-item.chat-attachment-button .action-labelruleVisual Result
The button now appears as a clean 20x20px square with:
The changes address both the centering and height alignment issues while preserving all existing functionality.
Created from VS Code via the GitHub Pull Request extension.
Created from VS Code via the GitHub Pull Request extension.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.