Commit Graph
465 Commits
Author SHA1 Message Date
David Lechner eb2cf3c956 add global keyboard shortcut for toggling docs
This handles the cases when the editor is not active and the docs pane
is not active and the terminal is not active.
2021-01-27 16:33:03 -06:00
David Lechner 1d7414bd83 add Ctrl-D keyboard shortcut in docs iframe
This way it still works when the docs are focused. Otherwise the browser
would try to bookmark the page.
2021-01-27 16:02:37 -06:00
David Lechner ca8192084d restore docs position after hide/show
Previously, the docs iframe was removed from the DOM when the docs
were hidden. This caused the docs to always go back to the main page
when shown.

This fixes it by using CSS to hide the docs instead of removing them
from the DOM. However, this comes with its own complications regarding
maintaining the scroll position.
2021-01-27 15:38:51 -06:00
David Lechner 64e6b3739e add keyboard shortcut to toggle docs
this is useful for users with small screens
2021-01-27 11:48:51 -06:00
David Lechner 4f00c962e1 finish TODO for checking bluetooth availability 2021-01-27 10:25:08 -06:00
David Lechner 45ac41b398 use ~ in scss imports
this allows proper click-link to files in node_modules
2021-01-27 10:25:08 -06:00
David Lechner eebeec509c don't focus buttons on click
This prevents the navbar buttons from gaining focus when clicked.
This way it prevents losing focus from the editor or terminal.
It also prevents the settings button from being highlighted after
the settings menu is closed.
2021-01-27 10:25:08 -06:00
David Lechner c7803fed19 fix wrong event type on switch
Fixes:

    index.js:1 Warning: Failed prop type: You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.
2021-01-27 10:25:08 -06:00
David Lechner 68fb7e68f2 format scss files 2021-01-27 10:25:08 -06:00
David Lechner 192d7c07f2 Merge pull request #276 from pybricks/dlech
style tweaks
2021-01-26 22:00:54 -06:00
David Lechner 8d77004aed improve print margin contrast in dark mode 2021-01-26 21:33:17 -06:00
David Lechner 547dff7150 better fit of license dialog on small screens 2021-01-26 21:09:45 -06:00
David Lechner cbfab16408 Merge pull request #274 from pybricks/dlech
v1.0.0-beta.4
2021-01-26 11:59:53 -06:00
David Lechner 47b340a98a v1.0.0-beta.4 v1.0.0-beta.4 2021-01-26 11:55:52 -06:00
David Lechner 4c03487219 Merge pull request #273 from pybricks/dlech
include offline copy of docs
2021-01-25 21:12:49 -06:00
David Lechner afc8e7c628 include offline copy of docs
This grabs the docs via the @pybricks/ide-docs package and copies them
to the build directory with copy-webpack-plugin.

