-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
fix: use dom builder for gutter tooltip and inline widget #5601
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5601 +/- ##
==========================================
- Coverage 86.79% 86.78% -0.01%
==========================================
Files 594 594
Lines 43091 43105 +14
Branches 7147 7147
==========================================
+ Hits 37400 37410 +10
- Misses 5691 5695 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
src/autocomplete/inline_test.js
Outdated
@@ -306,7 +305,7 @@ module.exports = { | |||
}, 50); | |||
}, 50); | |||
}, | |||
tearDown: function() { | |||
tearDown: function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a small indentation error was added? Maybe we could add prettier
sometime
tearDown: function() { | |
tearDown: function() { |
src/virtual_renderer_test.js
Outdated
@@ -395,7 +395,7 @@ module.exports = { | |||
editor.renderer.$loop._flush(); | |||
assert.equal(editor.renderer.content.textContent, "abcdefThis is a long test text that is longer than "); | |||
|
|||
assert.equal(editor.session.lineWidgets[0].el.innerHTML, "<div class=\"ghost_text_line_wrapped\">30 characters</div><div></div><div>Ghost3</div>"); | |||
assert.equal(editor.session.lineWidgets[0].el.innerHTML, `<div class="ghost_text_line_wrapped">30 characters</div><div class=""></div><div class="">Ghost3</div>`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do the empty classes come from? Are they a consequence of using dom.createElement
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you confirm whether this was tested manually (e.g., in the kitchen sink) too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the empty classes are a consequence from chunkDiv.className = el.wrapped ? "ghost_text_line_wrapped": "";
. I can change it so we only set the classname if it's needed that might be cleaner indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue #, if available: #5575
Description of changes: Changes how we construct the gutter tooltip and inline widget to use the dom building utilities.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Pull Request Checklist:
ace.d.ts
) and its references: