-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Highlight label should not create extra span nodes #164657
Conversation
I noticed that the `HighlightedLabel` class creates extra `span` elements for text ranges. These should not be needed. Using text children directly should be faster for creation and also reduce the number of nodes in the document I also related the conditional spread with a longer version that uses a simple call to push. This is worth doing since `HighlightedLabel` is so widely used in the editor
Looks good to me, but @jrieken probably knows more why the span was added initially |
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.
This needs the same change as the smoke test (or should be removed):
vscode/src/vs/base/parts/quickinput/browser/media/quickInput.css
Lines 240 to 242 in eca16a8
.quick-input-list .quick-input-list-rows .monaco-highlighted-label span { | |
opacity: 1; | |
} |
* Highlight label should not create extra empty dom nodes I noticed that the `HighlightedLabel` class creates extra `span` elements for text ranges. These should not be needed. Using text children directly should be faster for creation and also reduce the number of nodes in the document I also related the conditional spread with a longer version that uses a simple call to push. This is worth doing since `HighlightedLabel` is so widely used in the editor * Update tests * Update smoke test selector * Update css
I noticed that the
HighlightedLabel
class creates extraspan
elements for text ranges. These should not be needed. Using text children directly should be faster for creation and also reduce the number of nodes in the documentI also replaced the conditional spread with a longer version that uses a simple call to push. This is worth doing since
HighlightedLabel
is so widely used in the editor