Commit Graph
116 Commits
Author SHA1 Message Date
David LechnerandDavid Lechner 48b99cb3a5 public/manifest: change display to "standalone"
"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
2022-12-21 20:27:21 -06:00
David LechnerandDavid Lechner 64b6251c1a terminal: add audio/visual feedback when no user program
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.
2022-12-21 16:28:17 -06:00
David Lechner ef81bb2341 v2.0.1 2022-12-21 13:27:33 -06:00
David Lechner 23db8f4d9b terminal: fix input handler loop getting stuck
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
2022-12-21 12:40:47 -06:00
David Lechner a12ae333f6 yarn: revert xterm to 5.0.0
xterm v5.1.0 broke scrolling so we lock in v5.0.0 for now.
2022-12-21 12:40:47 -06:00
David Lechner 49e9606321 v2.0.0 2022-12-20 15:39:26 -06:00
David Lechner 358e893ec6 package: update @pybricks/firmware to v3.2.0 2022-12-20 15:39:26 -06:00
David LechnerandDavid Lechner 5d3c74b777 firmware/dfuWindowsDriverInstallDialog: move instructions in app
This replaces the link for Windows DFU USB driver installation
instructions with a new in-app dialog containing the instructions.

Fixes: https://github.com/pybricks/support/issues/858
2022-12-19 15:17:31 -06:00
David LechnerandDavid Lechner eb4dff4972 explorer: focus file tree when empty area clicked
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
2022-12-16 17:54:36 -06:00
David Lechner e2a669650c v2.0.0-rc.1 2022-12-09 16:09:26 -06:00
David Lechner fa9cb07d69 CHANGELOG: add extra heading level for firmware changes 2022-12-09 16:08:00 -06:00
David Lechner c7d0b9d3bd @pybricks/firmware@v6.4.0: update firmware to v3.2.0c1 2022-12-09 16:06:53 -06:00
David LechnerandDavid Lechner 0f871c6b2c bootloaderInstructions: add videos
This adds videos to show how to enter bootloader mode.

Issue: https://github.com/pybricks/support/issues/728
2022-12-09 13:24:00 -06:00
David LechnerandDavid Lechner 614e0b0074 firmware: remove android check for chunk size
This should no longer be needed since Chrome v98 (released Nov. 2021).
2022-12-08 17:10:47 -06:00
David LechnerandDavid Lechner cc20ab8c35 editor: move docs toggle from settings
This removes the docs toggle switch from the settings and adds a new
docs toggle button to the editor.

Fixes: https://github.com/pybricks/support/issues/778
2022-12-06 15:38:58 -06:00
David LechnerandDavid Lechner 05445c1b07 settings: use sessionStorage for doc state
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
2022-12-06 15:38:58 -06:00
David LechnerandDavid Lechner ee850dec71 activities: use sessionStorage for selected tab
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
2022-12-06 15:38:58 -06:00
David LechnerandDavid Lechner 27b2c42023 tour: open settings when triggered from startup
Since we moved the first tour step to a possibly hidden place, we need
to make sure it is showing before starting the tour.

Fixes: https://github.com/pybricks/support/issues/823
2022-12-05 13:17:37 -06:00
David LechnerandDavid Lechner f5fbea905f CHANGELOG: move link into correct section 2022-12-05 13:17:37 -06:00
David Lechner ec556e8589 v2.0.0-beta.12 2022-12-02 12:10:17 -06:00
David Lechner 19878cbac6 update @pybricks/firmware to firmware v3.2.0b2 2022-12-02 11:54:18 -06:00
David Lechner a443ced3f4 CHANGELOG: add entry for 71c8605 2022-12-02 11:37:22 -06:00
David LechnerandDavid Lechner 99760146a6 tour: move button to settings
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.
2022-12-01 17:08:19 -06:00
David LechnerandDavid Lechner 6a979cafa8 editor: add pybricks logo welcome 2022-12-01 17:08:19 -06:00
David LechnerandDavid Lechner 95199e44c1 hub/alerts/UserProgramSize: add alert for program too big
This finishes the TODO about adding a proper message.

