mirror of
https://github.com/enso-org/enso.git
synced 2024-11-23 08:08:34 +03:00
Fix blank input port (#6614)
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
This commit is contained in:
parent
cd7fb73232
commit
4b7afbfd36
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user