Skip to content

Allow to configure a top tab border color #49313

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

Merged
merged 5 commits into from
May 10, 2018
Merged

Allow to configure a top tab border color #49313

merged 5 commits into from
May 10, 2018

Conversation

mkavidas
Copy link
Contributor

@mkavidas mkavidas commented May 6, 2018

darklight

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

@usernamehw
Copy link
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
Copy link
Contributor Author

mkavidas commented May 6, 2018

@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
Copy link

msftclas commented May 6, 2018

CLA assistant check
All CLA requirements met.

@mkavidas
Copy link
Contributor Author

mkavidas commented May 6, 2018

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

@bpasero bpasero added this to the May 2018 milestone May 7, 2018
Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

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

@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
Member

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
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.

@@ -333,8 +333,11 @@ export class TabsTitleControl extends TitleControl {
// 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
Member

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
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 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
Member

bpasero commented May 10, 2018

Thanks 👍

@bpasero 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