Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Commit

Permalink
Feature flag for visualization preview (#1817)
Browse files Browse the repository at this point in the history
  • Loading branch information
s9ferech authored Aug 31, 2021
1 parent ad02f79 commit 14e35b6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Next Release

<br/>![New Features](/docs/assets/tags/new_features.svg)

#### Visual Environment

- [Visualization previews are disabled.][1817] Previously, hovering over a
node's output port for more than four seconds would temporarily reveal the
node's visualization. This behavior is disabled now.

[1817]: https://github.com/enso-org/ide/pull/1817

# Enso 2.0.0-alpha.13 (2021-08-27)

<br/>![New Features](/docs/assets/tags/new_features.svg)
Expand All @@ -16,7 +26,7 @@

<br/>![New Features](/docs/assets/tags/new_features.svg)

#### Enso Compiler
#### Visual Environment

- [Improvements to visualization handling][1804]. These improvements are fixing
possible performance issues around attaching and detaching visualizations.
Expand Down
11 changes: 7 additions & 4 deletions src/rust/ide/view/graph-editor/src/component/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ pub const COMMENT_MARGIN : f32 = 10.0;
const INFINITE : f32 = 99999.0;
const ERROR_VISUALIZATION_SIZE : (f32,f32) = visualization::container::DEFAULT_SIZE;

const VISUALIZATION_OFFSET_Y : f32 = -120.0;
const VISUALIZATION_OFFSET_Y : f32 = -120.0;

const VIS_PREVIEW_ONSET_MS : f32 = 4000.0;
const ERROR_PREVIEW_ONSET_MS : f32 = 0000.0;
const ENABLE_VIS_PREVIEW : bool = false;
const VIS_PREVIEW_ONSET_MS : f32 = 4000.0;
const ERROR_PREVIEW_ONSET_MS : f32 = 0000.0;
/// A type of unresolved methods. We filter them out, because we don't want to treat them as types
/// for ports and edges coloring (due to bad UX otherwise).
const UNRESOLVED_SYMBOL_TYPE : &str = "Builtins.Main.Unresolved_Symbol";
Expand Down Expand Up @@ -745,7 +746,9 @@ impl Node {
preview_visible <- preview_visible && has_expression;
preview_visible <- preview_visible.on_change();

visualization_visible <- visualization_enabled || preview_visible;
visualization_visible <- all_with(&visualization_enabled,&preview_visible,
|&visualization_enabled,&preview_visible|
visualization_enabled || (preview_visible && ENABLE_VIS_PREVIEW));
visualization_visible <- visualization_visible && no_error_set;
visualization_visible_on_change <- visualization_visible.on_change();
frp.source.visualization_visible <+ visualization_visible_on_change;
Expand Down

0 comments on commit 14e35b6

Please sign in to comment.