189cda94b1
build(deps): bump xterm and xterm-addon-fit ( #1146 )
...
* build(deps): bump xterm and xterm-addon-fit
Bumps [xterm](https://github.com/xtermjs/xterm.js ) and [xterm-addon-fit](https://github.com/xtermjs/xterm.js ). These dependencies needed to be updated together.
Updates `xterm` from 4.19.0 to 5.0.0
- [Release notes](https://github.com/xtermjs/xterm.js/releases )
- [Commits](https://github.com/xtermjs/xterm.js/compare/4.19.0...5.0.0 )
Updates `xterm-addon-fit` from 0.5.0 to 0.6.0
- [Release notes](https://github.com/xtermjs/xterm.js/releases )
- [Commits](https://github.com/xtermjs/xterm.js/compare/0.5...0.6 )
---
updated-dependencies:
- dependency-name: xterm
dependency-type: direct:production
update-type: version-update:semver-major
- dependency-name: xterm-addon-fit
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
* [dependabot skip] Fix yarn.lock
* fix breaking changes for xterm.js 5.x
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-fix <dependabot-fix@example.com >
Co-authored-by: David Lechner <david@pybricks.com >
2022-09-17 18:14:24 +00:00
6c373c302c
build(deps): bump pyodide from 0.21.2 to 0.21.3 ( #1144 )
...
* build(deps): bump pyodide from 0.21.2 to 0.21.3
Bumps [pyodide](https://github.com/pyodide/pyodide ) from 0.21.2 to 0.21.3.
- [Release notes](https://github.com/pyodide/pyodide/releases )
- [Commits](https://github.com/pyodide/pyodide/compare/0.21.2...0.21.3 )
---
updated-dependencies:
- dependency-name: pyodide
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* [dependabot skip] Fix yarn.lock
* update patch for pyodide 0.21.3
* make use of new pyodide version export
* fix breaking change in loadPyodide indexURL
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-fix <dependabot-fix@example.com >
Co-authored-by: David Lechner <david@pybricks.com >
2022-09-17 18:05:44 +00:00
David Lechner
56630ef2cf
firmware/installPybricksDialog: drop support for including custom main.py
...
This removes the UI and internal support for selecting a file to include
as the main.py when flashing firmware. This feature was removed in the
firmware starting with firmware metadata v2.0.0 so the firmware that
ships with Pybricks code won't be able to do this in the near future.
So, it doesn't make sense to keep this feature only for old firmware.
It is still possible to replace the main.py in old firmware.zip files
and flash that way.
2022-09-14 18:12:34 -05:00
David Lechner
9811807d09
firmware: add support for firmware.metadata.json v2.0.0
...
This adds support for the new firmware.metadata.json v2.0.0 which drops
support for appending a main.py file to the firmware.
2022-09-14 17:58:54 -05:00
David Lechner
c4d98638b1
firmware/actions: fix error type check
...
we need to check that it matches the error interface, not that it is
an instance of an error
2022-09-14 17:38:19 -05:00
David Lechner
0bd4a7a282
Merge remote-tracking branch 'origin/master' into dlech
2022-09-13 14:24:43 -05:00
David Lechner
7e2404d583
pybricksMicropython: add support for peer file code completion
...
This allows importing user-created files and getting code completion
for those imports. This is done by mirroring the dexie-based file
system used by the editor to the emscripten based file system used
by pyodide. In the future, ideally we would have some sort of shared
file system, but this works for now.
Note: completing `from ` doesn't list user files/modules because of
filters in the pybricks-jedi python package but completing
`from my_file import ` does work as expected.
2022-09-13 14:19:29 -05:00
9994e8f4b4
build(deps): bump jest and @types/jest ( #1131 )
...
* build(deps): bump jest and @types/jest
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest ) and [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest ). These dependencies needed to be updated together.
Updates `jest` from 28.1.3 to 29.0.3
- [Release notes](https://github.com/facebook/jest/releases )
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md )
- [Commits](https://github.com/facebook/jest/commits/v29.0.3/packages/jest )
Updates `@types/jest` from 28.1.8 to 29.0.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest )
---
updated-dependencies:
- dependency-name: jest
dependency-type: direct:production
update-type: version-update:semver-major
- dependency-name: "@types/jest"
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
* [dependabot skip] Fix yarn.lock
* update test snapshots for jest 29
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-fix <dependabot-fix@example.com >
Co-authored-by: David Lechner <david@pybricks.com >
2022-09-13 17:06:24 +00:00
David Lechner
f24db4a89b
implement cache bursting based on http header version
...
In 096eea7 , we made use of APIs that require special http headers to be
configured on the server. This had a side effect of causing the
documentation iframe to not load because the browser would cache the
headers of the iframe index.html page.
We can work around this by providing a header version to do cache
bursting via a query parameter on this page.
2022-09-09 11:33:20 -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
ebb8900efe
installPybricksDialog: make use of isMounted hook
...
This simplifies the code a bit by using an existing hook.
2022-09-06 11:10:49 -05:00
David Lechner
b447bd7a3a
replace use of deprecated IToaster and IToastProps
2022-09-06 10:56:38 -05:00
David Lechner
677d285ef2
installPybricksDialog: move unsupported hubs to separate component
2022-09-03 14:06:25 -05:00
David Lechner
b4e1c8293d
replace use of deprecated IRef
2022-09-01 11:45:59 -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
722fc3d8ef
index: suppress nonserializable 'props.error'
2022-08-12 18:00:57 -05:00
David Lechner
359c01642e
index: ignore non-serializable 'payload'
...
This suppresses redux-toolkit errors in the console log.
2022-08-12 18:00:57 -05:00
David Lechner
968834d84f
firmware/alerts/FlashProgress: fix <div> cannot be child of <p>
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
3ce644d2b3
explorer/Explorer: work around breaking changes in @testing-library/user-event
...
@testing-library/user-event "fixed" some hover bugs which broke our
usage, so we need to work around it.
2022-08-03 13:03:18 -05:00
6d716f8bbd
build(deps): bump react-aria from 3.17.0 to 3.18.0 ( #1021 )
...
* build(deps): bump react-aria from 3.17.0 to 3.18.0
Bumps [react-aria](https://github.com/adobe/react-spectrum ) from 3.17.0 to 3.18.0.
- [Release notes](https://github.com/adobe/react-spectrum/releases )
- [Commits](https://github.com/adobe/react-spectrum/compare/react-aria@3.17.0...react-aria@3.18.0 )
---
updated-dependencies:
- dependency-name: react-aria
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
* [dependabot skip] Fix yarn.lock
* add react-aria type override
This works around https://github.com/adobe/react-spectrum/issues/3375
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-fix <dependabot-fix@example.com >
Co-authored-by: David Lechner <david@pybricks.com >
2022-08-03 17:18:21 +00:00
David Lechner
e3fece1517
toolbar/TourButton: fix test when env var set
...
The name depends on the environment and this test failed during release.
2022-07-28 10:32:19 -05:00
David Lechner
90b459d5db
firmware/restoreOfficialDialog: add new dialog
2022-07-27 18:17:20 -05:00
David Lechner
c84afea181
style: make use of more blueprint styles
...
https://blueprintjs.com/docs/#core/typography
Also fix wrapping license text while we are touching this.
2022-07-27 16:55:46 -05:00
David Lechner
e6609b9054
firmware/installPybricksDialog: fix <div> inside <p>
...
fixes:
Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
Also some other style tweaks while we are touching this.
2022-07-27 16:22:46 -05:00
David Lechner
ad774e0f7c
suppress redux non-serializable error for error objects
2022-07-27 15:34:39 -05:00
David Lechner
3953816350
components/hubPicker: back state with localStorage
...
This saves the selected hub in localStorage. This will "remember" the
state between app launches and also synchronize the state between
various users of the component. Both of these should mean fewer clicks
required by the user.
2022-07-27 15:30:39 -05:00
David Lechner
8bece7d957
tour: add new tour component
2022-07-27 15:19:36 -05:00
David Lechner
2b7f1b1cbf
firmware/sagas: show progress for BLE flashing
2022-07-27 15:19:36 -05:00
David Lechner
1148b169d5
firmware: add progress indication for DFU USB flash
2022-07-27 15:19:36 -05:00
David Lechner
8dadc8826c
firmware/installPybricksDialog: increase height
...
This ensures the dialog doesn't change size when clicking next even
with longer translations.
2022-07-27 15:19:36 -05:00
David Lechner
4e85b5c1b8
firmware/installPybricksDialog: rename flash button
...
This makes it clear there are two steps, connect and then flash.
2022-07-27 15:19:36 -05:00
David Lechner
76444c032c
firmware/installPybricksDialog: add warning for windows/linux usb
...
This warns the user before failure. Otherwise they will click the flash
button and no devices will appear in the scan dialog.
2022-07-27 15:19:36 -05:00
David Lechner
934330272f
alerts/sagas: avoid reentrancy for dismiss
...
This fixes react complaining about calling setState from an invalid
context.
2022-07-22 15:29:11 -05:00
David Lechner
e6782cb291
index: avoid more non-serializable dev tool errors
2022-07-22 15:07:10 -05:00
David Lechner
9d1f3651c5
alerts/actions: fix alertsShowAlert action with props
2022-07-22 14:45:47 -05:00
David Lechner
e3430260f9
firmware/alerts/NoDfuHub: fix translation key
2022-07-22 14:03:33 -05:00
David Lechner
d6df128860
i18n: use automatic type inference of translation keys
...
Finally figured out a way to make typescript strongly type translation
keys so we can avoid the tedium of creating enums of translation keys.
2022-07-22 13:48:50 -05:00
David Lechner
6d07713eb5
firmware: implement flashing via USB DFU
2022-07-21 18:36:32 -05:00
David Lechner
28f63d5d85
utils/math: add crc32 function
...
This matches the STM32 hardware CRC.
2022-07-21 14:27:27 -05:00
David Lechner
bb6f86ff18
firmware/installPybricksDialog: add bootloader discrimination
...
Also fix license not showing for newer hubs.
2022-07-20 18:51:45 -05:00
David Lechner
709c3c554b
bump @pybricks/firmware to 5.0.0
...
This contains a breaking change where main.py is now optional so we
have to handle that case.
2022-07-20 18:01:35 -05:00
David Lechner
1d2c55eba6
ble/alerts: move old firmware from notifications
...
also add button to open new install firmware dialog
2022-07-20 17:26:08 -05:00
David Lechner
0721a24ef8
firmware/installPybricksDialog: fix some layout issues
2022-07-20 15:24:36 -05:00
David Lechner
af8a31d50c
firmware: add select picker for selecting custom main.py
2022-07-20 14:25:40 -05:00
David Lechner
85deb42f76
firmware: add multi-step dialog
2022-07-20 12:32:17 -05:00
David Lechner
b70777178c
editor/sagas: avoid console noise in tests
2022-07-18 14:54:44 -05:00