Conversation
Today we allow a single Text annotation on a connection line. This change generalizes that to allow more than one, for example to be able to specify both %first and %second on a connection.
There was a problem hiding this comment.
There are two main reasons why we at Wolfram don't want to go in this direction:
- The GUI operation for moving the label to a different point on the connection line becomes complicated when there is more than one label (I'll not go into more details about why unless asked).
- We believe that what users might actally want instead of multiple labels at the
connect-equation is the possibility to attach labels to a connector of a component instance.
Also, isn't it a bit controversial to introduce more top-level annotations which may occur more than once?
A label on a component instance's connector would be placed on the component declaration:
Modelica.Blocks.Continuous.Integrator integrator annotation(
Placement(transformation(origin = {-70, 30}, extent = {{-10, -10}, {10, 10}})),
labels = {
ConnectorLabel(id = "u", label = Text(string = "a")),
ConnectorLabel(id = "y", label = Text(string = "v"))
}
);
At the moment, however, we are not pushing for something like ConnectorLabel, as we'd like to get more experience with how the current connection line label is and can be used.
We have some, and to me there are two issues:
To me the current texts are clearly tied to the connection - not to the connector. Or more specifically to the connection-end-points (plural even for one label: the text is placed at one side of the connection and uses the connector-sub-part from the other side). For those cases it doesn't make sense to move them to a different point on the connection-line - and it doesn't make sense to view them as labels for the connectors, as the label is specific to the connection not to the connector (so I don't see a case for having the labels without the connections). However, I haven't investigated when more than one text would be super-useful. Currently they are used when connecting a sub-part to an expandable connector, and in those cases one text suffices as you connect a sub-part to the whole, not two sub-parts. |
|
Before engaging deeper in this discussion, I would like to see some compelling real-world use cases (with pictures) fulfilling:
|
Today we allow a single Text annotation on a connection line. This change generalizes that to allow more than one, for example to be able to specify both %first and %second on a connection.