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
David Lechner
cabd53ac49
ble/actions: drop fail to connect reason
...
This is not longer used and can be removed.
2022-07-18 14:51:42 -05:00
David Lechner
c0215aa3ec
ble/sagas: move console logging to saga
2022-07-18 14:46:04 -05:00
David Lechner
d3be7775b2
ble/alerts: move missing service from notifications
2022-07-18 14:43:30 -05:00
David Lechner
5a77686e27
ble/alerts/NoGatt: move gatt message from notifications
2022-07-15 18:26:48 -05:00
David Lechner
bfdd7e728b
lwp3-bootloader/sagas-ble: remove obsolete comment
2022-07-15 18:05:48 -05:00
David Lechner
a86967573c
ble: add 1 second delay after connecting
...
This might help with some people that have connection issues where the
OS is still busy enumerating the device when we are trying to read
characteristics.
2022-07-15 18:05:48 -05:00
David Lechner
662a1ae097
ble/sagas: rework connect saga
...
This gets rid of a bunch of try/catch and repeated code.
2022-07-15 18:05:48 -05:00
David Lechner
bbe7eb4df3
ble: avoid aliases for UUID constants
2022-07-15 18:05:48 -05:00
David Lechner
15ecdf998d
ble/sagas: use alerts for unexpected error instead of notifications
2022-07-15 13:47:37 -05:00
David Lechner
ef0cd6507d
ble/alerts: move bluetooth not available from notifications
2022-07-15 13:19:31 -05:00
David Lechner
f86a9ad051
ble/alerts: move and improve no web bluetooth message
2022-07-15 13:16:53 -05:00
David Lechner
b2b173e103
utils/os: add Linux and iOS
...
Also update to navigator.userAgentData to avoid warnings from chromium.
2022-07-15 12:37:36 -05:00
David Lechner
e9f9aca3ef
ble/sagas: don't spam console in tests
2022-07-15 11:42:44 -05:00
David Lechner
ecd32e61b9
ble/actions: namespace actions
...
This way we don't have to use aliases when importing.
2022-07-15 11:16:23 -05:00
David Lechner
25e86c2f60
ble/sagas: flatten tests
...
This removes much of the nesting in tests to make the code easier to
read. Also we can now add more coverage for all of the skipped error
paths.
2022-07-14 20:44:24 -05:00
David Lechner
af2386178d
ble/sagas: add basic test
...
This gets about 50% coverage of the ble sagas.
2022-07-14 18:15:34 -05:00