Commit Graph
801 Commits
Author SHA1 Message Date
David Lechner 0cb585b3e7 Revert "yarn: update react-complex-tree to v2.0.0"
This reverts commit f0434b50ed.

This requires react >= v18
2022-12-16 18:12:23 -06:00
David Lechner f560370b51 explorer: fix file tree label 2022-12-16 17:54:36 -06:00
David Lechner f0434b50ed yarn: update react-complex-tree to v2.0.0 2022-12-16 17:54:36 -06:00
David Lechner 8d05a73770 editor: fix aria labels on tablist and tabpanel 2022-12-16 17:54:36 -06:00
David Lechner 0b84b825b6 fileStorage/hooks: fix deps on useFileStorageUuid
This way if the path changes, we get the correct result.
2022-12-16 17:54:36 -06:00
David Lechner 78b962d397 fileStorage/hooks: fix deps on useFileStoragePath
This way, if uuid changes, we get the correct result.
2022-12-16 17:54:36 -06:00
David Lechner b38c302d7a activities: fix aria-label on tablist
For some reason the compiler didn't give an error even though aria-label
was not a valid property.
2022-12-16 17:54:36 -06:00
David Lechner 017fe81c43 status-bar: code completion status button role 2022-12-16 17:54:36 -06:00
David Lechner 7b8970e90f toolbar: add label for a11y 2022-12-16 17:54:36 -06:00
David Lechner 9e62259845 toolbar/ActionButton: use aria-disabled
Since buttons are only styled as disabled, we need to use aria-disabled
to tell screen readers that the button is disabled.
2022-12-16 17:54:36 -06:00
David Lechner dc27d45f20 editor: hide welcome logo from screen readers
The welcome logo/animation is just for fun/looks so screen readers
don't need to know about it.
2022-12-16 17:54:36 -06:00
David 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 d00297f53b app: drop focus-within styling
This ended up causing dual focus rings which goes against ARIA recommendations.
2022-12-16 17:54:36 -06:00
David Lechner a7c6f7abb1 toolbar: fix not focusing first button
This was missed in 85deb42f when the flash button was removed.
2022-12-16 17:54:36 -06:00
David Lechner 2810088889 app: add empty alternate to icons in scss
We are using font icons, so we don't want screen readers to try to read
them.
2022-12-16 17:54:36 -06:00
David Lechner 9944725be6 app: use aria landmark roles
This add use of the main and complementary roles (via semantic html
elements main and aside) to make it easy for assistive technologies
to jump to the major components of the app.
2022-12-16 17:54:36 -06:00
David Lechner 10079a4d14 terminal: exclude from keyboard tab focus
Since the terminal "steals" the tab key, we don't want to include it
in the keyboard tab list. It is still mouse focusable and we will
implement an landmark role for the terminal for assistive technologies.
2022-12-16 17:54:36 -06:00
David Lechner b7a9c20cfe app: remove use of deprecated iframe frameborder property
The recommended way to do this is to use style sheets instead.
2022-12-16 17:54:36 -06:00
David Lechner 303e768168 toolbar/ActionButton: improve focus ring visibility
Since the button and the focus ring are both blue, we need a gap in
order to have enough contrast to see the focus ring.
2022-12-16 17:54:36 -06:00
David Lechner b85945ab1d installPybricksDialog: fix heart icon
Use actual icon instead of unicode character. This way it renders the
same on all OSes.
2022-12-16 17:54:36 -06:00
Laurens Valk 6bc4dbbe99 toolbar/buttons: Copy edit. 2022-12-15 14:59:36 -06:00
Laurens Valk 9ceaeee739 firmware/installPybricksDialog: Make heart icon variable. 2022-12-15 14:59:36 -06:00
Laurens Valk 4a9f2931d4 firmware/bootloaderInstructions: Group instruction steps. 2022-12-15 14:59:36 -06:00
Laurens Valk e606887319 firmware/bootloaderInstructions: Simplify scss. 2022-12-15 14:59:36 -06:00
Laurens Valk c84d862a57 firmware/alerts: Copy edit. 2022-12-15 14:59:36 -06:00
Laurens Valk 67f05a580d firmware/bootloaderInstructions: Pass flashButtonText directly. 2022-12-15 14:59:36 -06:00
Laurens Valk 525faa1670 settings: Copy edit. 2022-12-15 14:59:36 -06:00
Laurens Valk 3286e4e20b notifications: Copy edit. 2022-12-15 14:59:36 -06:00
Laurens Valk 231fbbadeb mpy/alerts: Copy edit. 2022-12-15 14:59:36 -06:00
Laurens Valk 3648da6942 firmware/bootloaderInstructions: Copy edit battery instruction. 2022-12-15 14:59:36 -06:00
Laurens Valk 390cf235de firmware/bootloaderInstructions: Keep counting instructions.
This ensures the instruction step counter does not reset after a heading.
2022-12-15 14:59:36 -06:00
Laurens Valk d303e28756 firmware/bootloaderInstructions: Edit unsupported hubs. 2022-12-15 14:59:36 -06:00
Laurens Valk 8aa82eee46 firmware/bootloaderInstructions: Refactor.
- Use steps for the connection procedure
- Use categories (To do: consider making numbering consecutive)
- Show hub bootloader device name explicitly
- List official app to use for recovery (make V2/V3 explicit)
- Copy edit

