VL.Elementa icon indicating copy to clipboard operation
VL.Elementa copied to clipboard

Snap to GuideLines, EditMode

Open gregsn opened this issue 4 years ago • 0 comments

This is just an idea I had and needed to place that somewhere. Tried to think about potential future implications. Suggested Label: GreatIdeaAndWhyWeDontDoIt.

From a user perspective: Imagine having guide lines just as known from photoshop and alike. It's something that is just there (No node), just like the perfmeter in a renderer (F2). There is a shortcut to show them and hide them. And you can disable all Elementa shortcuts on the root, have other key bindings, or have other ways of toggling global features like this (..)

Anyways. Imagine they are just there and you can easily add new ones, edit, discard them. (check adobe gestures)

Now: I can opt out of automatic layout already by just specifying my own position manually. All the elementa can do this already. That's powerful. As you can use the styling and all the richness of the elementa themselves, but skipping the layouting as you might know better; or you are just more the guy to place things manually, rather then by terms of containers.

You could now follow different pathes to implement the snap-to-functionality.

  • functional approach: "Snap To Guidelines" pin on elementum + Position => Fixed Position. The user specified position on the Position-input now is just used to find the next guideline crossing, which now gets used as the actual position. This can feel weird when moving the guidelines themselves. You loose the attached elementa (and get new ones), one by one.

  • persistent state approach: write the Position input pins of the elementa whenever appropriate. could maybe get combined with the first approach

in general it might be interesting to have an edit mode (again: something global, as the guidelines) in which the elementa are not interactive, but can be moved around by mouse, they write the edited state (position in that case) into the input pin if unconnected. That might even be interesting for other properties as well.

Starting from this you suddenly end up reinventing the designer mode of other UI frameworks, with the big difference of course that you easily can swap modes whenever you like.

But beware: following this road will trigger many new ideas, like

  • i want to have different guideline layouts for different screen sizes. I want to be able to switch between those with Shift-F7
  • I want to Show and Hide the selected elementa
  • I want to group the selected elementa and dock them with the editor, not via process nodes.

gregsn avatar May 28 '20 14:05 gregsn