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

remove text color blending and fix multiple background renderings on assistant panel #17606

Conversation

AlbertMarashi
Copy link
Contributor

@AlbertMarashi AlbertMarashi commented Sep 9, 2024

Closes #17599
Closes #17392
Closes #17608

Release Notes:

  • Fixed issue where hint.background and predictive.background theme styles not displaying in editor
  • Fixed issue where assistant panel would have editor.background applied multiple times leading to inconsistent behavior with transparent themes
  • Fixed issue where hint and predictive text with alpha values would be blended with the text color.
  • Removed text foreground color blending with colors to allow for alpha values within theme styles.

Previous assistant context would apply two backgrounds
image

New assistant panel only applies one background
image

Old predictive transparent text styling

  • predictive theme style with opacity would be incorrectly blended with the white text color
  • No predictive.background theme style applied
    image

New predictive text styling

  • Supports predictive theme style with opacity
  • Supports predictive.background theme style
    image

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Sep 9, 2024
@AlbertMarashi AlbertMarashi marked this pull request as ready for review September 9, 2024 17:27
@zed-industries-bot
Copy link

zed-industries-bot commented Sep 9, 2024

Warnings
⚠️
remove text color blending and fix multiple background renderings on assistant panel
^

Write PR titles using sentence case.

Messages
📖

This PR includes links to the following GitHub Issues: #17599, #17392, #17608
If this PR aims to close an issue, please include a Closes #ISSUE line at the top of the PR body.

Have feedback on this plugin? Let's hear it!

Generated by 🚫 dangerJS against 7fbc883

@maxdeviant maxdeviant changed the title add hint/predictive theme stylings, remove color blending and fix multiple background renderings on assistant panel Add hint/predictive theme stylings, remove color blending and fix multiple background renderings on assistant panel Sep 9, 2024
@AurevoirXavier
Copy link

AurevoirXavier commented Sep 11, 2024

I'm uncertain whether this will resolve the inconsistent behavior of "tab_bar.background": "#11111b70".

image

The terminal tab bar is noticeably darker than the editor tab bar. But both all them are controlled by tab_bar.background.

image

@AlbertMarashi
Copy link
Contributor Author

AlbertMarashi commented Sep 11, 2024

@AurevoirXavier I am leaning on no, but could you describe the issue a little more? I may be able to figure out whether this is occurring here too and add a fix for it

@AurevoirXavier
Copy link

AurevoirXavier commented Sep 11, 2024

@AurevoirXavier I am leaning on no, but could you describe the issue a little more? I may be able to figure out whether this is occurring here too and add a fix for it

Could you try adjust tab_bar.background in your experimental.theme_overrides?

  1. cmd-n open a untitled file
  2. cmd-j open a terminal
  3. adjust that color

The terminal's tab bar is always darker so much than the file tab bar. It looks like there are multiple styles affect the terminal tab bar.

@AlbertMarashi
Copy link
Contributor Author

@AurevoirXavier

I believe this may be coming from your "panel.background" setting. Can you try to set it to a transparent value such as #FFF0

@AurevoirXavier
Copy link

AurevoirXavier commented Sep 11, 2024

@AurevoirXavier

I believe this may be coming from your "panel.background" setting. Can you try to set it to a transparent value such as #FFF0

Hi, panel.background only controls the background of the terminal's content, not its tab bar.

Okay, I found that set panel.background and tab_bar.background to 00 can completely transparent the tab bar. Is this expected?

To make the tab bar lighter I have to change the panel.background, but this make the panel become too bright... I don't want that.

@AlbertMarashi
Copy link
Contributor Author

AlbertMarashi commented Sep 11, 2024

Yes, I think it's sort of expected, but I understand your where you are coming from.

Technically speaking, the terminal is a panel, so it ends up looking a bit like this

  • app: "background"
    • project panel: "panel.background"
      • project file explorer (seems to not have it's own setting)
    • editor panel (this has no "panel.background")
      • editor tab bar: "tab_bar.background"
      • editor toolbar: "toolbar.background"
      • editor: "editor.background"
    • terminal panel: "panel.background"
      • tab_bar: "tab_bar.background"
      • terminal: "terminal.background"
    • assistant panel: "panel.background"
      • assistant tabs: "tab_bar.background"
      • assistant toolbar: "toolbar.background"
      • assisant context editor: "editor.background"

To solve your problem, I set panel.background to a transparent value, and use the "background" to set the global background, and individually adjust the backgrounds of the various panels when I need to @AurevoirXavier

@iamnbutler
Copy link
Member

Hey! These changes sound great. Can you provide some before/after screenshots in your description?

@AlbertMarashi AlbertMarashi changed the title Add hint/predictive theme stylings, remove color blending and fix multiple background renderings on assistant panel Add hint/predictive theme stylings, remove text color blending and fix multiple background renderings on assistant panel Sep 15, 2024
@AlbertMarashi
Copy link
Contributor Author

Hey! These changes sound great. Can you provide some before/after screenshots in your description?

Done. Please see above

@iamnbutler
Copy link
Member

Looks good to me! Feel free to merge whenever you are ready.

@AlbertMarashi
Copy link
Contributor Author

@iamnbutler I don't work at zed so no can do 😆

@AlbertMarashi
Copy link
Contributor Author

AlbertMarashi commented Sep 17, 2024

@iamnbutler We may want to hold off on this for a minute, because it appears that about 20-30% of the built-in themes have set their predictive/hint.background colors to what I think are some ugly/odd/arbitrary colors - presumably because many were copied/pasted, or not tested because this feature previously didn't exist.

image image image

Most of the themes are okay, but perhaps in order to prevent users from being disturbed through this update, we should either

  • set all the predictive/hint backgrounds in all themes to #0000 for transparent (maintains the current styling for all users, since none of these values were being used anywhere before).
  • Go through each built-in theme to decide a good predictive.background and hint.background color for each. (This is more opinionated, but i'm happy to do it)

@maxdeviant
Copy link
Member

@AlbertMarashi I think this may be easier to land if we split it up into separate PRs.

Right now it seems like we're combining 3 unrelated things in one PR.

@AlbertMarashi
Copy link
Contributor Author

AlbertMarashi commented Sep 17, 2024

@maxdeviant yeah, I think I got carried away with testing some local improvements, I'm not a git wiz so i'd prefer to get these all merged in one go so I don't have to go back and redo them as seperate PRs 😆 - but I'm happy to if it's necessary

Here are my thoughts:

  • Use hint/predictive background - This can be ready to merge with effectively no risk, if we just set all of the built-in theme predictive.backgrounds and hint.backgrounds settings to #0000 (transparent) (these are already invisible/not displayed for all users currently)
    • and then we can set/fix those theme settings in a seperate PR
  • remove foreground color blending - I think this is ready to merge - This will affect no built-in themes because as far as I am aware, every theme is using fully opaque text/foreground values
  • Fix multiple background renderings on assistant panel - I also think this is ready to merge. This will affect no built-in themes as they are all using opaque editor.panel background values

Copy link
Member

@maxdeviant maxdeviant left a comment

Choose a reason for hiding this comment

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

I think it would be good to evaluate these changes independently.

I already moved the hint and predictive background styles out into a separate PR (and thus realized that they're not ready for merge, as-is): #17969

@AlbertMarashi AlbertMarashi changed the title Add hint/predictive theme stylings, remove text color blending and fix multiple background renderings on assistant panel remove text color blending and fix multiple background renderings on assistant panel Sep 18, 2024
@maxdeviant
Copy link
Member

Closing this out so we can split them up into separate PRs.

@maxdeviant maxdeviant closed this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
5 participants