Skip to content

titleBar color setting is ignored in version v4.0.1 (PWA mode) #4725

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

Closed
akares opened this issue Jan 11, 2022 · 6 comments · Fixed by #4902
Closed

titleBar color setting is ignored in version v4.0.1 (PWA mode) #4725

akares opened this issue Jan 11, 2022 · 6 comments · Fixed by #4902
Labels
bug Something isn't working
Milestone

Comments

@akares
Copy link

akares commented Jan 11, 2022

After upgrade 3.12.0 -> 4.0.1 the titleBar.activeBackground theme setting doesn't work anymore.

It suppose to change the color of the window title in the PWA mode (see screenshots).

OS/Web Information

  • Web Browser: Chrome
  • Local OS: macOS 12.1
  • Remote OS: Ubuntu 20.04.3 LTS
  • Remote Architecture: x86_64
  • code-server --version: 4.0.1

Steps to Reproduce

Working version:

  1. Set up 3.12.0.
  2. Install it in PWA mode (as separate app window).
  3. Edit settings.json and customise workbench.colorCustomizations->[yourThemeName] -> titleBar.activeBackground value (CSS color).
    An example:
    https://gist.github.com/akares/846d368c9ebecfb7fdc51aaa4a91ec12
  4. Notice window title background change.

Broken version:

  1. Upgrade to 4.0.1
  2. The theme tweak is ignored now.

Screenshot

Screenshot 2022-01-11 at 14 17 21

Expected

Screenshot 2022-01-11 at 14 24 01

UPD: Seems hex color values preview feature also failed in 4.0.1.

@jsjoeio
Copy link
Contributor

jsjoeio commented Jan 12, 2022

I tested this and was able to reproduce the issue in code-server 4.0.1
image

I also tested on vscode.dev (installing the PWA) and could not reproduce (works as expected).
image

cc @code-asher was this ever broken in the past? Maybe we lost a change in the upgrade.

@jsjoeio jsjoeio added the bug Something isn't working label Jan 12, 2022
@jsjoeio jsjoeio added this to the 4.1.0 - improve iPad UX milestone Jan 12, 2022
@code-asher
Copy link
Member

code-asher commented Jan 13, 2022 via email

@LSeelig
Copy link

LSeelig commented Jan 25, 2022

Same here on my chromebook. Fresh install on 3.12 (theme-color sets correctly), vs 4.0.1 (theme-color is unchanged)
theme-color312
theme-color401

I don't know a ton about web development, but I'm pretty sure theme-color is set dynamically. Even if it's set in the manifest, it can still change in the page's html. The page will load in with the manifest's setting.

@jsjoeio
Copy link
Contributor

jsjoeio commented Jan 25, 2022

Thanks @LordMethenor! Yeah we probably need to fix something in the PWA manifest

@shp7724
Copy link

shp7724 commented Mar 8, 2022

Workaround

Looking at the developer console, I found there exist two theme-color meta tags, which looked like the culprit of this issue.

image

As a workaround, I simply deleted the following line in workbench.html and everything worked as expected.

<link rel="alternate icon" href="{{BASE}}/static/resources/server/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="{{BASE}}/favicon.ico" type="image/x-icon" />
<link rel="manifest" href="{{BASE}}/manifest.json" crossorigin="use-credentials">
- <meta name="theme-color" content="{{CLIENT_BACKGROUND_COLOR}}">
<link data-name="vs/workbench/workbench.web.api" rel="stylesheet" href="{{BASE}}/static/out/vs/workbench/workbench.web.api.css">

(I installed code-server via homebrew, so in my case, workbench.html was located in /usr/local/Cellar/code-server/4.1.0/libexec/vendor/modules/code-oss-dev/out/vs/code/browser/workbench/workbench.html.)

I hope this helps.

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 8, 2022

@shp7724 wow!!! Nice find. We actually delete this as part of the 1.64 update (#4902) so this should be fixed in the next release. Thank you for posting that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants