Gutenberg: Links: Search your old posts and pages in the input field

Created on 6 Jun 2017  Â·  16Comments  Â·  Source: WordPress/gutenberg

The old editor lets you search the link input field for old posts and pages you wrote. We should try and port this:

screen shot 2017-06-06 at 13 17 36

Accessibility (a11y) [Feature] Rich Text [Type] Task

All 16 comments

When the ability to add links is fixed, can you also ensure that the link boundaries work, as per the changes that were added with WP4.8. Those recent updates to the link boundaries make editing links (and the surrounding text) so much easier. Thanks.

When the ability to add links is fixed, can you also ensure that the link boundaries work, as per the changes that were added with WP4.8. Those recent updates to the link boundaries make editing links (and the surrounding text) so much easier. Thanks.

This is already working. There's an issue where if the link is empty (i.e. <a></a>), the boundaries do not show up.

@jasmussen Do you think we should put the link UI in the main toolbar, or leave it inline? Other than that, should we keep the exact some layout as core has now?

I'm not super sold on adding even more UI inline. On mobile I'm not even sure where to add it because there's only half a screen of space. Maybe the inspector makes more sense in the form of "Post Settings → Text → Link" and in that same space we can have more advanced link settings.

I'm cool with trying the inspector for this—agreed the inline UI can get unwieldy at time. The problem is discoverability for this one.

I honestly think Google Docs is the gold standard for how this is handled:

google docs

But that should not be the enemy of shipping this feature in a way that is less complicated.

To put it differently, we should probably do what is easiest first, and then we can iterate if need be.

I would suggest doing the link UI the same, or similar, to how it's done currently done in TinyMCE since people are familiar with it. It's also very similar to that Google example just above

Well, I know I'm kind of arguing against my past self. :) In the current context, it does seem like a lot, and the searching does seem to be a more advanced feature (the basic feature being add and remove the URL). Additionally the inspector provides a lot more space to list many other things next to local posts, like linking heading anchors, results from google...

To be honest, even in Google Docs that starts being a bit much, having panels and toggles inside panels inline:

screenshot 2017-06-27 13 40 20

They also have something like this:

screenshot 2017-06-27 13 35 13

I'm a big fan of the inspector, don't get me wrong. It scales to mobile, and it's a great way to have a big canvas for advanced features without weighing down the basic features.

However this makes it all the more important that we think very carefully about what we put there. Because anything we put there won't be _immediately visible_ to mobile users, or users who dismiss post settings.

In this case, I think the UI, although it looks heavy, should be thought of in the same category as the slack / command, or text auto complete — it really exists best when inline with the text.

Could a compromise be that when you are interacting with a link input field, the other elements (format toolbar, alignment) fade away as if you were in editing mode?

That was the idea behind

Do you think we should put the link UI in the main toolbar, or leave it inline?

We when you click the link button, the input field could expand over the whole toolbar area, because you don't really need all that while adding a link.

Or at least the other formatting button, it should also work for captions etc.

Could a compromise be that when you are interacting with a link input field, the other elements (format toolbar, alignment) fade away as if you were in editing mode?

I think it's worth exploring.

Edit: and I apologize if in the past I was a blocker on this. I make many mistakes ;)

Added the Accessibility label because if this is going to be implemented "inline" it should be done as a combobox, like in the current editor and in the Gutenberg tags suggestions.

Please add one new filter to disable this when wanted.
With TinyMce it had to be done with javascript, or CSS, dont remember. And it was not easy at all.

It is needed often when you want to make life easy for comments and bbPress Users, but do not want them to see this list of all Posts. Or by searched keyword, but it is the same.

I see now this was merged (#1985) even if it has the accessibility label and no accessibility was addressed at all. See previous comment.

In its current implementation, this is an a11y regression compared to how the links suggestion currently works in WordPress. Will open a new issue...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

youknowriad picture youknowriad  Â·  3Comments

nylen picture nylen  Â·  3Comments

cr101 picture cr101  Â·  3Comments

davidsword picture davidsword  Â·  3Comments

jasmussen picture jasmussen  Â·  3Comments