Community
Participate
Working Groups
Created attachment 273041 [details] Screencast showing the issue When ever a help content document is displayed it uses a fixed styling (light background and dark foreground). In the dark theme is is quite bad. See the attached screenshot. The background and foreground colors should be adapted according to the currently active theme.
As far as I see the help content is served by jetty from the plugins that contribute help content. Typically this help content is a set of HTML files along with the corresponding CSS files. These CSS files do not know anything about the current theme in eclipse. Can somebody point me to a place in the code where jetty pics up this content and serves it?
One additional question? How is the Eclipse Help Content (e.g. for Platform or JDT) produced. Is there Content Management System in use?
(In reply to Matthias Becker from comment #2) > One additional question? > How is the Eclipse Help Content (e.g. for Platform or JDT) produced. Is > there Content Management System in use? Manually writing/editing html files in the doc plug-ins.
(In reply to Dani Megert from comment #3) > Manually writing/editing html files in the doc plug-ins. And so are the CSS files?
(In reply to Matthias Becker from comment #4) > (In reply to Dani Megert from comment #3) > > Manually writing/editing html files in the doc plug-ins. > And so are the CSS files? There aren't that many CSS files. Most of them are copies.
I just stumbled over Safaris new support for dark mode in macOS Mojave 10.14.4. The important part is: "Adds Dark Mode support for websites that support custom color schemes " see : https://www.macrumors.com/2019/03/25/apple-releases-macos-mojave-10-14-4/ https://kevinchen.co/blog/support-macos-mojave-dark-mode-on-websites/ https://davidwalsh.name/prefers-color-scheme The solution is to have a new CSS media query called "prefers-color-scheme". This is quite now as you can see on: https://caniuse.com/#search=prefers-color-scheme But maybe this is the way we should also go with the documentation. Maybe it's too early to implement it at the moment.
New Gerrit change created: https://git.eclipse.org/r/140803
New Gerrit change created: https://git.eclipse.org/r/140804
New Gerrit change created: https://git.eclipse.org/r/140805
Created attachment 278324 [details] Old and new next to each other in the dark theme On top you see the new appearance with all 3 changes.
Created attachment 278325 [details] Old and new next to each other in the dark theme This shows the situation without https://git.eclipse.org/r/#/c/140805/ You see the grey separators and the grey separator between left and right area
Created attachment 278326 [details] New version in light appearance With my changes (but without https://git.eclipse.org/r/#/c/140805/) in light appearance. You see that it looks just the same as the current version
Created attachment 278327 [details] new version in dark appearance but in a browser not supporting it Here the OS is set to dark appearance but now the documentation is shown in google chrome. Chrome does not (yet) support the new media query. So the content is shown as it would be in light appearance. Once Chrome adds support for the new media query this will also reander in dark appearance without any change needed
When the help content is displayed in the external browser the system preferences about system wide dark or light appearance should be respected. There's a CSS standard coming for this: the prefers-color-scheme media query (see https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme ). The CSS of the help content should incorporate this media query. Up to now only Firefox 67 and Safari 12.1 implement this (see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme). The appearance of the documentation in the light appearance and in a browser not supporting the media query stays unchanged. This needs to be tested on various platforms and browsers. I know that there are still some pictures in the actual help content (e.g. in org.eclipse.platform.doc.user) that needs to be adapted (e.g removing white borders) but this can be done in separate commits. Anyway when using OS-wide dark appearance this is already much better than the current state. My changes only affect the display of the help in the extern browser. The display in the SWT help view still needs to be adapted. But maybe can leverage the same media-query by telling the SWT browser widget to use the "dark" color-scheme when OS or Elcipse is in dark mode. I haven't looked into this topic. Maybe one of the SWT experts may have a look at this topic.
So do I get it right that in order to see the dark help I need to render it webengine that supports this media query? My webkit2gtk3 2.24.1 doesn't seem to support it?
(In reply to Alexander Kurtakov from comment #15) > So do I get it right that in order to see the dark help I need to render it > webengine that supports this media query? My webkit2gtk3 2.24.1 doesn't seem > to support it? Yes. That's right. See the link which browsers currently support it.
I can confirm that I don't see any change on firefox 66 (latest stable release) and webkitgtk 3.24.1. More than that is not testable for me yet so it's your call on this one.
(In reply to Alexander Kurtakov from comment #17) > I can confirm that I don't see any change on firefox 66 (latest stable > release) and webkitgtk 3.24.1. More than that is not testable for me yet so > it's your call on this one. a test on windows with IE and Edge would also be good to have. @Windows-User to the front...
I tested the changes on Windows: In IE11, Edge, and Chrome 75, which do not support "prefers-color-scheme", it still looks like before. In Firefox 67, which does support "prefers-color-scheme", the dark theme is correctly applied according to Windows Settings -> Personalization -> Colors -> Choose your app default mode.
(In reply to Sebastian Ratz from comment #19) > I tested the changes on Windows: > > In IE11, Edge, and Chrome 75, which do not support "prefers-color-scheme", > it still looks like before. > > In Firefox 67, which does support "prefers-color-scheme", the dark theme is > correctly applied according to Windows Settings -> Personalization -> Colors > -> Choose your app default mode. Cool, please merge changes.
I plan to merge the linked changes by the end of this week.
New Gerrit change created: https://git.eclipse.org/r/144921
Gerrit change https://git.eclipse.org/r/140804 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=21ace962a6b15317b1be07a11f1a656a7f74d0ac
Gerrit change https://git.eclipse.org/r/140803 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.git/commit/?id=80637e39ea0a087c2b5547f89e9eb4f69088b4e2
Gerrit change https://git.eclipse.org/r/140805 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=5e7fa6a339d51615b9ed1c5384d40711fee2c933
(In reply to Eclipse Genie from comment #22) > New Gerrit change created: https://git.eclipse.org/r/144921 can someone with commit rights in epp/org.eclipse.epp.packages review and merge this?
(In reply to Lars Vogel from comment #20) > Cool, please merge changes. (mostly) done. With this the help content is styled correctly in the external browser (when the browser does support that new media query). The CSS used for the display in the internal help view also has the necessary media query but this has no effect. Can SWT browser somehow tell the native embedded browser to use the dark prefers-color-scheme? How can we address this?
Gerrit change https://git.eclipse.org/r/144921 was merged to [master]. Commit: http://git.eclipse.org/c/epp/org.eclipse.epp.packages.git/commit/?id=83a32353fce30d1cc431091122f1fb9f74a53d47
Is there anything pending here?
(In reply to Alexander Kurtakov from comment #29) > Is there anything pending here? Up to now only the help display in the external browser is fixed. The display in the help view does not yet respect the dark mode. We could handle this in a separate bug.
New Gerrit change created: https://git.eclipse.org/r/147101
Gerrit change https://git.eclipse.org/r/147101 was merged to [master]. Commit: http://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=2fddd1cfddc3c5d5903d1c34ad59d1a581c8bc83
New Gerrit change created: https://git.eclipse.org/r/147982
Gerrit change https://git.eclipse.org/r/147982 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.git/commit/?id=00777e1f53212b055692fe677064e64a32764807