Also fix the layout (class) of the installation panel to make it consistent with the style of the recovery panel.
2022-12-15 14:59:36 -06:00
Laurens Valk 560da418e0 firmware/bootloaderInstructions/translations: Add prepare section.
Since there are up to three things to prepare, it is better to start the
list with that. We can still keep a separate section for points that match the video.
2022-12-15 14:59:36 -06:00
Laurens Valk 2864fa93be firmware/alerts/translations: Copy edit. 2022-12-15 14:59:36 -06:00
Laurens Valk 3e56a6b493 editor/translations: Copy edit. 2022-12-15 14:59:36 -06:00
Laurens Valk 97ea2b1ac7 ble/alerts/translations: Copy edit. 2022-12-15 14:59:36 -06:00
Laurens Valk dd7f13d33f tour/translations: Copy edit. 2022-12-15 14:59:36 -06:00
David Lechner 4fcb82e361 bootloaderInstructions: add recovery variant
For official firmware recovery, we have separate videos for non-USB
hubs.

Closes: https://github.com/pybricks/support/issues/728
2022-12-09 15:02:15 -06:00
David 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 Lechner e12c86781a toolbar: don't wrap buttons
We can have better control over the layout and avoid wrapping by using flex.

Fixes: https://github.com/pybricks/support/issues/841
2022-12-08 17:10:47 -06:00
David Lechner bef91f948f app: fix resize handle visible through activity pane 2022-12-08 17:10:47 -06:00
David Lechner 936e142429 app: remember docs page on refresh
This persists the current docs page so that it is used on page reload
of the app. This is mostly useful for development since users should
not be refreshing the page.

It also remembers the selected page between sessions, so new windows
will open to the previous page.

Checks are added to default back to the docs index page in case the
"remembered" page is no longer valid.
2022-12-08 17:10:47 -06:00
David Lechner 74d8a258fb service-worker: don't serve index.html for static
This fixes issues where the index.html page can be served if we have
something that requests a static resource that does not exist. In the
worst case, this would the app appear recursively in the docs pane.

Also remove some unnecessary typing while we are touching this.
2022-12-08 17:10:47 -06:00
David Lechner cf74dc26ce app: bump copyright year displayed in app
We are a bit early but since will will do a final release soon, we
don't want the app to look out of date already on the first of the
year.
2022-12-08 17:10:47 -06:00
David 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 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 Lechner 55cf05d480 app: add drag handles to resizable separators
This makes them easier to discover and an easier target for touch.
2022-12-06 15:38:58 -06:00
David 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 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