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
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
90b459d5db
firmware/restoreOfficialDialog: add new dialog
2022-07-27 18:17:20 -05:00
David Lechner
8bece7d957
tour: add new tour component
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
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
c3fec0b779
app: drop last focused feature
...
This feature that keeps track of last focused item in the activities
panel broke child dialogs like the about dialog.
Fixes: https://github.com/pybricks/support/issues/682
2022-07-06 17:56:08 -05:00
David Lechner
c4b0a9a781
add version to docs path
...
This adds the @pybricks/ide-docs package version to the static path.
This should ensure that we don't get a cached older version in the
browser when the ide-docs package is updated.
2022-07-06 14:17:53 -05:00
Bert
ac86a829e7
Bump copyright year to 2022 in constants.ts ( #935 )
2022-06-26 09:59:57 -05:00
David Lechner
a17cfbe4b8
app: use ref instead of state for last focused item
...
This prevents the full app from rendering when the last focused item
changes. This item doesn't have an effect on the rendered state so it
shouldn't be stored using state.
2022-06-15 12:03:29 -05:00
David Lechner
0e1a6c47a5
app: fix terminal padding for focus within outline
2022-05-18 10:57:42 -05:00
David Lechner
ef7f6d15c4
improve focus styles
2022-05-16 21:59:58 -05:00
David Lechner
8ba4d49e3b
components: add new component to fix a11y issues
2022-05-15 23:27:55 -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
David Lechner
65623f801d
update for breaking blueprintjs style changes
...
it is no longer feasible to build the blueprintjs css ourselves, so we
just use all of the default variable values and override things using
selectors instead.
2022-05-11 18:13:36 -05:00
David Lechner
e0a6926d01
explorer: implement duplicate file feature
2022-04-08 18:11:09 -05:00
David Lechner
54a475cebc
drop 'editor' saga context
...
This is no longer used.
2022-03-26 13:52:33 -05:00
David Lechner
79d5b06136
editor: move isReady state from app
...
This is a step towards getting rid of the 'editor' context.
2022-03-26 12:03:08 -05:00
David Lechner
0715ce3de1
drop settingsToggleShowDocs
...
We can change the event handler in App.tsx do we no longer need the
settingsToggleShowDocs action or related sagas.
2022-03-25 18:05:03 -05:00
David Lechner
887623c675
app/App: fix SplitterPane escaping container
...
https://stackoverflow.com/a/49210016/1976323
2022-03-17 11:08:31 -05:00
David Lechner
a4660e979c
settings: switch to useTernaryDarkMode
...
useDarkMode kept reverting back to the system default during development
2022-03-15 17:40:46 -05:00
David Lechner
6cfc37b947
settings: use react hook for showDocs setting
...
The moves the setting from redux state to a react hook.
2022-03-15 15:35:45 -05:00
David Lechner
9518a21241
settings: replace darkMode with useDarkMode hook
...
This is a minor breaking change for users that don't have dark mode
set to the default value since the localStorage key has changed (hard-
coded in 3rd party library).
2022-03-14 16:39:17 -05:00
David Lechner
187a973fa3
app: fix terminal padding background color
2022-03-14 13:26:51 -05:00
David Lechner
a92a989ded
app: useLocalStorage
...
This simplifies the code a bit by using the useLocalStorage hook.
2022-03-14 12:55:38 -05:00
David Lechner
6c55588d7a
app: fix layout
...
The explorer was getting pushed off of the screen when typing long lines
in the editor.
2022-03-14 12:39:42 -05:00
David Lechner
c75f3720f5
editor: drop EditorContext
...
We want to rely less on directly accessing the editor object.
2022-03-12 18:29:56 -06:00
David Lechner
8e4045449c
src: use prop unpacking pattern
...
This makes the code a bit shorter by not having to use `props.` all of
the time. Also make everything VoidFunctionComponent while we are
touching this.
2022-03-12 16:07:31 -06:00
David Lechner
03d12feb89
explorer: add basic file explorer
...
This is the beginnings of a file explorer. Most actions are not yet
implemented.
2022-03-09 20:54:04 -06:00
David Lechner
6afee4b6d6
test: add testRender()
...
This adds a testRender() helper function to simplify UI tests. Instead
of mocking the redux store, we use the real thing.
2022-03-09 17:24:46 -06:00
David Lechner
1469d2146e
app: rework service worker registration
...
- registration is moved from top-level index to app/sagas.
- mock implementation is provided for tests
- actions are renamed to include "app" prefix
- actions are changed to not use non-serializable arguments
- reducers are changed to not use non-serializable state
2022-03-09 15:48:30 -06:00
David Lechner
907826cf0e
app: rework BeforeInstallPromptEvent
...
This removed passing the BeforeInstallPromptEvent as an action argument
(action arguments should be serializable). Instead the saga just keeps
a reference to the event and actions are used only to resolve the state
of the UI.
2022-03-08 13:37:43 -06:00
David Lechner
7884f047b5
service-worker: rename actions
...
This adds a prefix to the actions so that we won't have to use aliases.
2022-03-07 17:46:26 -06:00
David Lechner
569217d5dc
editor: don't put editor in redux store
...
The redux store should not have non-serializable objects like the editor
in it.
2022-03-02 18:56:47 -06:00
David Lechner
9641898a75
actions: refactor actions
...
The pattern we were using for actions required actions to be defined in
three places, an enum member containing the type string, an type
definition and a function. This combines all three of these into one by
using a helper function based on the ideas from [1].
[1]: https://phryneas.de/redux-typescript-no-discriminating-union
2022-02-25 17:58:30 -06:00
David Lechner
8f377b3909
app/actions: fix duplicate type name
...
This fixes a duplicate type name shared by didInstallPrompt and
didInstall actions.
2022-02-25 10:02:26 -06:00
David Lechner
cf8744a6cd
actions: drop typed dispatch
...
This doesn't provide much benefit and is just one more rule to remember,
so we can do without it.
2022-02-24 17:16:52 -06:00
David Lechner
a0da9f7111
Improve code coverage
2022-02-22 12:32:20 -06:00
David Lechner
54ec447061
actions: added typed useDispatch() hook
2021-12-27 18:01:51 -06:00
David Lechner
8d26f768bf
reducers: use typed useSelector hook
...
This refactors the code to use a typed useSelector() hook.
2021-12-27 17:48:41 -06:00
David Lechner
8527cf86b2
app: refactor dark mode class hook
...
This moves the hook for applying the global dark mode style to the App component.
2021-12-27 17:30:15 -06:00
David Lechner
6d0e97f50e
app: fix pb-app div size and background color
2021-12-27 12:38:51 -06:00
David Lechner
b3db3d9efc
app: move docs to sepate comonent
...
The docs iframe is quite complex, so move it to a separate component to
improve readability.
2021-12-27 12:38:51 -06:00
David Lechner
c29f879086
app: use lambda style for App function
2021-12-27 12:36:38 -06:00
David Lechner
86c0e933f3
settings: add new hubName setting
...
This setting will be used to customize the hub name when flashing
firmware. This commit just implements the setting.
Some changes needed to be made to the existing settings infrastructure
since previously it only allowed boolean settings.
2021-11-19 20:48:06 -06:00
David Lechner
9fca17fbac
update projects URL to point to Pybricks website
2021-06-08 16:21:48 -05:00
David Lechner
205937fdc3
add changelog link to about dialog
2021-06-08 14:52:44 -05:00