Skip to content

Allow to configure a top tab border color - #49313

Merged
Benjamin Pasero (bpasero) merged 5 commits into
microsoft:masterfrom
mkavidas:47867
May 10, 2018
Merged

Benjamin Pasero (bpasero) merged 5 commits into
microsoft:masterfrom
mkavidas:47867

Conversation

@mkavidas

Copy link
Copy Markdown
Contributor

darklight

Changed the color of the TAB_ACTIVE_BORDER as requested in issue #47867

@usernamehw

Copy link
Copy Markdown
Contributor

This issue is about highlighting top border of active tab, not changing the default color of bottom one.

You need to register a new color, something like tab.activeTopBorder

@mkavidas

Michael Kavidas (mkavidas) commented May 6, 2018 •

Copy link
Copy Markdown
Contributor Author

Alexander (@usernamehw) yes but in the comments I am told not to change position:

"I would accept a (minimal) PR to get this in. I do not think we can introduce positions but rather we can introduce a new color just for this purpose."

Not sure if this means change the default but I assume that is what was meant.

nvm I get it now. Will update my PR soon.

@msftclas

Microsoft Contribution License Agreements (msftclas) commented May 6, 2018 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@mkavidas

Michael Kavidas (mkavidas) commented May 6, 2018 •

Copy link
Copy Markdown
Contributor Author

Alexander (@usernamehw) Fixed. There is now an option for either a top border or a bottom border.
darktheme

@bpasero Benjamin Pasero (bpasero) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Michael Kavidas (@mkavidas) some feedback provided

if (activeTabBorderColor) {
tabContainer.style.boxShadow = `${activeTabBorderColor} 0 -1px inset`;
} else if (activeTabBorderColorTop) {
tabContainer.style.boxShadow = `${activeTabBorderColorTop} 0 2px inset`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to use 1px here to keep a similar look as the bottom border.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks for the feedback.

// color, the two colors would collide and the tab border never shows up.
// see https://github.com/Microsoft/vscode/issues/33111
const activeTabBorderColor = this.getColor(isGroupActive ? TAB_ACTIVE_BORDER : TAB_UNFOCUSED_ACTIVE_BORDER);
const activeTabBorderColorTop = this.getColor(isGroupActive ? TAB_ACTIVE_BORDER_TOP : TAB_UNFOCUSED_ACTIVE_BORDER);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic here seems weird. I think you should not fallback to TAB_UNFOCUSED_ACTIVE_BORDER because if that color was set, in the bottom if-else case the color is still not applied. I would suggest to introduce a new color TAB_UNFOCUSED_ACTIVE_BORDER_TOP to do this properly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks again for the feedback.

@bpasero Benjamin Pasero (bpasero) changed the title Add color to active border for dark and light themes Allow to configure a top tab border color May 9, 2018
@bpasero

Copy link
Copy Markdown
Contributor

Thanks 👍

@bpasero
Benjamin Pasero (bpasero) merged commit 2dc8807 into microsoft:master May 10, 2018
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants