Skip to content

Commit

Permalink
Fix blank input port (#6614)
Browse files Browse the repository at this point in the history
Fixes #6485

Conflicting requirements for the widget tree caused the issue:
1. The span tree node had a connection, and the text of the `number1` label was changed to white (as per the `Connected` color state)
2. The node configuration did not consider it a valid port because the span tree kind was `Operation`, which is not a port usually. So the port shape was not displayed, making the label blend with the node background.

I fixed the issue by considering the existence of the current connection for `Operation` nodes. Remember that it does not turn the node into a port, so after removing the connection, it's not possible to connect it back. That makes sense, in my opinion, as the resulting AST is invalid anyway. But at least we can see the label on the invalid node.


https://github.com/enso-org/enso/assets/6566674/23934966-8f72-4675-abe3-78a3f0c0cda4
  • Loading branch information
vitvakatu authored May 11, 2023
1 parent cd7fb73 commit 4b7afbf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/gui/view/graph-editor/src/component/node/input/widget.rs
Original file line number Diff line number Diff line change
@@ -306,7 +306,9 @@ impl Configuration {
} else {
Self::always(label::Config::default())
},
Kind::Token | Kind::Operation if !has_children => Self::inert(label::Config::default()),
Kind::Operation if !has_children =>
Self::maybe_with_port(label::Config::default(), is_directly_connected),
Kind::Token if !has_children => Self::inert(label::Config::default()),
Kind::NamedArgument => Self::inert(hierarchy::Config),
Kind::InsertionPoint(_) =>
Self::maybe_with_port(insertion_point::Config, is_directly_connected),

0 comments on commit 4b7afbf

Please sign in to comment.