Introduce ghost mode for elements #85
No reviewers
Labels
No labels
bug
design
duplicate
enhancement
maintenance
prospective
question
regression
stub
todo
ui
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: StudioInfinity/dyna3#85
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Vectornaut/dyna3:ghost-mode"
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?
On the branch to be merged, any element of an assembly can be put in "ghost mode," making it intangible and increasing its transparency. Being intangible means the element is ignored when you click to select on the display. Ghost mode is toggled using a checkbox in the outline view.
This pull request should commute with #87.
Any reason you didn't just make colors have an alpha channel everywhere, as opposed to adding an opacity argument to the push command and then having this combine channels function inside push so that there are opaque 3-channel colors in some places and separately a concept of a 4-channel color_with_opacity, that seems a bit verbose? Would it be simpler to have one concept of (4-channel) color everywhere? Just a thought, let me know what you think.
I was thinking that when we add a user-facing opacity setting, we'll also need to figure out how it interacts with the "ghost mode" opacity changes, and I didn't want to think about that yet.
We already have an analogous situation with color. There's a user-facing color setting, but selecting an element also affects its color, and we have formulas that do the color adjustment for spheres and points (which are currently the same for both element types).
We could easily make up a similar formula for opacity, but it wouldn't be informed by any real interface considerations, because we don't have a real need for a user-facing opacity setting yet.
@Vectornaut wrote in #85 (comment):
Well, it's more of a color setting API -- the app user has no way to set the color of an element.
I guess this PR is working as is, but it just seems like a roundabout way to deal with colors... it's a bit hard for me to imagine that the ultimate version of the software will use this collection of abstractions and interfaces to deal with colors, that's all. What do you think? Just confirm that you think that having this PR working as is outweighs the value of trying to adopt a more streamlined and uniform representation of colors now, and we'll move on. Or if you actually decide that it would be good to refactor the color representations now, that's fine as well. Let me know either way.
This certainly shouldn't be the final form of the color API, because the
Element
structure should eventually include parameters that provide direct control over opacity. I've opened issue #88 to discuss that. However, I still think we should hold off on refactoring until we've spent more time to exploring the interface and thinking about user needs.OK, works as advertised, leaving color refactoring to #88, passes tests. Merging.
I just noticed this apparent regression, and I wanted to check whether it was intentional before filing an issue.
@ -202,7 +202,11 @@ fn ElementOutlineItem(element: Rc<dyn Element>) -> View {
) {
div(class="element-label") { (label) }
div(class="element-representation") { (rep_components) }
div(class="status")
Did we intentionally remove this indicator, which flags an element with an invalidly specified regulator when the regulator list is closed? The removal looks like a regression—especially because we didn't remove the associated CSS—but I wanted to check in case we decided on it in a meeting and I forgot to write it down.
I think I never responded to this. If you think there should be some indication of a regulator with bad input (or something like that) and there currently is no such indication, absolutely feel free to file an issue. I don't recall any discussion that we should not have such an indication. (And hopefully filing issues/recording notes in some permanent online fashion immediately after our meetings will help with confidence on such matters!)