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

Change full-screen visualisation shortcut to shift-space #6663

Merged
merged 4 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,16 @@
<kbd>cmd</kbd>+<kbd>alt</kbd>+<kbd>t</kbd>/<kbd>r</kbd>.
- [Fixed a bug where selecting a nested breadcrumb would cause the order of
breadcrumbs to change incorrectly.][6617]
- [Changed the shortcut to show the full-screen visualization for a node from
<kbd>space</kbd> <kbd>space</kbd> to <kbd>shift</kbd>+<kbd>space</kbd>.][6663]
so that it doesn't interfere with the shortcut for toggling the small
visualization.

[6421]: https://github.com/enso-org/enso/pull/6421
[6530]: https://github.com/enso-org/enso/pull/6530
[6620]: https://github.com/enso-org/enso/pull/6620
[6617]: https://github.com/enso-org/enso/pull/6617
[6663]: https://github.com/enso-org/enso/pull/6663

#### EnsoGL (rendering engine)

Expand Down
9 changes: 4 additions & 5 deletions app/gui/view/graph-editor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,14 +562,13 @@ ensogl::define_endpoints_2! {
/// other case, it will be disabled as soon as the `release_visualization_visibility` is
/// emitted.
press_visualization_visibility(),
/// Simulates a visualization open double press event. This event toggles the visualization
/// fullscreen mode.
double_press_visualization_visibility(),
/// Simulates a visualization open release event. See `press_visualization_visibility` to
/// learn more.
release_visualization_visibility(),
/// Cycle the visualization for the selected nodes.
cycle_visualization_for_selected_node(),
/// Opens the visualization for the selected node in full-screen mode.
open_fullscreen_visualization (),
Procrat marked this conversation as resolved.
Show resolved Hide resolved
/// The visualization currently displayed as fullscreen is
close_fullscreen_visualization(),

Expand Down Expand Up @@ -3536,7 +3535,7 @@ fn new_graph_editor(app: &Application) -> GraphEditor {
// - If it was long, disable vis which were disabled (preview mode).

let viz_press_ev = inputs.press_visualization_visibility.clone_ref();
let viz_d_press_ev = inputs.double_press_visualization_visibility.clone_ref();
let viz_open_fs_ev = inputs.open_fullscreen_visualization.clone_ref();
Procrat marked this conversation as resolved.
Show resolved Hide resolved
Procrat marked this conversation as resolved.
Show resolved Hide resolved
let viz_release_ev = inputs.release_visualization_visibility.clone_ref();
viz_pressed <- bool(&viz_release_ev,&viz_press_ev);
viz_was_pressed <- viz_pressed.previous();
Expand Down Expand Up @@ -3581,7 +3580,7 @@ fn new_graph_editor(app: &Application) -> GraphEditor {
viz_disable_by_press <= viz_tgt_nodes.gate(&viz_tgt_nodes_all_on);
viz_disable <- any(viz_disable_by_press,inputs.disable_visualization);
viz_preview_disable <= viz_tgt_nodes_off.sample(&viz_preview_mode_end);
viz_fullscreen_on <= viz_d_press_ev.map(f_!(model.nodes.last_selected()));
viz_fullscreen_on <= viz_open_fs_ev.map(f_!(model.nodes.last_selected()));
Procrat marked this conversation as resolved.
Show resolved Hide resolved

eval viz_enable ((id) model.enable_visualization(id));
eval viz_disable ((id) model.disable_visualization(id));
Expand Down
4 changes: 2 additions & 2 deletions app/gui/view/graph-editor/src/shortcuts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ pub const SHORTCUTS: &[(ensogl::application::shortcut::ActionType, &str, &str, &
(Press, "!read_only", "cmd g", "collapse_selected_nodes"),
// === Visualization ===
(Press, "!node_editing", "space", "press_visualization_visibility"),
(DoublePress, "!node_editing", "space", "double_press_visualization_visibility"),
(Press, "!node_editing", "shift space", "open_fullscreen_visualization"),
Procrat marked this conversation as resolved.
Show resolved Hide resolved
(Release, "!node_editing", "space", "release_visualization_visibility"),
(Press, "", "cmd i", "reload_visualization_registry"),
(Press, "is_fs_visualization_displayed", "space", "close_fullscreen_visualization"),
(Press, "is_fs_visualization_displayed", "shift space", "close_fullscreen_visualization"),
Procrat marked this conversation as resolved.
Show resolved Hide resolved
(Press, "", "cmd", "enable_quick_visualization_preview"),
(Release, "", "cmd", "disable_quick_visualization_preview"),
// === Selection ===
Expand Down