The service worker automatically picks up these files for precache
since they go through webpack.
2021-01-25 21:05:14 -06:00
David Lechner 62ceab4561 Merge pull request #272 from pybricks/dependabot/npm_and_yarn/blueprintjs/core-3.38.1
Bump @blueprintjs/core from 3.36.0 to 3.38.1
2021-01-25 12:32:58 -06:00
dependabot[bot] 223ff0e6a2 Bump @blueprintjs/core from 3.36.0 to 3.38.1
Bumps [@blueprintjs/core](https://github.com/palantir/blueprint/tree/HEAD/packages/core) from 3.36.0 to 3.38.1.
- [Release notes](https://github.com/palantir/blueprint/releases)
- [Changelog](https://github.com/palantir/blueprint/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/palantir/blueprint/commits/@blueprintjs/core@3.38.1/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 18:08:36 +00:00
David Lechner f94e4f8148 Merge pull request #270 from pybricks/dependabot/npm_and_yarn/shopify/react-i18n-5.2.1
Bump @shopify/react-i18n from 5.2.0 to 5.2.1
2021-01-25 11:59:30 -06:00
dependabot[bot] 6e36ed5f57 Bump @shopify/react-i18n from 5.2.0 to 5.2.1
Bumps [@shopify/react-i18n](https://github.com/Shopify/quilt/tree/HEAD/packages/react-i18n) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/Shopify/quilt/releases)
- [Changelog](https://github.com/Shopify/quilt/blob/master/packages/react-i18n/CHANGELOG.md)
- [Commits](https://github.com/Shopify/quilt/commits/@shopify/react-i18n@5.2.1/packages/react-i18n)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 17:37:38 +00:00
David Lechner 3d6b4f1153 Merge pull request #269 from pybricks/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.14.0
Bump @typescript-eslint/eslint-plugin from 4.13.0 to 4.14.0
2021-01-25 11:29:42 -06:00
dependabot[bot] 4d9bdd5d44 Bump @typescript-eslint/eslint-plugin from 4.13.0 to 4.14.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.13.0 to 4.14.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.14.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 17:14:30 +00:00
David Lechner 03bf0df262 Merge pull request #271 from pybricks/dlech
fix extra pixels under icons in buttons
2021-01-25 10:43:02 -06:00
David Lechner 0acaaf0f55 fix extra pixels under icons in buttons
Since the img is in a span, it was treated as text and added 4 pixels
on the bottom for the descender height.

By using `display: block;` it won't be treated as text.

Fixes pybricks/pybricks-code#268
2021-01-25 10:39:11 -06:00
David Lechner 966b10daa6 Merge pull request #265 from pybricks/dependabot/npm_and_yarn/typescript-eslint/parser-4.14.0
Bump @typescript-eslint/parser from 4.13.0 to 4.14.0
2021-01-25 10:34:41 -06:00
dependabot[bot] 4754226c06 Bump @typescript-eslint/parser from 4.13.0 to 4.14.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.13.0 to 4.14.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.14.0/packages/parser)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 16:25:55 +00:00
David Lechner 307b14d462 Merge pull request #263 from pybricks/dependabot/npm_and_yarn/eslint-config-prettier-7.2.0
Bump eslint-config-prettier from 7.1.0 to 7.2.0
2021-01-25 10:17:36 -06:00
dependabot[bot] 6893d5c72c Bump eslint-config-prettier from 7.1.0 to 7.2.0
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 7.1.0 to 7.2.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v7.1.0...v7.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 16:13:38 +00:00
David Lechner 01d590ffa7 Merge pull request #264 from pybricks/dependabot/npm_and_yarn/types/react-redux-7.1.16
Bump @types/react-redux from 7.1.15 to 7.1.16
2021-01-25 10:05:51 -06:00
dependabot[bot] 8da27a4ed8 Bump @types/react-redux from 7.1.15 to 7.1.16
Bumps [@types/react-redux](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-redux) from 7.1.15 to 7.1.16.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-redux)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 16:01:41 +00:00
David Lechner 123aa78f0a Merge pull request #267 from pybricks/dependabot/npm_and_yarn/testing-library/user-event-12.6.2
Bump @testing-library/user-event from 12.6.0 to 12.6.2
2021-01-25 09:54:43 -06:00
dependabot[bot] 559dbc53cf Bump @testing-library/user-event from 12.6.0 to 12.6.2
Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 12.6.0 to 12.6.2.
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v12.6.0...v12.6.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 07:01:37 +00:00
David Lechner 1a5f224dfc Merge pull request #262 from pybricks/dlech
github: add coverage build for master branch
2021-01-24 15:04:35 -06:00
David Lechner 19b898bb6c github: add coverage build for master branch 2021-01-24 15:01:27 -06:00
David Lechner 306afc4a8e Merge pull request #260 from pybricks/dlech
updates for beta 3
2021-01-24 14:15:09 -06:00
David Lechner 3214dbb169 v1.0.0-beta.3 v1.0.0-beta.3 2021-01-24 14:11:04 -06:00
David Lechner de573407cb Fix crash when tabbing through buttons
This fixes a crash caused by react-dropzone due to the fact that button
elements aren't compatible with whatever react-dropzone is looking for.

    TypeError: rootRef.current.isEqualNode is not a function
    (anonymous function)
    node_modules/react-dropzone/dist/es/index.js:473
    470 |
    471 | var onKeyDownCb = useCallback(function (event) {
    472 |   // Ignore keyboard events bubbling up the DOM tree
    > 473 |   if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {
        | ^  474 |     return;
    475 |   }
    476 |

Wrapping it in a div element solves the problem.

Also disable tabIndex on the dropzone to prevent the button from being
focused twice when tabbing through the buttons.
2021-01-24 13:31:42 -06:00
David Lechner 5614bb1747 add check command to editor
This adds a check command ala Mu editor.
2021-01-24 12:27:16 -06:00
David Lechner c209bdb1ac replace settings icon with scaled up version
This is a scaled up version of the icon from blueprintsjs.
2021-01-24 11:27:40 -06:00
David Lechner 73f155d370 add Select All to editor context menu 2021-01-24 10:56:41 -06:00
David Lechner fcb0bf3d9c add Select All to terminal context menu
The usual keyboard shortcut of Ctrl-A is not allowed since that triggers
raw REPL mode in MicroPython.
2021-01-24 10:55:00 -06:00
David Lechner 9b0427fd33 allow selecting text in dialogs and toasts
It is useful to be able to copy this info when reporting bugs.

Issue: pybricks/pybricks-support#228
2021-01-24 10:39:43 -06:00
David Lechner a9d827d21d split didRequest and didFailToRequest 2021-01-23 19:34:49 -06:00
David Lechner 2049edf874 split didSend and didFailToSend actions 2021-01-23 19:22:02 -06:00
David Lechner a41f2c0c46 Merge pull request #259 from pybricks/dlech
saga conversions
2021-01-23 19:07:49 -06:00
David Lechner 683cb02b5a convert index sagas to typed-redux-saga/macro 2021-01-23 18:59:10 -06:00
David Lechner 3ba52e560d convert terminal sagas to typed-redux-saga/macro 2021-01-23 18:58:26 -06:00
David Lechner ca5bb8f2a5 convert mpy sagas to typed-redux-saga/macro 2021-01-23 18:52:43 -06:00
David Lechner 9f643f6a57 convert lwp3-bootloader-ble sagas to typed-redux-saga/macro 2021-01-23 18:51:22 -06:00
David Lechner 430643242e convert hub sagas to typed-redux-saga/macro 2021-01-23 18:47:48 -06:00