-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Top Toolbar improvements #40450
Comments
These ideas are mainly based off inital design outlines suggested in #20592, but with an eye towards toolbar-reuse. In the cases above, the main difference in suggestion 1 is the omission of the drag handle, and in images 2 and 3, the color/radius/padding of the toolbar itself. |
Aligning with the [+] might be safer than aligning to the content due to its variable width. Without that geographical relationship, the floating/docked iteration might not work so well. Option 2 looks quite good to me. |
Not sure we are there yet. The first could make sense as a natural relationship to the floating mode. The others have a strange alignment. It could be tested centered, for example, or even all the way to the left. The uncompleted dividers are perhaps an anomaly from the rest of similar cases in the current language. |
Hey folks! Working on a few concepts for this, will share them shortly :) |
@david-gonzalez-a8c thanks for sharing the mockups. I like the first one, it seems worth trying to see how it feels in practice, as it solves the most salient points right now. |
Hey @jameskoster. Sorry, that was a little vague on my part! I was referring to efforts in this direction, shared back in #20592. Not only because of contexts where there's a selector in the main navigation, but also I think it's challenging when it comes to information density. What you shared makes total sense as a solution to me! I think it's a matter of pros and cons now: I personally like the simplicity of extending the main bar like what you shared and how unambiguous is it, with the floating toolbar it may not be obvious that it will stick to the top until users scroll or play around. But then this is probably more convenient for bigger screens and I think the ability to share the same component in both modes could be valuable. |
@jameskoster I think this could work, but how would it display the parent block? That's one of the main things this needs to address. Also we might need a way to dismiss the selection and get to the list view / undo redo tools from the toolbar itself. What if the [+] becomes a [<], for example? (or some other collapse icon) |
Then you wouldn't be able to open the Inserter (keyboard aside) when a block is selected, which could be a can of worms? I find that clicking in empty space to deselect is a good heuristic, both in the canvas and in empty regions of the UI. There's also the As for the parent selector, it's probably just an exercise in finding the right separator. Some of the examples already shared could work, here are a few others: |
To clarify, the [<] wouldn't unselect a block, just show the higher level tools. |
Yes I suppose that could work: toolbars.mp4There' a question about how you get back to the block toolbar, but clicking the block again seems fairly intuitive. |
A couple of thoughts for when we're able to pick this back up:
It would be good to bring home this design so we can get it developed. @jameskoster do you have a Figma handy? Would be happy to take a stab at the above. |
It's a bit messy, but here's the Figma. |
Took a stab at parsing the feedback above. At face value, it falls apart: The main issue above is the double close icons in the inserter open + block selected case, as well as the fact that the more buttons have a background, the more clumsy it gets. But the dark color or at least some "anchoring background" on the parent block still feels important to portray the relationship. So I tried a variation of that which took it in a different direction: Maybe? |
Can we look at it without the dark toggled state for now? That seems like a separate thing to consider. |
Looking promising to me. Though I think the shortcuts are adding redundancy and confusion in that context that already serves for two different mental models (full canvas controls + block controls), and it'd be adding yet a third (block addition or shortcuts). Too many elements moving too. Either we move the shortcuts out of that top bar context and place them below the trigger (+) or they have a very different visual footprint so they actually have a different intent than the other two models. |
For me the jury's out on whether showing recently used blocks when the inserter is open is actually useful. I think it's good to have a design ready that considers it, but it also seems smart to potentially start without it, like so: Then we'll know the design scales if we choose to extend it in that direction. And if not, that works too. |
Added the "needs a11y feedback" label to make sure we consider all aspects of the desired functionality. For example:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
A problem that needs to be addressed in the design @jasmussen is that, as far as a quick hacky implementation shows, if you have this implemented, using the up arrow have shown the document tools, then opened inserter or list view, then went back to block tools with the button on the right, then you won’t see the block tools dropdowns: The block switcher is open behind the list view in the screenshot above. Should they just open on top? If so we may have a z-index war with the interface package's panels. |
Shouldn't the block switcher should be at a higher level? I see that dropdown as no different than the dropdown that extends from the Preview button. As far as text labels go, perhaps it's time we create a tracking issue. Spread as feedback across a number of tickets, it's insufficient to just convert aria text to a button text label for this, we need to carefully think about the titles of each of those controls as a starting point. |
I've created a tracking issue (#47723) to help coordinate work related to achieving the goals and design outlined here. |
@jasmussen mobile-top-toolbar.mp4 |
Yes, that's a good question. To help the discussion I'll refer to the top toolbar as two ingredients: document and block controls, which for the purposes of this issue are merged into one on desktop. My instinct for the time being is that on mobile, we separate those two and stack them, block controls below document controls. I think in general, the mobile toolbar is in due of separate improvements. But even with tweaks there, it's unlikely we'll ever fit block controls and document controls on a single row. In that light, another improvement that's worth revisiting is to see if we can affix the block controls to the top of the mobile device soft-keyboard. Native apps do this very well, but so far this has been very tricky to do in mobile web-apps outside of Chrome on Android. To my understanding, that's due to Android resizing the viewport to fit the available space remaining after the soft keyboard opens, meaning we can just fix the toolbar to the bottom on such touch devices. Meanwhile in some other browsers, like Safari on iOS, the viewport size does not change (last I checked), and instead the soft-keyboard covers part of the page. It's worth looking into this behavior in some codepens, because I believe some of the opportunities here have changed in recent years, it's at least 2 years since I looked at this the last time. By the way, when we do get to that rabbit hole, this trick might help:
|
The top toolbar has stagnated a bit while the feature set of the editor has evolved. The following design addresses the most pertinent issues including:
Original issue
In particular, the now established block parent selector is missing when top toolbar is enabled, which makes selecting some wrappers particularly challenging (group and gallery, for example). The layout also doesn't feel quite right with the block type not being aligned with the [+], and it becoming somewhat inconvenient on larger screens.I propose we explore these two changes:
If the docked-floated treatment works, we should have to do anything else for the parent selector. If it doesn't, we'd need some visual treatment between the parent and current block types.
The text was updated successfully, but these errors were encountered: