Refactor: Systematize semantics and roles of ids and labels for Elements #149
Labels
No labels
bug
design
duplicate
engine
enhancement
maintenance
prospective
question
regression
stub
todo
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
StudioInfinity/dyna3#149
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In the original PR discussion where this came up:
Originally posted by @glen in #148 (comment)
Concretely for the behavior of dyna3, this would mean:
Either we change things so there might be no label, and in that state, id is used wherever label would be needed; or we populate label with the id at creation time. I pretty strongly prefer the former, because it avoids the ambiguity between an element that has id
Xand labelXjust because I never gave it any other label (in which case if you id-change it toYyou'd want to change the label, too) and an element that has idXand that I explicitly labeledX(in which case the label should be left alone even if you change id).The primary identifier shown in an outline sort of view is the id, with the label only shown, in some visually subordinate way, if it has been set (or in the less preferred option, if it differs from the id).
In a graphical sort of view, in the typical default state just the text of the label is rendered next to the element, and the id is not displayed. But it may be that when an element is selected, this display changes to include the id, and to have affordances to display additional information at that graphical location.
Note that in many diagrams, one wants many elements to be drawn with no label at all. We need to decide if this is accomplished by explicitly setting the label to the empty string, or whether there is additional checkbox that turns off label display while allowing one to keep something in the label value. (My guess is likely the latter.)
Other labeling features, like the ability to display regulator values within the label (so for example the label on an angle could include the measure of the angle, as is common in many dyngeo systems), would be addressed in other/future issues -- those things are outside the scope of this issue.