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

settings.json should provide tab color as part of a scheme and/or profile, with an optional way to introduce variant for multiple instances of the same profile #1337

Closed
rbeesley opened this issue Jun 19, 2019 · 14 comments · Fixed by #7162
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@rbeesley
Copy link
Contributor

Summary of the new feature/enhancement

Profiles.json should provide tab color as part of a scheme and/or profile, with an optional way to introduce variant for multiple instances of the same profile. When a user opens different tabs today, there is very little distinction between the tabs. I'd like to have the ability to apply a color to the tab, perhaps with an alpha so that I could shade both light and dark applications with a accent color representing the type of profile used by the tab. It might be valuable to have an additional accent color which can shade the tab or a portion of the tab uniquely depending on if there are multiple instances of the same profile open, so as to distinguish between them.

Proposed technical implementation details

I'm not entirely sure how the optional portion would be implemented, so I'll address the first portion first.

{
  "profiles" :
  {
    "tabForeground" : "#aarrbbgg",
    "tabBackground" : "#aarrbbgg"
  }
}

or

{
  "profiles" :
  {
    "colorScheme" : "Foo"
  },
  "schemes" :
  [
    {
      "name" : "Foo",
      "tabForeground" : "#aarrbbgg",
      "tabBackground" : "#aarrbbgg"
    }
  ]
}

Just as with the foreground and background properties, the profile definition overrides the scheme definition. This concept could be expanded later to use other foreground and background identifiers such as images.

@rbeesley rbeesley added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jun 19, 2019
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 19, 2019
@mdtauk
Copy link

mdtauk commented Jun 19, 2019

Rather than a tab colour, I would like to see the Tab use the background colour, to make the console and tab connected.

image

image

@DHowett-MSFT
Copy link
Contributor

I'm partial to @mdtauk's plan as well, but it does lose the nuance of "how to differentiate multiple open tabs of the same type".

@mdtauk
Copy link

mdtauk commented Jun 19, 2019

I'm partial to @mdtauk's plan as well, but it does lose the nuance of "how to differentiate multiple open tabs of the same type".

Tab/Profile names. But isn't the plan to group different Terminal panes within a single Tab though? #1000

@DHowett-MSFT
Copy link
Contributor

group different Terminal panes

Well, yes, at the user's discretion. If I want to open 600 different powershell tabs and have them all have the same title, I deserve what I get 😉

@rbeesley
Copy link
Contributor Author

I like mdtauk's solution, but I'd like to accent my Ubuntu tab with an orange to match the Ubuntu orange. Separately I like how this helps distinguish which tab is currently selected... so maybe what I'm suggesting only applies to the text region?

@mdtauk
Copy link

mdtauk commented Jun 19, 2019

Looking at the WinUI Tabs issue, there are thoughts about the design which shows the selected tab with a selected indicator strip. Perhaps that colour could be set, either on the profile or by right clicking on a tab and picking a colour?

Tab Bar

Here is a design mock-up I contributed

@DHowett-MSFT DHowett-MSFT added this to the Terminal Backlog milestone Jun 20, 2019
@DHowett-MSFT DHowett-MSFT added Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 20, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 20, 2019
@DHowett-MSFT
Copy link
Contributor

cc @cinnamon-msft

@cinnamon-msft
Copy link
Contributor

I made some mocks earlier on in the project to demonstrate theming and colored tabs. I like the idea of associating the tab with the background color as well. Then, having the tab go back to the original background color when it isn't selected. This could be a good way to go for v1 then expand on later 😄

Terminal (Dark) – Double Tab (+)

Terminal (Dark) – Double Tab (+) (1)

Terminal (Dark) – Double Tab (+) (2)

@Jaykul
Copy link
Contributor

Jaykul commented Jun 26, 2019

This would mean if you set an image background, you have to also set the background color to control the tab, right?

Maybe if you have multiple tabs of the same type we can just randomly tweak the saturation or lightness of each one by ±10 ...

We could also expose this as settable via OSC (meaning apps could make them change)

@NeilMacMullen
Copy link

I raised #3687 before being pointed at this item. In that I suggest taking the ideas here to their logical (to me at least!) conclusion and simply allowing the entire theme to be selectable for each tab since the theme seems to be the thing that is encapsulating all UI variation.

@egmontkob
Copy link

[Jaykul] We could also expose this as settable via OSC (meaning apps could make them change)

As per j4james's suggestion, I'm copying over this comment from 3687:

Another possibility is to add support for runtime alteration of the palette and default fg+bg colors, using the standard OSC 4, 10, 11 (and their +100 counterparts) escape sequences. This would give great flexibility to users, e.g. even picking a random background color from their shell startup files.

Technical note: In VTE + GNOME Terminal we figured out the best is if the OSC sequences have precedence over the UI / config file settings. That is, for each color slot, if its value is defined via OSC 4, 10, 11 then that one is used and the one in the settings is ignored. If a value hasn't been defined via OSC, or has been reset via OSC 104, 110, 111 then the value specified in the terminal emulator's settings is used. This way re-applying the same settings is an idempotent operation. (Previously the two sources were fighting with each other, both overwriting the value in the same slot. That way re-applying the user config (e.g. "altering" a color to the same value) would invalidate a previous OSC, which was bad.)

@luzhkovvv
Copy link

It seems that specifying tab color in profile should now be possible, after #3789 merge, with only additions to configuration? Seems to be logical next step, to allow initial per-profile configuration of existing runtime option, while using an operating system's accent/different colors within the same profile/background sync may be further steps.

@zadjii-msft
Copy link
Member

@luzhkovvv Sure will be, but we're tracking this as a part of #3327, which is making sure that we take care of this in a more holistic way then just adding the setting to every profile.

@DHowett DHowett changed the title Profiles.json should provide tab color as part of a scheme and/or profile, with an optional way to introduce variant for multiple instances of the same profile settings.json should provide tab color as part of a scheme and/or profile, with an optional way to introduce variant for multiple instances of the same profile Jul 15, 2020
@ghost ghost added the In-PR This issue has a related PR label Aug 3, 2020
zadjii-msft added a commit that referenced this issue Aug 3, 2020
Co-authored-by: Mike Griese <zadjii@gmail.com>

## Summary of the Pull Request

This spec is a subset of #5772, but specific to per-profile tab colors. We've had enough requests for that in the last few days that I want to pull that feature out into it's own spec, so we can get that approved and implemented in a future-proof way.

> This spec describes a way to specify tab colors in a profile in a way that will
> be forward compatible with theming the Terminal. This spec will be largely
> dedicated to the design of a single setting, but within the context of theming.
> 

## PR Checklist
* [x] Specs: #1337
* [x] References: #5772 
* [x] I work here

## Detailed Description of the Pull Request / Additional comments
_\*<sup>\*</sup><sub>\*</sub> read the spec  <sub>\*</sub><sup>\*</sup>\*_
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Aug 7, 2020
DHowett pushed a commit that referenced this issue Aug 7, 2020
This PR adds support for per-profile tab colors, in accordance with
#7134. This adds a single `tabColor` property, that when set, specifies
the background color for profile's tab. This color can be overridden by
the color picker, and clearing the color with the color picker will
revert to this default color set for the tab.

* Full theming is covered in #3327 & #5772 

Validation: Played with setting this color, both on launch and via
hot-reload

Specified in #7134
Closes #1337
@ghost
Copy link

ghost commented Aug 26, 2020

🎉This issue was addressed in #7162, which has now been successfully released as Windows Terminal Preview v1.3.2382.0.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants