Commit Graph
133 Commits
Author SHA1 Message Date
David Lechner 066a6c7d3d move scrollbar styling to @pybricks/ide-docs
This makes the scrollbar flashing less noticeable, but there is still
a bit of a flash in dark mode due to the fact that we are still
injecting the class in the load event in that case.
2021-01-28 12:45:17 -06:00
David Lechner 952416f36b apply scroll bar styling to docs iframe 2021-01-27 19:14:15 -06:00
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 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 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 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 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 467627dc75 flash-firmware: drop error on fail to connect
This error is already handled elsewhere.
2021-01-23 17:29:43 -06:00
David Lechner 5d1311216c add notifications for firmware flash errors 2021-01-23 15:27:36 -06:00
David Lechner 0333fa51c0 add developer settings with pseudolocalization
This is currently broken due to https://github.com/Shopify/quilt/pull/1725
2021-01-21 12:37:29 -06:00
David Lechner 91938e34d9 add special notification for unexpected errors
Since these errors are not expected, we want to make it really easy to
report them.
2021-01-21 12:37:29 -06:00
David Lechner bab35e8c45 move progress from status bar to firmware button 2021-01-19 17:20:56 -06:00
David Lechner 3e2194a497 simplify about description 2021-01-18 18:59:31 -06:00
David Lechner f87f9b1b89 associate related programChanged translations 2021-01-18 18:56:02 -06:00
David Lechner 5a66f041f2 update new version experience
This changes the new version message to be more user-friendly and allows
using the new version without restarting the browser or clearing the
cache.
2021-01-18 18:51:38 -06:00
David Lechner c8d499e979 drop notification for service worker success action
This isn't particularly useful information.
2021-01-18 17:44:26 -06:00
David Lechner 54439a4cbc convert notifications to static API
This converts notifications from a reducer to a saga. This way, our
state doesn't get bogged down with a bunch of notifications.
2021-01-18 17:29:03 -06:00
David Lechner 43cc1bce1c make "BETA" watermark depend on app version 2021-01-18 17:29:03 -06:00
David Lechner ff34e5b01b Add version in about dialog 2021-01-18 17:29:03 -06:00
Laurens Valk 8246bad1e8 add link to example projects 2021-01-18 15:10:02 +01:00
David Lechner 1626533cca add license dialog 2021-01-17 10:39:38 -06:00
David Lechner b15d00f797 add help links 2021-01-15 16:07:11 -06:00
David Lechner 355d09ea31 better styling of about button 2021-01-15 14:39:39 -06:00
David Lechner 28830dd3d2 add icon to about dialog 2021-01-15 14:34:00 -06:00
David Lechner 1e3c0b05ef use proper variables for bp3 namespace 2021-01-15 14:02:13 -06:00
David Lechner a23c0aaede increase blueprintsjs font size overall
removes need for special handling in settings
2021-01-15 13:48:11 -06:00
David Lechner dcb432583c add basic about dialog 2021-01-15 12:51:52 -06:00
David Lechner f54beab97f use consistent tooltip delay 2021-01-15 11:08:04 -06:00
Bert 8f71ace56d Fix for pybricks/support#213 (#243)
Fix Code completion for "try:" snippets have a syntax error pybricks/support#213
2021-01-15 10:13:05 -06:00
Laurens Valk 5da4b7f98c update flash button text
Make it clearer what it is / why you want to do this
2021-01-15 10:58:53 +01:00
Laurens Valk 0ed5a06900 simplify menu wording 2021-01-15 10:51:35 +01:00
David Lechner 51fc1ddce0 add tooltips to settings 2021-01-14 18:22:29 -06:00
David Lechner f4cb69f995 add setting to flash current user program 2021-01-14 18:03:04 -06:00
David Lechner 9ee24d0b0c add help with zoom 2021-01-14 17:16:09 -06:00
David Lechner eba2239610 make settings group label bigger and bolder 2021-01-14 16:45:08 -06:00
David Lechner 2f57ae2f57 split scss into separate files 2021-01-14 16:35:23 -06:00
David Lechner 25c0d104a9 convert macOS check to utility function 2021-01-14 15:25:57 -06:00
David Lechner a48f3f381e convert settings to do/did action pattern 2021-01-14 15:12:49 -06:00
David Lechner b15b2e1dea move docs toggle to settings 2021-01-14 10:55:00 -06:00