Design for Position UI #46032
Replies: 8 comments 30 replies
-
Thanks for working on the designs! How do you think it could work with, say, nested Groups that have fixed position enabled? I'm coming from the assumption that the list view represents a tree of elements. The design does make elements sitting "on top" more accessible, but on the face of it, splitting the tree into fixed and scroll appears to me to diverge from the tree paradigm. Just thinking out loud here: it would be ace to be able to switch the list view between a strict hierarchy (what it is now) and some representation of z-index order. Or not 😄 🤷 Or, in the opposite direction, are visual aids required at all in the list view given that a user can click on the sticky element and edit the properties? |
Beta Was this translation helpful? Give feedback.
-
Nice reasoning here! I think that makes for a really good pragmatic step for introducing the control, and good work honing in on all the conceptual details surrounding layout. I was chatting with @tellthemachines about this too, and I think you've made some great arguments for decoupling the concept of Position from Layout. In terms of Also, the idea of allowing relative + absolute positioning further down the track will unlock some very creative possibilities for laying things out with blocks, so that's another good argument for decoupling from container blocks (e.g. set a Group block to "relative" and then set a child Image block to "absolute" and nudge it off to the side a little for a deliberate aesthetic) 👍
I imagine moving things around in the list view based on position attributes could be tricky to implement. Though I think it's a good thing to explore, would this be a blocker for the initial implementation? I.e. in an initial implementation with sticky and top position, would it be acceptable if it weren't flagged in the list view, or do you think having some visual indication there is a blocker for usability? Thanks again for splitting out this discussion! 🙂 |
Beta Was this translation helpful? Give feedback.
-
Thanks for starting this discussion! I have a few thoughts to add: Controls and implementationWith "fixed", "sticky", "absolute" and "relative" it seems increasingly like we are trying to implement a UI for CSS functionality. Is this really what we want? It might be good to take a step back, consider the needs of our users (not all of whom are familiar with CSS) and build from there, rather than taking the implementation as a starting point and building the tools around the CSS properties we can expose. CSS We can solve this either with detailed instructions on how to make it work, or by making it work magically with JS. I suspect from a user point of view, a "magically working" experience will be much better. List ViewWith the separation of positioned blocks into their own section in List View, we need to consider accessibility very carefully. Currently, List View is the most accessible way to navigate the editor. Its intent to mirror the document structure is crucial particularly when the interface is visually complex enough that we can no longer tell at a glance how many blocks we have on the page. I anticipate that adding fixed or otherwise positioned blocks will only make the canvas harder to navigate and edit, and if List View no longer reflects the DOM order that can make tasks like moving blocks much harder. We should particularly consider that positioning often depends on a parent element (whether a sticky container, or a relatively positioned ancestor to an absolutely positioned block), in which case a DOM-accurate List View will be crucial to make sense of the whole. |
Beta Was this translation helpful? Give feedback.
-
One other option we might consider for the As before we could do the same thing for the |
Beta Was this translation helpful? Give feedback.
-
I'm coming in late to this one, sorry was under the weather last week. Lots of good thoughts here, lots of excellent mockups. A few quick thoughts:
Here's a quick things at taking Jay's ingredients and tweaking them a bit: These actually integrate another idea of Jay's, which is to integrate a "quick shortcut" dropdown inside the input. It's like the unit picker, a sort of shorthand just like the unit control. What do you think? |
Beta Was this translation helpful? Give feedback.
-
While your use-case is clearly focused more on the header, would this also allow creating UIs for floating modals and things like cookie banners? Those are trickier than header because there should be a way to hide them for most of the time so that they aren't obscuring the view all the time. |
Beta Was this translation helpful? Give feedback.
-
One aspect of positioning presets is to find good values to apply for each preset. It might be useful to explore exactly what such presets might look like, so I took a stab in this codepen: https://codepen.io/joen/pen/wvXLORR?editors=1100 It has 9 preset positions, and each of them are applied by combining two classes, such as "is-top is-left". This involves not just top/left/right/bottom values, but for middle and center positions, it needs a little translate as well. Is that feasible? Are there good alternatives, maybe |
Beta Was this translation helpful? Give feedback.
-
Hello, is it not possible to integrate this in the following way: When a block is fixed, it remains fixed at the same position as it is displayed in the full site editor? |
Beta Was this translation helpful? Give feedback.
-
CSS position has many permutations, and while we're unlikely to implement everything in one go it would be good to settle on a design that can serve us equally well in the short and long term.
Sticky
(and potentiallyfixed
) are currently being worked on in #46142 (originally started in: #44723).Here's a riff on a design shared earlier by @jasmussen:
Fixed
selection includes a matrix picker for easy position selection, and a Settings icon which exposes more granular control.Sticky
selection includes a Settings icon where you can specify offset positioning along the X / Y axis.In the future we can add:
Absolute
selection, which would have the same secondary tools asFixed
.Relative
selection which would not require any secondary tools:Let's discuss.
Beta Was this translation helpful? Give feedback.
All reactions