Consider highlighting the whole expression when displaying the preview popup
Categories
(DevTools :: Debugger, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: nchevobbe, Unassigned)
References
(Blocks 1 open bug)
Details
When paused, if there's a line with this.props.myProp, when hovering myProp, we only highlight the hovered token (so myProp).
It would be nice to highlight the whole expression (this.props.myProp).
We used to do that before, but it was changed in Bug 1565715, as I guess we weren't highlighting text nodes, which could look a bit funny.
I feel like the change was a bit drastic, and instead of only highlighting the hovered token, we can find a way to highlight the whole expression, text nodes included.
The current implementation relies on adding a class on the token we want to highlight (which was probably why we weren't highlighting text nodes). When available, it should be easy to switch to the CustomHighlight API, which will make it trivial to handle text nodes as well.
We could even do some "progressive enhancement" right now, since the CustomHighlight API is available on Nightly.
Updated•4 months ago
|
Updated•1 month ago
|
Description
•