deneb-viz / deneb

Deneb is a custom visual for Microsoft Power BI, which allows developers to use the declarative JSON syntax of the Vega or Vega-Lite languages to create their own data visualizations.
https://deneb-viz.github.io
MIT License
191 stars 15 forks source link

Restore n-click Functionality for JSON Editor #468

Open dm-p opened 3 months ago

dm-p commented 3 months ago

Apparently JSONEditor had an advantage over Monaco editor in that double-clicking an opening enclosure (square bracket or brace) or triple-clicking would highlight all JSON within that segment, which was convenient for a few things. It would be useful if we could allow this in Monaco.

PBIQueryous commented 3 months ago

I've double-checked to confirm this behaviour.

In JSONEditor: • Double-Click: Highlights JSON within a opening enclosure (square/curly bracket) - this behaviour is consisten whether the mouse-click/curser is applied in-front or behind the bracket character. Thie same effect can be achieve my placing the text cursor next to the desired bracket and hitting Ctrl+Shift+M (expand to matching)

image



• Triple-Click: Highlights the JSON segment for the entire line(s) where the opening/closing enclosure sits. The same effect can be achieve by double-clicking then hitting Ctrl+Shift+L (aka: expand to line selection)

image



In Monca (v1.7 Deneb Editor) - the same functionality doesn't appear to be available. However, hovering the mouse cursor over the opening enclosure temporarily highlights the section, although somewhat fainter.

image
PBIQueryous commented 3 months ago

Upon futher investigation - we CAN achieve the selection functionality in Monaco with alternative keyboard shortcuts, but not with the mouse.

Expand Selection To End: Alt + Shift + Right Arrow Expand Selection To Start: Alt + Shift + Left Arrow

image