David Lechner
2ba6d88c49
editor: remove gutter background override
...
This was carried over from the Ace editor, but doesn't work well with
the Monaco editor.
Fixes: https://github.com/pybricks/pybricks-code/issues/472
2021-07-08 15:57:16 -05:00
David Lechner
9ee2d1f102
editor: clean up keywords and builtins
...
- remove python 2 stuff
- separate builtins from keywords
2021-07-08 15:56:27 -05:00
David Lechner
ad948dc152
editor: copy python language configuration
...
This copies the language configuration from https://github.com/microsoft/monaco-languages/blob/d7cc098c481059f63d51ce3753975c8ca8ab6030/src/python/python.ts
This fixes a number of editor features, like auto-indent.
Fixes: https://github.com/pybricks/pybricks-code/issues/470
2021-07-08 15:55:50 -05:00
David Lechner
4b0dc90e8d
editor: improve template snippets
...
- fix always being suggested
- add more imports
- reduce duplicated code
Fixes https://github.com/pybricks/pybricks-code/issues/471
2021-07-08 15:55:03 -05:00
David Lechner
d95c550248
editor: change from ace to monaco
...
This replaces the ace editor with the monaco editor. It fixes quite a
few small paper-cut bugs and should be easier to add code completion
to in the future.
Many of the snippets are omitted but can be added back later if needed.
Otherwise, we have tried to preserve the existing look and feel as much
as possible.
2021-07-02 20:59:09 -05:00
David Lechner
ec6753c314
yarn lint
...
rules seem to have changed a bit after upgrading packages
2021-05-11 12:45:43 -05:00
David Lechner
9005e909ba
refactor common context menu code
2021-02-01 10:26:06 -06:00
David Lechner
4b6817d9ad
drop use of decorator for editor context menu
2021-02-01 10:26:06 -06:00
David Lechner
6ccb77a5ad
add test for snippets
2021-02-01 10:26:06 -06:00
David Lechner
6ed5dca8ce
add tests for editor reducers
2021-02-01 10:26:05 -06:00
David Lechner
e5073399a0
drop explicit state interfaces
...
This could cause subtle bugs like the one fixed here where license
was renamed to licenses.
2021-02-01 10:26:05 -06:00
David Lechner
0c20e52a45
don't allow optional args in actions
...
This can lead to subtle bugs.
Fixes firmware flash button not working.
2021-02-01 10:26:05 -06:00
David Lechner
6f204a65f6
reorganize src/ directory
...
Makes for much less scrolling/jumping around.
https://redux.js.org/style-guide/style-guide#structure-files-as-feature-folders-or-ducks
2021-02-01 10:26:05 -06:00