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

Increase specificity of Output styles #9496

Merged
merged 1 commit into from
May 21, 2021

Conversation

gbodeen
Copy link
Contributor

@gbodeen gbodeen commented May 18, 2021

Signed-off-by: Gabriel Bodeen gabriel.bodeen@ericsson.com

What it does

Fixes #9110.

As noted in a comment on the issue, git-bisect shows the regression was introduced in this commit, part of the PR where @theia/monaco-editor-core was upgraded from 0.19.0 to 0.20.0.

The cause is that in the upgraded Monaco, the editor token colors stylesheet is lazy-loaded and only attached to the DOM after the first editor is attached. So the CSS classes affecting the output are now loaded in the reverse order to what was originally expected.

The upstream fix is included as of v0.21.x, so if a PR such as this one going to 0.23.x is merged it will resolve the problem.

In the meantime, the immediate problem in the Output package can be resolved simply by increasing the specificity of the CSS selector, and it will not need to be reverted after a Monaco upgrade.

How to test

  1. View > Output in the menus to open the Output widget if it is not visible. In the dropdown output channel list, select API Sample: my test channel.
  2. On this branch, you'll see:

image

  1. Versus master where you'll currently see:

image

Review checklist

Reminder for reviewers

Signed-off-by: Gabriel Bodeen <gabriel.bodeen@ericsson.com>
@gbodeen
Copy link
Contributor Author

gbodeen commented May 18, 2021

Hi -
The review guidelines mention the change log and licenses for new files (but not for existing files).

  • Is a change log entry needed for something this minor?
  • Does the license on the modified file need the current year included?

@gbodeen gbodeen changed the title Increase specificity of Output CSS variables Increase specificity of Output styles May 18, 2021
@vince-fugnitto vince-fugnitto added the output issues related to the output label May 19, 2021
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

@gbodeen thank you for the contribution, please be sure to sign the Eclipse Contributor Agreement (ECA) with the same email as your authorship (it currently fails one of our CI checks).

As for your questions :)

Is a change log entry needed for something this minor?

While an entry is most welcome, it is not necessarily necessary at this moment as we do a changelog pass before a release (ex: #9412).

Does the license on the modified file need the current year included?

There is no requirement to modify the license header, it only needs to be added when the file is first created.

@gbodeen
Copy link
Contributor Author

gbodeen commented May 19, 2021

please be sure to sign the Eclipse Contributor Agreement (ECA) with the same email as your authorship (it currently fails one of our CI checks).

OK, I was able to sign the agreement this morning.

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

I confirmed that the updates fix the issue for error and warning output.
I also noticed that (like you said), the issue comes from monaco where it overrides the theia-output styling with mtk{n} styling.

@vince-fugnitto vince-fugnitto merged commit 2fda70e into eclipse-theia:master May 21, 2021
@vince-fugnitto vince-fugnitto added this to the 1.14.0 milestone May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
output issues related to the output
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Output - Severity option (style) is not applied correctly in the OutputChannelManager append method
2 participants