Bug 569790 - [dark] Dark mode issue when Trace Compass is installed
Summary: [dark] Dark mode issue when Trace Compass is installed
Status: RESOLVED FIXED
Alias: None
Product: Tracecompass
Classification: Tools
Component: LTTng (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal
Target Milestone: 6.2.1   Edit
Assignee: Project Inbox CLA
QA Contact: Project Inbox CLA
URL:
Whiteboard:
Keywords:
: 569809 570329 570464 570996 571414 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-17 11:04 EST by Holger Voormann CLA
Modified: 2021-02-22 16:10 EST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Voormann CLA 2020-12-17 11:04:55 EST
In the
- Eclipse IDE for C/C++ Developers and
- Eclipse IDE for Embedded C/C++ Developers
when switching to the Dark theme, the font becomes black on black in some places, e.g. in the preference dialog, and can thus no longer be read:
https://twitter.com/ArnoMoonen/status/1339477661786267648

At least in the Eclipse IDE for C/C++ Developers, the issue will go away (the font becomes white on gray) when uninstalling:
- GDB Tracepoint Analysis
- LTTng Kernel Analysis
- LTTng Tracer Control
- LTTng Userspace Analysis

Reverting the installation brings back the issue.
Comment 1 Lars Vogel CLA 2020-12-17 11:07:45 EST
I guess tracecompass is not using the pseudo-attribute on their color definition for their preference styling and overwrite the platform styling.
Comment 2 Lars Vogel CLA 2020-12-17 11:11:08 EST
Any IEclipsePreference node in the CSS should be followed by a pseudo attribute, similar to the following:

Replace of course org-eclipse-jdt-ui  with your bundleID.
Make sure that the "." are replaced by "-".


IEclipsePreferences#org-eclipse-ui-editors:org-eclipse-jdt-ui { /* pseudo attribute added to allow contributions without replacing this node, see Bug 466075 */
	preferences:
		'AbstractTextEditor.Color.Background.SystemDefault=false'
		'AbstractTextEditor.Color.SelectionForeground.SystemDefault=false'
		'AbstractTextEditor.Color.SelectionBackground.SystemDefault=false'
		'AbstractTextEditor.Color.Background=47,47,47'
		
		'writeOccurrenceIndicationColor=27,98,145'
}
Comment 3 Holger Voormann CLA 2020-12-18 10:37:10 EST
In
/tmf/org.eclipse.tracecompass.tmf.ui/css/org.eclipse.tracecompass.tmf.ui.dark.css
removing the lines 26..47 starting with
	'#org-eclipse-ui-workbench-
will fix it:
https://git.eclipse.org/c/tracecompass/org.eclipse.tracecompass.git/tree/tmf/org.eclipse.tracecompass.tmf.ui/css/org.eclipse.tracecompass.tmf.ui.dark.css?id=89a01cb7ad2aa4b670ac64696ccc6b4ef59f9e2e#n26

But I don't know what other effects removing these lines will have.
Comment 4 Jonah Graham CLA 2020-12-18 11:02:56 EST
The same plug-ins work fine with 2020-09 release and stop working with 2020-12 release. Because tracecompass's default target platform is 2020-09 this probably wasn't noticed in development.


