When we import/replace a file that is open in an editor, instead of
modifying the file in storage, we need to modify the file in the editor.
This allows the modification to be pushed on the undo stack so that
the user can undo the change in case it wrote over any of their recent
changes.
Issue: https://github.com/pybricks/support/issues/975
To avoid the Linux feature of pasting on middle click, we need to
consume the mouse up event in the browser on middle click instead of
mouse down.
This also sets the `selectionClipboard` editor option to false which
should disable the feature altogether in the monaco editor but the
setting seems to be broken in the browser[1].
[1]: https://github.com/microsoft/vscode/issues/181050
Fixes: https://github.com/pybricks/support/issues/1046
- Add check for repl start command success/fail.
- Show error message on fail.
- Rename start repl action.
- Add new did start/did fail to start repl actions.
- Change terminal saga to use did start repl action to focus terminal.
- Add more tests.
WebBluetooth generally uses DomException with name NetworkError to mean
that Bluetooth is disconnected, so we can use that to provide a helpful
error message.
When disconnect is requested, we should not longer allow interacting
with the hub, so we say the runtime state is unknown until it is
confirmed to be disconnected.
Fixes: https://github.com/pybricks/support/issues/1021
Also add a new dialog to get user input when file names conflict.
Previously, we were not supplying a list of existing files, so existing
files were silently written over.
Fixes: https://github.com/pybricks/support/issues/833
When gotoError fails to activate a file, we need to show an error
message, otherwise it just appears to the user that the button is
broken.
Fixes: https://github.com/pybricks/support/issues/924
Some new issues with layout when resizing the browser window vertically
were caused either by recent xterm updates or other recent style changes.
This works around those issues.
The pybricks_jedi package was filtering on only pybricks modules but
now has a feature to amend the filter to include user modules.
Fixes: https://github.com/pybricks/support/issues/759
The package we were using was only for Python 3.4 and didn't include
async/await which broke imports in any script that used async/await.
Fixes: https://github.com/pybricks/support/issues/873
"fullscreen" is for immersive apps like games (and is only available
on Android currently which is why we didn't notice the app going
fullscreen on desktop).
Fixes: https://github.com/pybricks/support/issues/867
Characters typed into the terminal are only sent to the hub when a user
program is running. This provides audio and visual feedback to indicate
to the user that keystrokes have no effect when the user program is not
running.
When no hub is connected, the terminal input handler loop would get
stuck waiting for didWrite or didFailToWrite which would never come
because handleWriteUart in ble/sagas only runs when a hub is connected.
This is fixed by only dispatching a write action if a user program is
running on the hub. By using this state, it also fixes characters being
buffered before the user program starts, e.g.
- connect hub
- type into terminal - no echo
- start the repl
- previously typed characters are echoed after the repl prompt
Now, anything typed before the user program is just ignored.
Fixes: https://github.com/pybricks/support/issues/865
Also properly fixes https://github.com/pybricks/support/issues/303
This adds an event listener to catch focus events when clicking the
empty area below the file list. Users intuitively expect this to focus
the file list.
Fixes: https://github.com/pybricks/support/issues/856