Inserter: Add tabs at the bottom
Extracted from https://github.com/WordPress/gutenberg/issues/983#issuecomment-307193679, let's add tabs to the inserter. Mockup:

As part of this effort, we are rearranging things a bit. We are starting with three tabs:
- Recent
- Blocks
- Embeds
(We might want to rename Blocks, because they're all blocks? Any suggestions? It's essentially everything but the embeds)
The Block tab has categories:
- Formatting
- Images & Galleries
If we want to tackle the "recency" as a a separate PR (such as #888), we can rename the "Recent" tab to "Common" for now, but let's remove the Freeform block from that.
CC and props: @jwold
Tabs with words + categories inside tabs 💯
Aside: the recency list is meant to be linear recency or weighted recency?
Aside: the recency list is meant to be linear recency or weighted recency?
No strong opinions. Probably best discussed on #888, but the goal it needs to solve is virtually the same as the "Recent" tab on classic emoji inserters:

Edit: "Show me your recent emoji tab and I'll tell you who you are", right?
Instead of "Blocks", what about "All"?
Instead of "Blocks", what about "All"?
If it doesn't include Embeds, is it really "All"?
I believe "Blocks" is a simple and clear label that end users will find easy to understand.
The logic for me is they're not "Recent" or "Embeds" - they're all the other Blocks you can use.
The logic for me is they're not "Recent" or "Embeds" - they're all the other Blocks you can use.
Right, I think it can work. My only concern was that Embeds are also blocks. What if we labelled the Embeds tab "Embed Blocks"? Seems like we can make room for it.
Seems like we can make room for it.
Maybe in English, but not in many other languages.
Have you also considered adding collapsible functionality to the headings in the Blocks tab (FORMATTING, IMAGES & GALLERIES, WIDGETS).
Could be an easy way to give easier access to the item you are looking to select when working on a small mobile screen.
My only concern was that Embeds are also blocks.
I don't think novice WP users will see that distinction. Time will tell, but I expect users will end up talking about arranging Text Blocks or adding a Gallery Block.
Emded is to me the logical label for something you embed in your post.
I understand to a Developer it's also just another Block but for a new WP user I think Embed would tell the story.
Sounds good, let's go with Blocks for now.
It would be great to consider to implement the tabs as a real ARIA tabbed interface, see https://www.w3.org/TR/wai-aria-practices/#tabpanel For that purpose, tabs should be placed on top, though.
Aside: "embed" is a terrible term to translate in my language and I guess in many other languages too. Please, let's try to make an effort to find some simpler, more intuitive term 🙂
@jasmussen thanks for splitting this out into a separate ticket! I'll keep an eye on it to see if there's anything else that can be done.
Re-adding my comments from the previous issue. After sleeping on it, I still think we could potentially avoid a more complex tabbed interface by considering how embeds are approached:
I think there's a massive amount of cognitive load to scan the amount of embeds as they currently exist, particularly when considering that each embed requires the same input once you've selected it (a URL).
I understand the "mystery meat" embed approach, but I think a simplified approach would go a long way to fulfilling the "effortless" portion of editor focus:
- Insert "embed"
- Paste link
- Autodetect source/styling based on link parameters (and fail elegantly if it isn't supported) and show to the user
- Customize if necessary
I think this is a pattern that is reflected in other services (Facebook comes immediately to mind when pasting links into updates). This approach would alleviate dependency on search as well, or perhaps, change search so that when searching "Vine," the embed block would show.
@nic-bertino you make some great points here.
When I look at the embed tab, there IS a lot to go through, and many of the services aren't relevant to me. There are probably only 5-10 of the embed services that I'd EVER use as a WordPress user.
I created a wireframe based on what you described. Is this what you're trying to say?
A couple thoughts:
- I've removed the tabs, there are less fields now and we can probably go without tabs for a while yet
- I've added the paste link section into the insert popup, that way it's right there and ready for you.
- I've added a (?) tip, when selected it should (somehow) explain what the embed field does, and the options it offers.
Thoughts?
cc @jasmussen for feedback
I just saw the comments from Joen on https://github.com/WordPress/gutenberg/issues/1289#issuecomment-309675801. Didn't realize the question had already been answered! Sounds like it's a no go to hide all the Embed options, and instead we want to make them more visible.
@jwold thank you for taking the time to articulate this in a wire. It's very close, but I think I would just leave the Embed list item as it stands right now. An opportunity to get into the "mystery meat" might be in the unfilled block, where you could provide a few embed examples or links to the full list. Just a thought.
Also regarding mystery meat: has there been any discussion about transitioning certain content into blocks from other blocks?
For example: If I'm typing in Freeform and I paste an Instagram link, should the UI inform me that support exists for this type of content as an embed (and give me the opportunity to convert it into one)? I think this might be a good way to discover the vast amount of embed support that exists.
@nic-bertino you're welcome!
Just wanted to clarify a few things:
I think I would just leave the Embed list item as it stands right now
- Do you mean as it is in the clickable prototype at the top of this issue, or the way it is in the Gutenberg plugin that's in beta now?
An opportunity to get into the "mystery meat" might be in the unfilled block, where you could provide a few embed examples
- You talked about an opportunity to get into the "mystery meat" with a few embed examples. Are you talking about when the empty block appears in the content area and having a few hints there?
has there been any discussion about transitioning certain content into blocks from other blocks?
- I don't think there's been any discussion, but I'm not sure.
Regarding the "mystery meat", one could also argue that WordPress allows embedding almost everything and thus there's no need to show all these embed options at once. They feel kinda overwhelming.
Similar to a "Recent" tab it might make sense to at least separate embeds into "Popular" and "All" sections.
I think we should try and build this interface, because from the clickable prototype it feels like it solves the cognitive load problem of having so many embeds, which I agree is heavy.
But the embed aliases, that's something I'm very bullish on. When the focus areas were announced, fixing the mystery meat embed discovery problem was one of the key foundational issues we were asked to solve:
The editor will endeavour to create a new page and post building experience that makes writing rich posts effortless, and has “blocks” to make it easy what today might take shortcodes, custom HTML, or “mystery meat” embed discovery.
Mystery meat navigation refers to the concept of a feature being hidden until you discover it. In the case of oembeds, it's "paste and hope". Everyone commenting on this thread are power users, so we know how oembeds work. But I suspect even we didn't know you could embed everything that's now surfaced in the inserter.
We get a number of direct user facing benefits by surfacing embed aliases:
- We show to the user that this feature exists. Even if they never click the "Kickstarter" button, it suggests that yes, pasting a Kickstarter link will embed it on your page in a nice way.
- We enable search. You can search for "issuu" and it will show up as an embeddable block.
It feels hard to argue against having these embed blocks at all. So instead I'm happy to see so much focus on instead making the inserter manageable. Because this is something we'll want to do regardless — if you think there are many blocks now, wait until plugins start adding blocks. We need a scalable interface, regardless of embed aliases, and tabs, headings and recency feels like great first steps.
@swissspidy's suggestion of having categories of embeds is a good idea! Though I'm reluctant to be the arbiter of which embeds are popular and which aren't ;) — though perhaps we could categorize in "video", "posts", "other" maybe?
Another suggestion is to make sure the generic embed block is prepopulated in the Recent tab. Perhaps always there.
@afercia
For that purpose, tabs should be placed on top, though.
Could you see a design where the search is above the tabs?
Aside: "embed" is a terrible term to translate in my language and I guess in many other languages too. Please, let's try to make an effort to find some simpler, more intuitive term 🙂
Open to other suggestions 👍