(In reply to Holger Voormann from comment #3)
Thanks.
Comment 5 Jonah Graham CLA 2020-12-18 11:38:06 EST
The reason things changed from 2020-09 to 2020-12 is because Bug 566549 Change 170306. Simply adding the new definitions fixes stuff and leaves the tracecompass extra colors still configurable, but feels like that we are just patching a problem that will easily recur. Indeed this problem has been patched in the past (e.g. Bug 560983 was a recent time, for 2020-03). I will submit a patch that fixes it this way for now.

Hi Lars,

I don't understand how to do "this" properly. The reason that it is broken is because additional colors want to be modified as part of the theme[1]. Is there somewhere that can help me do the ThemesExtension properly?

Hi Bernd,

Perhaps you have some insight on this as you handled the similar problem last time?

Thanks,
Jonah


[1] https://git.eclipse.org/c/tracecompass/org.eclipse.tracecompass.git/tree/tmf/org.eclipse.tracecompass.tmf.ui/css/org.eclipse.tracecompass.tmf.ui.dark.css?id=89a01cb7ad2aa4b670ac64696ccc6b4ef59f9e2e#n13
Comment 6 Eclipse Genie CLA 2020-12-18 11:40:46 EST
New Gerrit change created: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/173978
Comment 7 Bernd Hufmann CLA 2020-12-18 12:46:12 EST
(In reply to Holger Voormann from comment #0)
> In the
> - Eclipse IDE for C/C++ Developers and
> - Eclipse IDE for Embedded C/C++ Developers
> when switching to the Dark theme, the font becomes black on black in some
> places, e.g. in the preference dialog, and can thus no longer be read:
> https://twitter.com/ArnoMoonen/status/1339477661786267648
> 
> At least in the Eclipse IDE for C/C++ Developers, the issue will go away
> (the font becomes white on gray) when uninstalling:
> - GDB Tracepoint Analysis
> - LTTng Kernel Analysis
> - LTTng Tracer Control
> - LTTng Userspace Analysis
> 
> Reverting the installation brings back the issue.

Thanks for reporting this I'm going to investigate the issue too.
Comment 8 Bernd Hufmann CLA 2020-12-18 12:48:48 EST
(In reply to Jonah Graham from comment #4)
> The same plug-ins work fine with 2020-09 release and stop working with
> 2020-12 release. Because tracecompass's default target platform is 2020-09
> this probably wasn't noticed in development.
> 
> 
> (In reply to Holger Voormann from comment #3)
> Thanks.

The release build was done of stable-6.2 branch where build against the 2020-12 dependencies. The master branch hasn't been updated to 2020-12 but it usually will be done right after the release (coming soon for 2020-12).

I think nobody in our team is using dark theme and the issue got unnoticed. Sorry for that.
Comment 9 Bernd Hufmann CLA 2020-12-18 13:03:33 EST
(In reply to Jonah Graham from comment #5)
> The reason things changed from 2020-09 to 2020-12 is because Bug 566549
> Change 170306. Simply adding the new definitions fixes stuff and leaves the
> tracecompass extra colors still configurable, but feels like that we are
> just patching a problem that will easily recur. Indeed this problem has been
> patched in the past (e.g. Bug 560983 was a recent time, for 2020-03). I will
> submit a patch that fixes it this way for now.
> 
> Hi Lars,
> 
> I don't understand how to do "this" properly. The reason that it is broken
> is because additional colors want to be modified as part of the theme[1]. Is
> there somewhere that can help me do the ThemesExtension properly?
> 
> Hi Bernd,
> 
> Perhaps you have some insight on this as you handled the similar problem
> last time?
> 
> Thanks,
> Jonah
> 
> 
> [1]
> https://git.eclipse.org/c/tracecompass/org.eclipse.tracecompass.git/tree/tmf/
> org.eclipse.tracecompass.tmf.ui/css/org.eclipse.tracecompass.tmf.ui.dark.
> css?id=89a01cb7ad2aa4b670ac64696ccc6b4ef59f9e2e#n13


Hi Jonah,

last time when we had to fix the dark theme (Bug 560983 for 2020-03), we noticed in time before the release that there were changes in the platform that causes issues. After some investigation we realized that the linux base css had been renamed and we were able to fix it for the release. 

To answer your question, I'm not actually sure how to handle this in the future when such changes are done again in the platform. For sure the Trace Compass team needs to test the dark-theme before the release to notice any problems. 

I'm curious what recommendation Lars can give for this.
Comment 11 Eclipse Genie CLA 2020-12-18 13:44:37 EST
New Gerrit change created: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/173769
Comment 12 Bernd Hufmann CLA 2020-12-18 14:29:48 EST
Hi Jonas

your patch fixes the problem. What would be the best way to get that fix into the simrel (if there is a way)?

Please let me know

Thanks
Bernd
Comment 14 Holger Voormann CLA 2020-12-19 18:57:48 EST
I created an update site with the patched, but not signed TMF feature that can be used as a temporary solution until something better is found.

Update site:
https://howlger.github.io/Dark-Theme-Fix-for-Eclipse-2020-12-with-TMF/update

See:
https://github.com/howlger/Dark-Theme-Fix-for-Eclipse-2020-12-with-TMF
Comment 15 Jonah Graham CLA 2020-12-19 19:26:19 EST
(In reply to Bernd Hufmann from comment #12)
> your patch fixes the problem. What would be the best way to get that fix
> into the simrel (if there is a way)?
Hi Bernd - it is too late to update SimRel for 2020-12. 

Best option is to formalize what Holger said in Comment 14. 

We *could* make Tracecompass's p2 site a child of CDT's one[1]? That would mean that the fix would be picked up by anyone doing a check for updates, but I don't know what effects that has. The sire in [1] is an update site already in the two C/C++ EPPs.

[1] https://download.eclipse.org/tools/cdt/releases/10.1
Comment 16 Bernd Hufmann CLA 2021-01-04 10:25:48 EST
(In reply to Holger Voormann from comment #14)
> I created an update site with the patched, but not signed TMF feature that
> can be used as a temporary solution until something better is found.
> 
> Update site:
> https://howlger.github.io/Dark-Theme-Fix-for-Eclipse-2020-12-with-TMF/update
> 
> See:
> https://github.com/howlger/Dark-Theme-Fix-for-Eclipse-2020-12-with-TMF

The following update site provides hot fixes for the current release. It is currently build of the Trace Compass stable-6.2 branch where I included the fix for the dark theme issue.

https://download.eclipse.org/tracecompass/stable/repository/

Please note that, that this update site follows the Trace Compass releases and in March it will be based on the March release (v6.3.0)

BR
Bernd
Comment 17 Jonah Graham CLA 2021-01-04 20:51:59 EST
Hi Bernd, can you have a look at the p2 site in Comment 16, it has the same version of tracecompass (AFAICT) that was part of the 2020-12 release.

https://download.eclipse.org/tracecompass/2020-12/stable/repository/ which I guessed may have an update, does have a newer version of the plug-ins, but still the version from before the dark mode fix.

Once I have a stable URL I plan to add an entry to the CDT New and Noteworthy as a lot of people come to CDT for the C++ EPP. You can see it there now in the source, just commented out waiting for a URL https://wiki.eclipse.org/index.php?title=CDT%2FUser%2FNewIn101&type=revision&diff=442121&oldid=442065
Comment 18 Jonah Graham CLA 2021-01-04 22:03:56 EST
=== WORKAROUND step-by-step using Comment 14 ===

This can be resolved by either updating the Trace Compass Plug-ins using the step below, or uninstalling the Trace Compass Plug-ins. To update them do this: 

# From Window menu -> choose Preferences
# navigate to Install/Update -> Available Software Sites 
# Press Add... 
# Name Tracecompass updates and Location https://howlger.github.io/Dark-Theme-Fix-for-Eclipse-2020-12-with-TMF/update 
# Press Add 
# Press Apply and Close 
# From Help menu -> Check for Updates and finish the wizard.
# After restarting the Dark Mode will be fixed.
Comment 19 Jonah Graham CLA 2021-01-04 22:04:33 EST
*** Bug 569809 has been marked as a duplicate of this bug. ***
Comment 20 Bernd Hufmann CLA 2021-01-05 18:44:36 EST
(In reply to Jonah Graham from comment #17)
> Hi Bernd, can you have a look at the p2 site in Comment 16, it has the same
> version of tracecompass (AFAICT) that was part of the 2020-12 release.
> 
> https://download.eclipse.org/tracecompass/2020-12/stable/repository/ which I
> guessed may have an update, does have a newer version of the plug-ins, but
> still the version from before the dark mode fix.
> 
> Once I have a stable URL I plan to add an entry to the CDT New and
> Noteworthy as a lot of people come to CDT for the C++ EPP. You can see it
> there now in the source, just commented out waiting for a URL
> https://wiki.eclipse.org/index.
> php?title=CDT%2FUser%2FNewIn101&type=revision&diff=442121&oldid=442065

Hi Jonah,

Sorry, wrong update site. Thanks for pointing this out. I meant to refer to this update site: 
https://download.eclipse.org/tracecompass/stable/repository/

I ran the build and tested if the dark theme issues is gone after updating using this update site. It works fine.

The version numbers are still the same but the build time of the plugins is different. So, an upgrade with this update site works. 

I prefer that the Trace Compass stable update site (https://download.eclipse.org/tracecompass/stable/repository/) is used.

BR
Bernd
Comment 21 Jonah Graham CLA 2021-01-05 19:13:01 EST
> I prefer that the Trace Compass stable update site
> (https://download.eclipse.org/tracecompass/stable/repository/) is used.

Thanks - I could have sworn that site didn't have the changes yesterday, I see the new timestamps today. I have added the workaround steps to https://wiki.eclipse.org/CDT/User/NewIn101#Release
Comment 22 Lars Vogel CLA 2021-01-13 10:14:01 EST
*** Bug 570329 has been marked as a duplicate of this bug. ***
Comment 23 Bernd Hufmann CLA 2021-01-14 09:10:12 EST
I created a Trace Compass 6.2.1 service release to include the fix for this bug.

The Trace Compass p2 repository is up at https://download.eclipse.org/tracecompass/releases/6.2.1/repository/

The Trace Compass standalone RCP is available from: https://download.eclipse.org/tracecompass/releases/6.2.1/rcp/

Thanks to everybody help to fix this issue.
Bernd
Comment 24 Jonah Graham CLA 2021-01-14 15:01:24 EST
(In reply to Bernd Hufmann from comment #23)
> I created a Trace Compass 6.2.1 service release to include the fix for this
> bug.

Hi Bernd, Thanks for making the service release. Can you push it or something else with the fix to SimRel. The 2021-03 M1 build does not have this fix in it.

Thanks!
Comment 25 Bernd Hufmann CLA 2021-01-18 11:23:35 EST
(In reply to Jonah Graham from comment #24)
> (In reply to Bernd Hufmann from comment #23)
> > I created a Trace Compass 6.2.1 service release to include the fix for this
> > bug.
> 
> Hi Bernd, Thanks for making the service release. Can you push it or
> something else with the fix to SimRel. The 2021-03 M1 build does not have
> this fix in it.
> 
> Thanks!

Hi Jonah,

true, we didn't push an update to the 2021-03 M1. We'll have a new build for M2.

Bernd
Comment 26 Bernd Hufmann CLA 2021-01-18 16:19:54 EST
(In reply to Bernd Hufmann from comment #25)
> (In reply to Jonah Graham from comment #24)
> > (In reply to Bernd Hufmann from comment #23)
> > > I created a Trace Compass 6.2.1 service release to include the fix for this
> > > bug.
> > 
> > Hi Bernd, Thanks for making the service release. Can you push it or
> > something else with the fix to SimRel. The 2021-03 M1 build does not have
> > this fix in it.
> > 
> > Thanks!
> 
> Hi Jonah,
> 
> true, we didn't push an update to the 2021-03 M1. We'll have a new build for
> M2.
> 
> Bernd

I've already updated the SimRel to point to 6.2.1. In case we decide to deliver 6.2.1 in 2021-03 instead of 6.3.0.
Comment 27 Rolf Theunissen CLA 2021-01-19 03:15:43 EST
*** Bug 570464 has been marked as a duplicate of this bug. ***
Comment 28 Jonah Graham CLA 2021-02-07 07:38:41 EST
*** Bug 570996 has been marked as a duplicate of this bug. ***
Comment 29 Jonah Graham CLA 2021-02-22 16:10:42 EST
*** Bug 571414 has been marked as a duplicate of this bug. ***