"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
This adds use of sessionStorage for the documentation visibility toggle.
This way, when multiple windows are open, the docs can be controlled
separately in each window. Local storage is still used as the default
value for new windows.
Issue: https://github.com/pybricks/support/issues/807
The useLocalStorage hook synchronizes state between windows. In the
case of the activities tabs, we don't want this state synchronized,
otherwise changing a tab in one window would change the tab in all
open windows.
Instead, we can use sessionStorage so that the state persists when
refreshing or duplicating a browser tab. Local storage is still used
as the default value so that any new window that is opened will use
the last selected state.
Issue: https://github.com/pybricks/support/issues/807
Since we have the Pybricks logo elsewhere now, we don't need to have
this button on the toolbar. Instead, put it in the settings where it
is out of the way, but can still be used to watch the tour again if
desired.
Some steps are reordered so we don't jump back and forth between
activities since we are starting from the settings tab now.
Also fix changing the selected activities tab when closing the tour.
This adds a delay after connecting to a hub when flashing firmware via
BLE before sending any commands. This gives the OS Bluetooth stack time
to finish enumerating the Bluetooth device before we start trying to
interact with the device. Hopefully this fixes issues for some people
who are seeing problems while flashing firmware.
Issue: https://github.com/orgs/pybricks/discussions/792
ServiceWorkerRegistration.update() can raise exceptions, so we need to
catch and handle them, otherwise it will crash redux sagas and the app
will stop responding.
Fixes: https://github.com/pybricks/pybricks-code/issues/1299
This makes the required changes needed to make the editor components
and sagas lazy-load to improve the time before the first render of the
app.
This is done by making sure we only import types from the monaco editor
module anywhere other than the saga and the component modules and using
React.lazy to lazy-load the component and start the sagas.
This cuts the main bundle time to less than 1/2 so load time should be
over twice as fast now.
This turns off the default word-based suggestions. This was useful when
we didn't have proper code completion but now can be distracting.
Fixes: https://github.com/pybricks/support/issues/757
This replaces the Python parsing library. The python-ast package has
really poor performance (many seconds to parse a 500 line file). The
new package can parse a file about 100 times faster.