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

Add annotation level information to gutter tooltip #5101

Merged
merged 11 commits into from
Mar 24, 2023

Conversation

akoreman
Copy link
Contributor

Currently, the gutter tooltip only shows the annotation text without any indication whether the messages are of the level 'error', 'warning' or 'info'. See image for current state of the gutter tooltip:

image (4)

This change improves this by adding a header to the gutter tooltip indicating the total number of annotations per level for that row and an icon in front of each message indicating the annotation level for that annotation. Image of the gutter tooltip after this change:

Screenshot 2023-03-22 at 21 11 43

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Patch coverage: 99.12% and project coverage change: +0.15 🎉

Comparison is base (9f86bb0) 86.62% compared to head (8fb72a1) 86.78%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5101      +/-   ##
==========================================
+ Coverage   86.62%   86.78%   +0.15%     
==========================================
  Files         555      556       +1     
  Lines       42996    43097     +101     
  Branches     6709     6714       +5     
==========================================
+ Hits        37247    37400     +153     
+ Misses       5749     5697      -52     
Flag Coverage Δ
unittests 86.78% <99.12%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/css/editor.css.js 100.00% <ø> (ø)
src/mouse/default_gutter_handler_test.js 98.83% <98.83%> (ø)
src/layer/gutter.js 90.49% <100.00%> (+0.03%) ⬆️
src/mouse/default_gutter_handler.js 64.95% <100.00%> (+39.71%) ⬆️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@akoreman akoreman marked this pull request as ready for review March 23, 2023 21:27
Copy link
Member

@nightwing nightwing left a comment

Choose a reason for hiding this comment

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

Looks good, and good to merge, but one thing that we should address in a follow-up pr, is that we should try to remove all the uses of innerHTML and use the safer buildDom method. This would help to remove lang.escapeHTML from setAnnotations for instance and keep annotation objects instead of breaking them into arrays of text and type.

@akoreman akoreman merged commit 3cd28b8 into ajaxorg:master Mar 24, 2023
@akoreman akoreman deleted the gutter_tooltip branch March 24, 2023 13:18
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.

2 participants