Commit Graph
20 Commits
Author SHA1 Message Date
David Lechner 65e5627568 update to blueprintjs 5.x 2023-06-28 14:42:55 -05:00
David Lechner bf4670b25d update to react 18
We were stuck on react 16.x for a long time but dependencies seem to
have caught up enough that migration is trivial now.
2023-05-17 16:33:47 -05:00
David Lechner d88ce8998f test: wrap all user calls in act()
Some user events trigger react dom changes. These need to be wrapped in
act() to avoid a warning printed to the console. To be save, we wrap
all instances.
2023-03-10 18:16:27 -06:00
David Lechner b255a145e3 components/ViewHeightSensor: remove view height sensor
This appears to no longer be necessary for correct app height on Android.
2022-12-21 19:44:11 -06:00
David Lechner 9d71bb4734 eslint: enable react-hooks checks
Also fix all errors, which can lead to subtile bugs.

Mostly fixings deps and refactoring to make typescript happy.
2022-12-17 13:56:01 -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 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 Lechner a262f44762 explorer: fix focus outline obscured 2022-12-02 11:37:22 -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 8bece7d957 tour: add new tour component 2022-07-27 15:19:36 -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 b6525ea95e activities: don't render hidden activity panels
This improves performance by not rendering hidden tabs.
2022-06-15 12:03:29 -05:00
David Lechner 883807b4b4 fix breaking changes for user-event v14 2022-06-02 18:45:28 -05:00
David Lechner 69ca51fbbb explorer: fix broken layout
Applying this control tweak globally broke the explorer layout. So we
now apply it to settings only.
2022-05-30 10:15:10 -05:00
David Lechner 0a89198f5c activities: fix potential control overflow 2022-05-21 14:16:55 -05:00
David Lechner a3e55c828a move useI18n to i18n.ts
Since we are using the react-i18n babel loader plugin, useI18n can only
be used once per file. Also we have to remember to add the istanbul
ignore next comment each time we use it. By moving this to a common
file, it can be easily copied and pasted when a new submodule is
created and we don't have to remember the rules when calling it.
2022-05-21 13:57:58 -05:00
David Lechner ef7f6d15c4 improve focus styles 2022-05-16 21:59:58 -05:00
David Lechner a0f8b9a0ca more style and a11y fixes 2022-05-12 20:46:50 -05:00
David Lechner 6816795c6d activities: use blueprintjs tabs for keyboard a18y 2022-05-12 19:17:09 -05:00
David Lechner edd8ebfd64 Add Activities
This adds a new Activities tab list and view similar to VS code. The
Explorer and Settings are migrated to this view.
2022-05-12 12:33:21 -05:00