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
228ba4ebb8
toolbar: change button order
...
The flash and bluetooth buttons are moved to the left. This way, the
run button is closer to the text editor.
2022-03-12 15:47:47 -06:00
David Lechner
cf8438c689
toolbar: drop open and saveAs buttons
...
These have been replace by the explorer.
2022-03-12 15:45:36 -06:00
David Lechner
a2ccd3afdb
utils/react: add pointerEventsNone helper
...
This should prevent some unnecessary rerendering by not creating a new
inline object.
2022-03-12 15:26:48 -06:00
David Lechner
c51669c357
fix deps in hotkeys memos
2022-03-12 15:19:50 -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
c229d407cf
utils/react: add preventDefault helpers
...
These can be used instead of always having to add a comment explaining
what preventDefault does in a given context.
2022-03-12 14:57:30 -06:00
David Lechner
02d7672155
react-dropzone: fix for breaking change in v12
...
This fixes a breaking change from upgrading to react-dropzone to v12.
2022-02-28 11:01:59 -06:00
David Lechner
a0a1ae7126
"@blueprintjs/core": "^3.53.0"
...
This allows us to drop the monkey patch to work around an upstream bug.
2022-02-22 14:23:20 -06:00
David Lechner
fd09783a45
toolbar: work around tooltip bugs
...
This works around several bugs where tooltips don't close when expected.
Fixes: https://github.com/pybricks/pybricks-code/issues/275
2021-12-28 18:55:20 -06:00
David Lechner
09b46ed5be
toolbar: make buttons scale with screen size
...
This is very basic, just 2 sizes. But it makes things a bit better
on phones.
Fixes: https://github.com/pybricks/support/issues/300
2021-12-27 12:38:51 -06:00
David Lechner
dfa497fcf6
toolbar: drop no-box-shadow
...
This is now applied to all descendets of pb-toolbar so we don't need the
utility class.
2021-12-27 12:38:51 -06:00
David Lechner
6d0e97f50e
app: fix pb-app div size and background color
2021-12-27 12:38:51 -06:00
David Lechner
6dc4dcb2e5
toolbar: specify image width/height
...
This make the button the right size while waiting for the image to download.
Fixes: https://github.com/pybricks/support/issues/369
2021-12-27 12:38:50 -06:00
David Lechner
11e0fefb1d
toolbar: use function form of Dropzone
2021-12-27 12:38:50 -06:00
David Lechner
eb9ea2876e
toolbar: remove unuse buttonRef in ActionButton
2021-12-27 12:38:50 -06:00
David Lechner
9be6ba3640
update to Tooltip2
...
Tooltip has been deprecated so trying out the new Tooltip2.
2021-12-27 12:38:50 -06:00
David Lechner
534d3f80e6
toolbar: convert Toolbar to function
2021-12-27 12:38:50 -06:00
David Lechner
8cd014c2ab
toolbar: convert OpenFileButton to function
2021-12-27 12:38:50 -06:00
David Lechner
f3e179683e
toolbar: convert ActionButton to function
2021-12-27 12:38:50 -06:00
David Lechner
e8c4472e50
Add progress bar for user program download.
2021-04-12 16:24:36 -05:00
David Lechner
cdd74706c5
toolbar is not a navbar
...
This adds custom styling for the toolbar (inspired by blueprintsjs
navbar). But this lets us use the correct role and not fight the
navbar styling so much.
2021-02-01 13:02:07 -06:00
David Lechner
ad6e2b73cc
make settings open/close 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