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

Use tail decorations for problems in TreeWidget #10820

Conversation

colin-grant-work
Copy link
Contributor

@colin-grant-work colin-grant-work commented Mar 1, 2022

What it does

FIxes: #3819

With an eye to making it easier to reuse code in plugin tree views (see this PR), this PR adjusts our current problem tree decorator to use tail decorations rather than icon overlays. That is more consistent with VSCode and also carries over into dot decorations of parents implemented in this PR.

The tabbar decorator also uses icon decorations for problems, which is not consistent with VSCode either, but is a completely separate subsystem, and currently the tabbar renderers don't support tail decorations.

How to test

  1. Open the navigator
  2. Create problems in the workspace
  3. Observe that files with problems are decorated with the number of problems in the file in the color appropriate to the highest-severity problem.
  4. Observe that the parent folders receive a dot decoration of the appropriate color.

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work added tree issues related to the tree (ex: tree widget) problems issues related to the problems widget labels Mar 1, 2022
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.

The changes work well for me 👍

There are still some key differences with vscode that we should probably align with if we feel that it represents a better behavior, namely:

  • the priority or ordering of the tail-decorations
  • the fact that the decoration with the highest priority or severity takes precedence over the entire decoration (we may argue that this limits the decorations and feel as though our approach is better)

theia

theia-decoration

vscode:

image

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'm happy with the changes 👍
The improvements I identified are general and should be handled when or if we revisit how decorations work and how can simplify them.

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

The changes are looking good to me as well 👍

CHANGELOG.md Outdated Show resolved Hide resolved
@colin-grant-work colin-grant-work force-pushed the feature/problems-as-tail-decorations branch from 5018333 to 0fa8423 Compare March 3, 2022 19:38
@colin-grant-work colin-grant-work merged commit cd1c80e into eclipse-theia:master Mar 3, 2022
@colin-grant-work colin-grant-work deleted the feature/problems-as-tail-decorations branch March 3, 2022 22:01
@colin-grant-work colin-grant-work added this to the 1.24.0 milestone Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problems issues related to the problems widget tree issues related to the tree (ex: tree widget)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[markers] update problem-marker decorators similar to vscode
3 participants