Fixes: https://github.com/pybricks/support/issues/810
2022-11-22 15:56:56 -06:00
David LechnerandDavid Lechner b5b857bca5 firmware/sagas: implement restoring official firmware
Closes: https://github.com/pybricks/pybricks-code/issues/1104
2022-11-18 19:28:00 -06:00
David LechnerandDavid Lechner f167f168ee fix missing icons
Warning sign was missed in 90b04f8. 20px error and info are added just
in case.
2022-11-18 19:28:00 -06:00
David Lechner abb4578450 v2.0.0-beta.11 2022-11-11 13:00:40 -06:00
David Lechner 6f91c57743 firmware/sagas: add delay after connecting
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
2022-11-11 13:00:40 -06:00
David Lechner b2e098f2dd app: catch error when checking for updates
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
2022-11-11 13:00:40 -06:00
David Lechner e31a567f93 vv2.0.0-beta.10 2022-11-11 12:02:59 -06:00
David LechnerandDavid Lechner 11d3a81426 update @pybricks dependencies 2022-11-11 11:59:51 -06:00
David LechnerandDavid Lechner 3974613738 activities: fix not scrolling on overflow
This adds css needed to make the activities tab view contents scroll
appropriately when the contents don't fit vertically.

Fixes: https://github.com/pybricks/support/issues/782
2022-11-08 13:56:38 -06:00
David LechnerandDavid Lechner cb5101282b firmware/sagas: fix checksum validation
The checksum can be 0, so we can't be lazy and use `!checksum` to test
for undefined.

Issue: https://github.com/pybricks/support/issues/724#issuecomment-1295929316
2022-10-29 14:05:31 -05:00
David LechnerandDavid Lechner 03f6c004db sponsor: add new button and dialog
Issue: https://github.com/pybricks/support/issues/719
2022-10-28 18:01:39 -05:00
David LechnerandDavid Lechner ede6f80f49 explorer/newFileWizard: add empty file option
Fixes: https://github.com/pybricks/pybricks-code/issues/771
2022-10-28 18:01:39 -05:00
David Lechner e7665a2f9f v2.0.0-beta.9 2022-10-27 13:25:47 -05:00
David LechnerandDavid Lechner c49f37f5e4 editor: lazy load
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.
2022-10-27 13:17:51 -05:00
David Lechner 57c87da464 editor: disable word-based suggestions
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
2022-10-25 13:48:02 -05:00
David LechnerandDavid Lechner e41a297922 editor: close tab on middle-click
Fixes: https://github.com/pybricks/support/issues/758
2022-10-25 12:57:07 -05:00
David Lechner c763b2ef72 v2.0.0-beta.8 2022-10-25 11:50:06 -05:00
David Lechner ed8394bf84 pybricksMicropython/lib: handle exceptions when parsing
The new code parsing library raises exceptions when there are syntax
errors, so this needs to be handled.

Fixes: https://github.com/pybricks/support/issues/755
2022-10-25 11:50:06 -05:00
David Lechner 07b929cde3 v2.0.0-beta.7 2022-10-24 15:30:50 -05:00
David Lechner 0e2a0f909a pybricksMicropython/lib: replace parser
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.
2022-10-24 15:21:52 -05:00
David LechnerandDavid Lechner a3a6e1bc6f CHANGELOG: fix link 2022-10-21 17:09:02 -05:00
David Lechner fcffef37d4 v2.0.0-beta.6 2022-10-21 16:26:43 -05:00
David Lechner 6692ab6fae CHANGELOG: update for dependencies and missed changes 2022-10-21 16:26:43 -05:00
David LechnerandDavid Lechner ce16d15ab0 CHANGELOG: update for 56630ef2 2022-10-14 16:21:18 -05:00
David Lechner 76462a0f4a python-worker: enable offline use
This makes the required changes to use Pyodide and Python packages
offline and use a fixed version of the Python packages instead of
fetching the latest from PyPI.

There were a number of issues encountered with Pyodide webpack
compatibility that were fixed using `yarn patch`:
- https://github.com/pyodide/pyodide/pull/3080
- https://github.com/pyodide/pyodide/pull/3085
- https://github.com/pyodide/pyodide/issues/3086
- https://github.com/pyodide/pyodide/issues/3087

Issue: https://github.com/pybricks/pybricks-code/issues/932
2022-09-08 13:43:00 -05:00
David Lechner 4e77efb34f installPybricksDialog: add feature to install custom firmware
This restores the ability to drag and drop a custom firmware file to
flash the firmware on the hub.

Fixes: https://github.com/pybricks/pybricks-code/issues/1020
2022-09-06 14:14:57 -05:00