Commit Graph
16 Commits
Author SHA1 Message Date
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 de7e046d31 avoid lambda props
This fixes the simple cases of callback props using lambda functions.
This will prevent rerendering in some cases since a new callback
function is not created on each call.
2022-03-12 15:19:50 -06:00
David Lechner b37209683b test: extend testRender to return spy on dispatch 2022-03-10 02:00:14 -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 650413d1fb about: convert AboutDialog to function 2021-12-27 12:36:38 -06:00
David Lechner af89c0b80b about: add firmware version as main version
Since the firmware version is the most important version, make it the
primary version. (We still need the Pybricks Code version since not
every update includes a firmware update.)
2021-08-13 12:13:05 -05:00
David Lechner ab0ddd04b5 about/AboutDialog: fix failing test when $REACT_APP_NAME set
When the `REACT_APP_NAME` environment variable is set to something other
that "Pybricks Code", it caused the test to fail.
2021-06-23 15:12:07 -05:00
David Lechner 6c692a7e95 fix wrapping on external link buttons 2021-06-08 14:52:44 -05:00
David Lechner 205937fdc3 add changelog link to about dialog 2021-06-08 14:52:44 -05:00
David Lechner ec6753c314 yarn lint
rules seem to have changed a bit after upgrading packages
2021-05-11 12:45:43 -05:00
David Lechner 1e5d25086b move app version to constants 2021-02-01 13:02:06 -06:00
David Lechner af964c04b4 use fake redux store in component tests 2021-02-01 10:26:06 -06:00
David Lechner 4c5adc20e7 add tests for AboutDialog 2021-02-01 10:26:06 -06:00
David Lechner dd951bd4fc make about dialog open/close local 2021-02-01 10:26:05 -06:00
David Lechner 89523b3915 make license dialog state local 2021-02-01 10:26:05 -06:00
David Lechner 6f204a65f6 reorganize src/ directory
Makes for much less scrolling/jumping around.

https://redux.js.org/style-guide/style-guide#structure-files-as-feature-folders-or-ducks
2021-02-01 10:26:05 -06:00