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

Status indicator in gutter #598

Closed
wants to merge 0 commits into from
Closed

Conversation

Tymek
Copy link
Contributor

@Tymek Tymek commented Jun 26, 2020

closes #554

@Tymek Tymek force-pushed the master branch 2 times, most recently from 9527dfe to 817e516 Compare June 26, 2020 12:33
Copy link
Collaborator

@connectdotz connectdotz left a comment

Choose a reason for hiding this comment

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

hey, thanks for the PR! This is one of the highly sought after issues. 🙏

A few suggestions:

  1. the build failed because you need to update the changelog
  2. to help accessibility and consider color blind use case, let's use different shapes in addition to colors for icons. you can reference the original indicators as examples.

return window.createTextEditorDecorationType({
overviewRulerColor: 'red',
overviewRulerColor,
gutterIconPath: context.asAbsolutePath(`images/icons/${icon}.svg`),
Copy link
Collaborator

Choose a reason for hiding this comment

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

will this path be a problem in windows? how about this

Suggested change
gutterIconPath: context.asAbsolutePath(`images/icons/${icon}.svg`),
gutterIconPath: context.asAbsolutePath(path.join('images', 'icons', `${icon}.svg`)),

Copy link
Contributor Author

@Tymek Tymek Jun 27, 2020

Choose a reason for hiding this comment

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

tested with on Win10+VSCodium, clean install. It does this internally I think. won't hurt. I'll fix it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to what is already in repo (see src/Coverage/Formatters/GutterFormatter/index.ts:46)

Copy link
Collaborator

Choose a reason for hiding this comment

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

actually there is a bug regarding GutterFormatter icon (#585), but it might be a packaging issue and not necessarily the path... I don't have any windows machine, not sure if there is any variation that could cause a path problem... unless we are absolutely sure otherwise it is probably better to be safe...

I actually think we should update GutterFormatter 1. the path formation, 2. consolidate the svg files to the same location as yours.

src/decorations.ts Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jun 27, 2020

Pull Request Test Coverage Report for Build 799

  • 15 of 15 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 90.636%

Totals Coverage Status
Change from base Build 788: 0.01%
Covered Lines: 934
Relevant Lines: 1006

💛 - Coveralls

@Tymek
Copy link
Contributor Author

Tymek commented Jun 27, 2020

  1. changelog updated. tests done
  2. can do on monday. using icons from vscode-icons. anyway, when will next release happen? I might be able to add customizable colors and icon sets

@connectdotz
Copy link
Collaborator

when will next release happen?

I am thinking about cutting a beta soon... if you can get the new icons in on Monday, I will wait.

I might be able to add customizable colors and icon sets

hmmm... let's hold off on that, I think the default set that works in both lite/dark mode should be sufficient.

@Tymek
Copy link
Contributor Author

Tymek commented Jun 29, 2020

I think selected colors are readable on both dark and light backgrounds. It's not worse than before, so should be enough for now. Customization will make dark/light versions obsolete.

SVGs from vscode-codicons under MIT license (https://git.io/JJv25)

I opted to use square for skipped tests and circle for not-ran. It looks much better this way. Counterargument could be that Jest itself is using empty circle for skipped tests, so it's not super-consistent. Additional shape is an upgrade nonetheless.

GIF in Readme needs an update for 4.0 🙂

Copy link
Collaborator

@connectdotz connectdotz left a comment

Choose a reason for hiding this comment

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

the code looks good, here are some other comments:

UX

  • the pass and fail looked nice
  • skip, with an empty box, is not quite clear and visually a bit "weak", maybe something solid and more symbolic... something like the debug mode "skip-over" icon?
  • unknown with a circle outline and identical color as line-number is also a bit confusing and hard to spot... maybe a question mark instead?

oh and I only tested with dark mode, did you check if they look good in lite mode as well?

webpack

I think the current webpack is not picking up any svg file, please see if you can fix it. (this will address #585 too)

GutterFormatter

as I mentioned in an earlier comment, let's consolidate all the svg files in the same directory.

@Tymek
Copy link
Contributor Author

Tymek commented Jun 30, 2020

devops issues. I will open new pull request with the same changes but from new branch (and remember not to make the same mistake again, when pull bot wiped my master). Link should appear below in a sec

@Tymek Tymek mentioned this pull request Jun 30, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[style] Indentation problem with status indicator
3 participants