fix: terminal progress display overflow#322041
Open
arnavnagzirkar wants to merge 2 commits into
Open
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @anthonykim1Matched files:
|
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
When the terminal panel is moved to the right side, the
single-terminal-tabaction item (showing the terminal icon + title + progress) is rendered in the panel's title bar action bar.Root cause
When the terminal panel is moved to the right side, the
single-terminal-tabaction item (showing the terminal icon + title + progress) is rendered in the panel's title bar action bar. The parentactions-containerusesjustify-content: flex-end(via.pane-composite-part > .title.has-composite-bar > .title-actions .monaco-action-bar .actions-container), meaning items are right-aligned.With the action item using
flex: 0 1 auto(the CSS default), it is sized at its content width (which can be very long when progress content is included in the terminal label). When positioned at the right end of the container, the wide item overflows to the left, past the container boundary. Because no ancestor container hasoverflow: hidden, this left overflow is fully visible - the label protrudes over the composite bar (panel tab buttons), causing the display overflow.What changed
File:
src/vs/workbench/contrib/terminal/browser/media/terminal.cssThree changes:
.monaco-action-bar .action-item:has(> .single-terminal-tab)rule with:flex: 1- makes the item grow to fill available space instead of sizing to content width, eliminating the overflowmin-width: 0- allows the item to shrink below content sizeoverflow: hidden- clips item content when constrainedoverflow: hiddenandmin-width: 0to.monaco-action-bar .action-item .single-terminal-tabso the label element itself also clips its flex content (icons + text).With
flex: 1, the single-terminal-tab item fills available space from the left; there is no free space remaining forjustify-content: flex-endto cause a left overflow. Long progress content is clipped byoverflow: hiddenat the allocated width.Issue
Fixes #312970
Issue: #312970
Diffstat
Testing
Ran the relevant tests and linter for the changed files while developing.
Kept the change minimal and focused on this one issue.
AI assistance
I used GitHub Copilot to help write parts of this change. I've reviewed and tested it myself, I understand what it does, and I'll follow up on any review feedback.