devtools-highlighter
devtools-highlighter copied to clipboard
[discussion] Only highlight elements on hover, not all of them from the start
Not a bug or feature, I just want to discuss something.
From the start, my goal with this extension was to highlight elements in a page. I wanted a quick way for users to type in some search criteria and have the matching elements be visually highlighted in the page directly.
This is why the current behaviour is that all matches get highlighted from the start. And then as you hover over nodes in the output panel, only these individual nodes get highlighted. But as soon as mouse out of the panel, all nodes get highlighted again.
After some time using this, I find this a bit distracting. More often than not, I don't actually want all of these elements to be highlighted, and all I care about is the list of results in the panel and either scrolling to an element or selecting it in the inspector.
Also seeing how people like the CSS computed style search feature, I think the goal of this extension is to find things, not necessarily highlight them.
So in commit 984dfd4218abad995f7f4fdb78633af79a2d3a17 I proceeded to remove the highlight all feature. Now elements only get highlighted on hover, but by default nothing gets changed in the page.
@rajatvijay @juliandescottes @jonathanGB you all contributed to this extension in some way, I'd be interested to know about your point of view on this, but anyone should feel free to chime in.
Totally agree with you, I prefer it that way too.
May I suggest that if we click on the element in the list, it stays highlighted? That way we can click on multiple items to see them highlighted, and clicking again the item would toggle it? Don't know if it makes sense / would be useful. What do you think?
Thanks Jonathan. I think that sounds pretty good.