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
e7366c8afd
rework alerts
...
This starts moving alerts to the same subsystem where they are relevant
instead of putting everything in notifications.
So far, only the explorer file in use error is handled like this.
2022-05-20 19:25:18 -05:00
David Lechner
4e88605b16
utils/customError: narrow type of name property
...
The name property is inherited from Error and has a type of string.
But our CustomError ensures that the name is restricted to the type
of T. This causes compiler errors, so we had to enable a babel plugin
to support it.
2022-05-20 16:46:17 -05:00
David Lechner
348d6e90d9
add CustomError class
...
This will be used for throwing errors that can be caught and handled without having to parse the message.
2022-05-20 11:13:55 -05:00
David Lechner
8b6939a983
utils: extract acquireLock function from fileStorage
2022-05-19 12:03:10 -05:00
David Lechner
3dc03f3879
editor: save file to correct path
...
previously, all files were being saved as main.py
2022-05-19 10:44:31 -05:00
David Lechner
057ba4bab9
spelling
2022-05-18 18:21:01 -05:00
David Lechner
d02e38795b
editor/sagas: fix error creating model on hot reload
2022-05-18 17:47:29 -05:00
David Lechner
325562996b
replace useUniqueId() with useId()
...
there should only be one way to do a thing...
2022-05-18 17:16:32 -05:00
David Lechner
a005992a21
fileStorage: use dexie-react-hooks
...
This lets the dexie-react-hooks library do more of the work for us
instead of having to make redux-sagas wrappers for everything.
2022-05-18 17:06:08 -05:00
David Lechner
4580869e6f
editor: don't keep file open when editing
...
Since open takes a lock on the file, it prevented other file operations.
2022-05-18 13:11:06 -05:00
David Lechner
3235d32dbb
webpack: fix yarn build after 8ba4d49e
...
Something about commit 8ba4d49e caused a few extra babel modules to
trigger the ModuleScopePlugin guard. Example error:
Failed to compile.
Module not found: Error: You attempted to import /home/david/work/pybricks/pybricks-code/node_modules/@babel/runtime/regenerator/index.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
2022-05-18 12:15:30 -05:00
David Lechner
c4c8da967c
components/toolbar: types is a types-only file
2022-05-18 11:15:50 -05:00
David Lechner
76475cc79b
fix lint errors
2022-05-18 11:12:52 -05:00
David Lechner
133b52029f
automatic formatting
2022-05-18 11:11:50 -05:00
David Lechner
0e1a6c47a5
app: fix terminal padding for focus within outline
2022-05-18 10:57:42 -05:00
David Lechner
4384f80f9b
terminal: move handleKeyDown inside of useEffect()
...
This will avoid extra renders triggered by a new handleKeyDown function.
2022-05-18 10:26:48 -05:00
David Lechner
df6e93407e
terminal: remove questionable tabindex
...
Not sure if this has a purpose I don't know about but removing it gives
better behavior when using keyboard navigation.
2022-05-18 10:13:31 -05:00
David Lechner
0839392183
rework roving tab index to use react-aria
2022-05-17 23:20:09 -05:00
David Lechner
f7dcf8b0f7
components/toolbar: move from utils
...
This is a better home.
2022-05-17 11:28:21 -05:00
David Lechner
ef7f6d15c4
improve focus styles
2022-05-16 21:59:58 -05:00
David Lechner
9e092ca469
explorer: fix tree item button translations not updating
2022-05-16 01:11:10 -05:00
David Lechner
8ba4d49e3b
components: add new component to fix a11y issues
2022-05-15 23:27:55 -05:00
David Lechner
b729d90907
yarn: add patch for react-dev-utils
...
https://github.com/facebook/create-react-app/pull/11878
2022-05-14 14:18:49 -05:00
David Lechner
728e7c3b26
settings: change tooltips to help buttons
...
This is more friendly for touch screen users.
2022-05-14 11:09:41 -05:00
David Lechner
fb681e06ec
explorer/fileNameFormGroup: hide tag
...
screen readers don't need to read the file extension tag
2022-05-13 23:52:21 -05:00
David Lechner
404818bcdf
toolbar: use roving focus
2022-05-13 23:28:12 -05:00
David Lechner
f0dcb281de
utils: add Toolbar component
...
This adds a generic toolbar component that follow aria guidelines.
2022-05-13 22:36:01 -05:00
David Lechner
a185457067
explorer: don't disable archive button
...
disabled buttons are bad for accessability
2022-05-13 16:48:32 -05:00
David Lechner
dc2daf2fe4
toolbar: hide icons from a11y tools
...
There are already ARIA labels, so the icons should be hidden.
2022-05-13 14:44:26 -05:00
David Lechner
7322c9d667
utils: drop pointerEventsNone
...
Not sure why this was used in the first place, but causes non-default
behavior which can be confusing.
2022-05-13 14:39:35 -05:00
David Lechner
cd88789be7
toolbar: override aria-haspopup
...
The Tooltip2 component incorrectly sets this attribute which should
not be set for tooltips.
2022-05-13 14:38:12 -05:00
David Lechner
a0f8b9a0ca
more style and a11y fixes
2022-05-12 20:46:50 -05:00
David Lechner
3fb98e6ae1
ViewHeightSensor: hard-code style
...
This style is not about looks, so hard-code it instead of using style sheets.
2022-05-12 19:23:49 -05:00
David Lechner
5dc6b2e4cb
util: drop preventBrowserNativeContextMenu
...
This is done once at the top-level app, so is no longer needed.
2022-05-12 19:20:46 -05:00
David Lechner
6816795c6d
activities: use blueprintjs tabs for keyboard a18y
2022-05-12 19:17:09 -05:00
David Lechner
fa0a9a109c
editor: improve a18y and visual appearance
2022-05-12 16:14:48 -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
896b3eae3e
update monoco editor
2022-05-10 22:20:21 -05:00
David Lechner
8d522b963a
update blueprints
...
This had a breaking change with regard to sass compiling.
2022-05-10 22:15:28 -05:00
David Lechner
96d36f81e2
eslint: ignore scripts/*
...
These were automatically generated, so leave them be.
2022-05-10 20:55:04 -05:00
David Lechner
df12c40802
drop craco
...
Since we aren't using react-scripts any more, craco doesn't do anything.
This merges the craco config into the config created by `yarn eject`.
2022-05-10 20:27:58 -05:00
David Lechner
5ee74187eb
optimize svgs
...
The new webpack doesn't like the xml namespaces and refuses to compile
so we have to save the svg files in optimized form.
2022-05-10 20:26:58 -05:00
David Lechner
10a3efc41f
yarn eject
2022-05-10 17:52:37 -05:00
David Lechner
54e826490d
yarn up react-scripts
...
This doesn't compile due to breaking changes, but we have to commit
before ejecting.
2022-05-10 17:46:48 -05:00
David Lechner
8ffaf64292
fileStorage: add file create option
...
When opening a file, sometimes we want to create it if it does not
exist and sometimes we don't.
2022-04-08 18:29:05 -05:00
David Lechner
e0a6926d01
explorer: implement duplicate file feature
2022-04-08 18:11:09 -05:00