Commit Graph
92 Commits
Author SHA1 Message Date
David 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 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 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 Lechner 11d3a81426 update @pybricks dependencies 2022-11-11 11:59:51 -06:00
David 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 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 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 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 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 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 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 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
David Lechner d59fe813e9 fix explorer import silently ignored when invalid file name
This finishes a TODO to handle allowing the user to rename a file
with an invalid file name when import files from the file system.

Fixes: https://github.com/pybricks/support/issues/717
2022-08-31 17:39:28 -05:00
David Lechner 122b37da29 firmware/sagas: handle usb error during dfu flash
Fixes: https://github.com/pybricks/pybricks-code/issues/1011
2022-08-12 18:00:57 -05:00
David Lechner 5b71c7314a app/App: move firmware flash dialogs from settings
The flash firmware dialog show action can be triggered even when the
settings panel is not mounted, so we need to move the dialogs up in
the tree to the app level.

Fixes: https://github.com/pybricks/support/issues/694
2022-08-12 18:00:57 -05:00
David Lechner 92431298b2 toolbar/RunButton: enable only when active file
Before multi-file support, it was not possible to have no open file.
So we need to change the state logic to only enable the button when
there is an active file rather than when the editor "is ready".

Fixes: https://github.com/pybricks/support/issues/691
2022-08-12 18:00:57 -05:00
David Lechner 3ac399e73c v2.0.0-beta.5 2022-07-28 11:47:18 -05:00
David Lechner 30314db086 webpack: fix main.[hash].js not cached
This caused updates to not work if main.js was not in the browser
cache since it was being excluded from the service worker.

Issue: https://github.com/pybricks/support/issues/689
2022-07-28 11:44:59 -05:00
David Lechner 2908ac358d v2.0.0-beta.4 2022-07-28 10:25:33 -05:00
David Lechner 90b459d5db firmware/restoreOfficialDialog: add new dialog 2022-07-27 18:17:20 -05:00
David Lechner bbd278b51e CHANGELOG: add link for dfu flash issue 2022-07-27 17:27:17 -05:00
David Lechner b2e7441a81 CHANGELOG: add entry for package updates 2022-07-27 17:20:53 -05:00
David Lechner 8bece7d957 tour: add new tour component 2022-07-27 15:19:36 -05:00
David Lechner 6d07713eb5 firmware: implement flashing via USB DFU 2022-07-21 18:36:32 -05:00
David Lechner 85deb42f76 firmware: add multi-step dialog 2022-07-20 12:32:17 -05:00
David Lechner 7232bf6153 add better error message when no files to backup
Instead of showing unexpected error, show message explaining that
there are no files to be backed up and how to fix it.

Fixes: https://github.com/pybricks/support/issues/681
2022-07-06 17:56:08 -05:00
David Lechner 1e0d44bbe4 Fixed deleting files that are not open in the editor. 2022-07-06 17:56:08 -05:00
David Lechner 7c623325c7 v2.0.0-beta.3 2022-07-06 14:40:37 -05:00
David Lechner d548c20062 update Pybricks firmware to v3.2.0b2 2022-07-06 13:23:34 -05:00
David Lechner fa315fa576 v2.0.0-beta.2 2022-06-24 19:21:43 -05:00
David Lechner 096eea7077 editor: add basic intellisense
This adds basic intellisense for code completion and function signatures
using the Python `jedi` package running in a Pyodide environment.
2022-06-24 19:15:32 -05:00
David Lechner e8facf949e v2.0.0-beta.1 2022-06-03 14:17:58 -05:00
David Lechner 2982ccb874 CHANGELOG: update for dependencies 2022-06-03 13:40:04 -05:00
David Lechner e43610f6ae CHANGELOG: add links for issues
Issue: https://github.com/pybricks/support/issues/418
Issue: https://github.com/pybricks/support/issues/465
2022-06-01 14:08:08 -05:00
David Lechner 64cf4821b1 CHANGELOG: update for multi-file support 2022-06-01 13:12:25 -05:00
David Lechner e4b7a9aec7 fileStorage: new file storage backend
This replaces the localStorage file storage with a new backend that uses
localForage (indexeddb) for storing the file contents. This will also
allow storing multiple files.
2022-02-24 16:59:49 -06:00