-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Block Switcher: Add "Transform into:" label at the top of the list #493
Comments
What does "selected" mean in this context? Dark background? Should the effect be removed from this selected option when hovering other options in the dropdown? And reapplied when mouseout from any of those other options? |
Not sure if you're referring to the visual style, or the behavior, so I'll try and suggest thoughts on both. Behaviorally, this would be similar to a select box. I.e. pick your country from a dropdown of countries, and your country still shows up both in the dropdown if you open it again. Visually, let's try and go with the inverted dark gray version for selected, and blue icon/text on hovering non-selected items. Stylistically it is a bit heavy, I agree, but it reaches the AAA accessibility standards, so let's try and see if it also feels heavy in non-static use. If we still find it heavy after having used it for a bit, let's revisit. Other options include different colors, or a border as we use for the hover effect on formatting toggle buttons. |
Per discussion in #1249 (comment), it seems like maybe including the current block type in this list may not actually solve any usability issues. Let's try a new approach. Let's embrace the fact that the current block doesn't show in the list. This isn't a dropdown. It's a switcher, and it lists block types you can transform into. Going a step further, let's label it. Perhaps like this: |
This was shipped in 1.3... although IMHO it opens a wider usability problem that I will create a separate issue for. |
@jasmussen noticed this while testing #2989 This "Transform into:" text should be tested a bit with screen readers, once things get a bit stable with these drop down menus. The technical reason is elements with an ARIA I have no objections in keeping it if it doesn't break screen readers behavior 🙂 From a visual perspective, have you considered to use a tooltip on the toggle button instead of a visible text within the menu? Something like: |
can we move the |
@youknowriad: DOM events don't work as expected with screen readers on normal |
@youknowriad ah that's different from what I thought. If the onKeyDown is still attached to the NavigableMenu and NavigableMenu has role=menu, that theoretically should work. For this reason, I'd still prefer the tooltip as in the screenshot above. |
Sorry for the late reply. Aside from the discussion above (thank you for looking at solutions), I want to ask a question about an alternative route. In the most recent mockups in #2983, there's a "switcher" in the right most context menu, which shows a different design for items there — "Turn into Heading", etc. I can imagine two approaches from this:
Do we like either of those solutions? Either of them have the "Transform into" text preceeding them. I personally like the idea of 1. |
This one? nice :) Yep then for consistency I'd rather try 1. I tend to think having labels always clearly identifying the available action is always preferable. There's a difference between a label that just says "Heading" and one that says "Turn into Heading": the latter always makes sense even when read out of context. So basically something like this? On a side note: some block names should maybe be improved a bit. In my language, "Preformatted" doesn't make much sense :) it's an adjective, not a noun.
|
Yes, basically, except weith a few visual tweaks to style, padding, and such.
I kind of want to not include either "Verse" or "Preformatted" in that menu ... I know, this is controversial, and it's not a mountain I will die on. But they feel... confusing. |
Say you have a text block. You click the switcher and see Heading and Quote (among others). You should also see Text there, but selected.
In this mockup, the block is already a quote, and the switcher button has just been clicked:
The text was updated successfully, but these errors were encountered: