Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Top tab border wrong size with Pinned Tab Sizing shrink when scrolling/wrapping #194202

Closed
bpasero opened this issue Sep 26, 2023 · 6 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded workbench-tabs VS Code editor tab issues

Comments

@bpasero
Copy link
Member

bpasero commented Sep 26, 2023

Testing #193991

Enable workbench.editor.highlightModifiedTabs and make a pinned editor dirty. Notice how the blue color appears over the entire tab bar:

Image

VS in stable:

Image

@bpasero bpasero added the workbench-tabs VS Code editor tab issues label Sep 26, 2023
@benibenj benibenj changed the title Highlighted modified tab shows border over all tab stripe Highlighted modified tab shows border over all tab stripe with Pinned Tab Sizing shrink Sep 27, 2023
@benibenj benibenj changed the title Highlighted modified tab shows border over all tab stripe with Pinned Tab Sizing shrink Active tab shows border over all tab stripe with Pinned Tab Sizing shrink Sep 27, 2023
@benibenj
Copy link
Contributor

My investigation: workbench.editor.highlightModifiedTabs is not causing this but the pinned tab sizing. It causes the tabBorderTopContainer to have the wrong width only when the tab bar starts scrolling/wrapping. Not sure how having two tab rows is causing this. Still working on it...

@benibenj benibenj changed the title Active tab shows border over all tab stripe with Pinned Tab Sizing shrink Top tab border wrong size with Pinned Tab Sizing shrink when scrolling/wrapping Sep 27, 2023
@benibenj
Copy link
Contributor

So the bug is actually also in stable, however, it's likelier to occur when using the two tab bars feature.

@benibenj
Copy link
Contributor

benibenj commented Sep 27, 2023

I believe that position static is causing the problem. .tab-border-top-container has width 100% and is set to position absolute (left: 0;), .tab is set to position relative. However, when .tab changes to position static, the reference point changes and the left:0; doesn't point to the left of the tab but the entire tab container as well as the width...

@bpasero
Copy link
Member Author

bpasero commented Sep 27, 2023

Hm, from my memory position: static is to let pinned tabs stay positioned even when a scrollbar is needed. In that case, essentially all unpinned tabs would scroll "under" the pinned tabs.

But when tabs wrap, I believe we would not need position: static at all unless there are so many tabs that we fallback to scrolling.

Were you able to reproduce when only 1 tab bar shows?

@benibenj
Copy link
Contributor

This is stable release

Image

@bpasero
Copy link
Member Author

bpasero commented Sep 27, 2023

Wow! I wonder why nobody reported this so far 🤔

@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Sep 28, 2023
@bpasero bpasero added this to the September 2023 milestone Sep 28, 2023
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Sep 28, 2023
@roblourens roblourens added the verified Verification succeeded label Sep 28, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests

4 participants