Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update shortcuts to reflect Component Browser design docs. #3823

Merged
merged 5 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
visualisation of the edited node to preview the results of applying the
suggestion.][3691]
- [Remove here keyword from IDE.][3749]
- [Shortcut changes:][3823] Pressing `Enter` when no node is edited opens
Component Browser. Entering node shortcut changed to `cmd` + `Enter`.

#### EnsoGL (rendering engine)

Expand Down Expand Up @@ -348,6 +350,7 @@
[3790]: https://github.com/enso-org/enso/pull/3790
[3805]: https://github.com/enso-org/enso/pull/3805
[3812]: https://github.com/enso-org/enso/pull/3812
[3823]: https://github.com/enso-org/enso/pull/3823

#### Enso Compiler

Expand Down
32 changes: 17 additions & 15 deletions app/gui/docs/product/shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags: [product, ui]

#### The <kbd>meta</kbd> key.

The <kbd>meta</kbd> key was introduced to make the shortcuts consistent across
The <kbd>cmd</kbd> key was introduced to make the shortcuts consistent across
platforms. It is defined as <kbd>command</kbd> on macOS, and as <kbd>ctrl</kbd>
on Windows and Linux.

Expand Down Expand Up @@ -39,7 +39,7 @@ broken and require further investigation.
| <kbd>cmd</kbd>+<kbd>alt</kbd>+<kbd>shift</kbd>+<kbd>t</kbd> | Toggle light/dark application style. Currently doesn't work properly, as the Theme Switcher is not created yet. (https://github.com/enso-org/ide/issues/795) |
| <kbd>ctrl</kbd>+<kbd>`</kbd> | Show Code Editor. Please note that the Code Editor implementation is in a very early stage and you should not use it. Even just openning it can cause errors in the IDE. Do not try using the graph editor while having the code editor tab openned. |
| <kbd>cmd</kbd>+<kbd>o</kbd> | Open project |
| <kbd>meta</kbd>+<kbd>s</kbd> | Save module |
| <kbd>cmd</kbd>+<kbd>s</kbd> | Save module |
| <kbd>cmd</kbd>+<kbd>z</kbd> | Undo last action |
| <kbd>cmd</kbd>+<kbd>y</kbd> | Redo last undone action |
| <kbd>cmd</kbd>+<kbd>q</kbd> | Close the application (MacOS) |
Expand All @@ -59,7 +59,7 @@ broken and require further investigation.
| <kbd>RMB</kbd> drag | Zoom the scene. |
| <kbd>LMB</kbd> double press node name | Step into the node. |
| :warning: <kbd>LMB</kbd> double press background | Step out of the current node. |
| <kbd>enter</kbd> | Step in the last selected node. |
| <kbd>cmd</kbd>+<kbd>enter</kbd> | Step in the last selected node. |
| <kbd>alt</kbd>+<kbd>enter</kbd> | Step out of the current node. |

#### Node Layout
Expand Down Expand Up @@ -90,14 +90,16 @@ broken and require further investigation.

#### Node Editing

| Shortcut | Action |
| ------------------------------------------------ | -------------------------------------------- |
| <kbd>tab</kbd> | Show / hide node searcher. |
| <kbd>backspace</kbd> or <kbd>delete</kbd> | Remove selected nodes. |
| <kbd>cmd</kbd>+<kbd>g</kbd> | Collapse (group) selected nodes. |
| <kbd>meta</kbd>+<kbd>LMB</kbd> | Start editing node expression. |
| <kbd>meta</kbd>+<kbd>enter</kbd> | Start editing node expression. |
| <kbd>enter</kbd> or <kbd>LMB</kbd> on suggestion | Pick selected suggestion and commit editing. |
| Shortcut | Action |
| ------------------------------------------------ | ----------------------------------------------------------- |
| <kbd>tab</kbd> | Open Component Browser to create a new node . |
| <kbd>backspace</kbd> or <kbd>delete</kbd> | Remove selected nodes. |
| <kbd>cmd</kbd>+<kbd>g</kbd> | Collapse (group) selected nodes. |
| <kbd>cmd</kbd>+<kbd>LMB</kbd> | Start editing node expression. |
| <kbd>cmd</kbd>+<kbd>enter</kbd> | Start editing node expression. |
| <kbd>enter</kbd> or <kbd>LMB</kbd> on suggestion | Pick selected suggestion and commit editing. |
| <kbd>cmd</kbd> + <kbd>enter</kbd> | Accept the current Component Browser expression input as-is |
| <kbd>tab</kbd> | Pick selected suggestion and continue editing. |

#### Visualization

Expand All @@ -111,10 +113,10 @@ broken and require further investigation.

#### Visualizations Implementations

| Shortcut | Action |
| ------------------------------ | -------------------------------------------------- |
| <kbd>meta</kbd> + <kbd>a</kbd> | Show all points if available in visualization. |
| <kbd>meta</kbd> + <kbd>z</kbd> | Zoom into selection if available in visualization. |
| Shortcut | Action |
| ----------------------------- | -------------------------------------------------- |
| <kbd>cmd</kbd> + <kbd>a</kbd> | Show all points if available in visualization. |
| <kbd>cmd</kbd> + <kbd>z</kbd> | Zoom into selection if available in visualization. |

#### Debug

Expand Down
4 changes: 2 additions & 2 deletions app/gui/view/graph-editor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2513,6 +2513,7 @@ impl application::View for GraphEditor {
use shortcut::ActionType::*;
[
(Press, "!node_editing", "tab", "start_node_creation"),
(Press, "!node_editing", "enter", "start_node_creation"),
// === Drag ===
(Press, "", "left-mouse-button", "node_press"),
(Release, "", "left-mouse-button", "node_release"),
Expand Down Expand Up @@ -2549,12 +2550,11 @@ impl application::View for GraphEditor {
(DoublePress, "", "left-mouse-button", "enter_hovered_node"),
(DoublePress, "", "left-mouse-button", "start_node_creation_from_port"),
(Press, "", "right-mouse-button", "start_node_creation_from_port"),
(Press, "!node_editing", "enter", "enter_selected_node"),
(Press, "!node_editing", "cmd enter", "enter_selected_node"),
(Press, "", "alt enter", "exit_node"),
// === Node Editing ===
(Press, "", "cmd", "edit_mode_on"),
(Release, "", "cmd", "edit_mode_off"),
(Press, "!node_editing", "cmd enter", "edit_selected_node"),
(Press, "", "cmd left-mouse-button", "edit_mode_on"),
(Release, "", "cmd left-mouse-button", "edit_mode_off"),
(Press, "node_editing", "cmd enter", "stop_editing"),
Expand Down