* Move format code button to menu item
by extending CollapsiblePanel to take an optional
menu React element.
Signed-off-by: Frank Noirot <frank@kittycad.io>
* Style tweaks
* Add shortcuts for format and cmd bar to codemirror
* Move convert to variable into code menu
Signed off by Frank Noirot <frank@kittycad.io>
* Add keyboard shortcut to convert to variable
* Remove convert to variable from toolbar
* Refactor: move TextEditor to its own component
* Set a better convertToVar shortcut
* Style and ergonomic polish for convertToVar modal
* Use named constants for shortcuts 😇
* Try yet another keyboard shortcut
* Fix formatting
* remove isShiftDown from app.tsx
---------
Signed-off-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* Refactor getNodePathFromSourceRange
getNodePathFromSourceRange wouldn't go as deep as it should have,
stopping at pipe expressions, when it should have followed as deep
into the ast as possible.
The fact that it stopped early then had other part of the code base that
expected this behaviour and it effected a lot, so a rather large refactor
* overhaul of getNodePathFromSourceRange
* quick fix for moreNodePathFromSourceRange
* minor bugs in moreNodePathFromSourceRange
* couple more tests
* add moveValueIntoNewVariable
* add UI for replacing valuse with variable
* update button text