Gutenberg: Add slash command hint on focused empty paragraph

Created on 9 Oct 2017  Â·  2Comments  Â·  Source: WordPress/gutenberg

Issue Overview

The Slash command (type / to search and insert content) is a great way of inserting content in a highly keyboardable way. But it isn't very discoverable.

Let's consider adding a hint as to what it could do.

Possible Solution

In the following mockup, the user set focus in the top textblock, and made a linebreak. All the chrome fades out, and he/she can continue to just type. The text prompt suggests you can do so, or use the slash command:

newline prompt

If the user moves the cursor or otherwise makes the block chrome appear, it would look like this:

newline prompt selected

If the user deselects the newly created empty paragraph block, the hint text reverts to "New Paragraph".

In other words — this ticket could be solved if the placeholder text of a paragraph block that has the cursor reads out: "Add text or type / to insert content".

General Interface

Most helpful comment

Thanks for the addition, Davide, and great to have in context of placeholder text improvements as will no doubt come up when implementing this.

It can be tempting to think that "adding smarts" to the Paragraph placeholder text feels like a slippery slope/edgecase that adds complexity. But I would suggest that the Paragraph block is so important that it may be worth adding these smarts. It also feels like, if we get the smarts right, a user just editing won't know we've done anything at all — the placeholder text is there when it makes sense, and not when it doesn't.

We already have some smarts: the first empty paragraph shows nothing, the 2nd successive paragraph shows "New Paragraph" placeholder text. So it could be worth tuning this further.

All 2 comments

Quick comment with a slightly larger perspective than this specific post (I'm aware it's inserted in
broader discussion) — I hope it would inform it.

Context first, the "blank" paragraphs could happen in two different scenarios:

  • Blank paragraph in between — obvious spacing, almost surely intentional, and even when not, easy to see and to remove.
  • Blank paragraph at the end — non obvious spacing, might not be intentional

On top of that, if someone is writing, and even more, wrote in the middle, it'd incredibly distracting to the reviewing and editing flow to be caught on these placeholder texts. It's disruptive, and I guess it would be even more with people that have different reading abilities.

Which means we need two different interaction and visual patterns to follow the likely intent.

A suggestion that goes in the direction to satisfy the above and the / of this ticket too, could be:

  1. End Paragraph → show placeholder when selected as the above design: "Add text, or type / to insert content".
  2. Any paragraph excluding the end one, which includes the between ones → no placeholder text, just the blank line.
  3. (Optional as further sophistication) We show the placeholder text only on a blank paragraph at the end that has a blank paragraph before them OR if it's the first block on the page OR only block on the page — just these 3 conditions, every other instance shows nothing.

The reason for this is that when a user starts writing, they would automatically get the placeholder text, so they are reminded about it. I don't think a _constant_ reminder is necessary, neither for the fact they can... type... or that there's an advanced / feature. :)

For this reason I'd probably edge in doing (3) too, as it seems to be a good balance for both first time users and long time ones. :)

Thanks for the addition, Davide, and great to have in context of placeholder text improvements as will no doubt come up when implementing this.

It can be tempting to think that "adding smarts" to the Paragraph placeholder text feels like a slippery slope/edgecase that adds complexity. But I would suggest that the Paragraph block is so important that it may be worth adding these smarts. It also feels like, if we get the smarts right, a user just editing won't know we've done anything at all — the placeholder text is there when it makes sense, and not when it doesn't.

We already have some smarts: the first empty paragraph shows nothing, the 2nd successive paragraph shows "New Paragraph" placeholder text. So it could be worth tuning this further.

Was this page helpful?
0 / 5 - 0 ratings