Is your feature request related to a problem? Please describe.
Many have been asking for an easier way to have additional link options.
Add easy way to modify links and add toggle options.
Add nofollow option for links
Make link selection consistent
and there are probably other associated issues.
Describe the solution you'd like
Here is one way to do so. Adding a more icon to bring in additional link options.
Added icon.
Hover icon.
Opening additional options.
I am not sure which options should be added to the more screen, but I believe it would be helpful for many that it does exist. Perhaps only adding a way for plugins to add the more option or having it directly added to Gutenberg Core.
We did this with AIOSEO (both toggle controls and a text field) but honestly it was a real pain to do. It would be great if the Gutenberg team added any way for plugin developers to extend the existing options with their own.
I'll also let Dave and Marcus know about this issue...
@getdave and @mkaz
As I do think it can solve a few issues in regarding link controls.
I think it would be important to think what the reason for adding more link options is and if they are even needed. I don't believe by default more options are helpful myself. I also don't think hiding if they are useful makes sense. In this case I would suggest examining what is needed over creating another hidden area to expose options. My recommendation would be to start from the point of why is something needed?
I think it would be important to think what the reason for adding more link options is and if they are even needed. I don't believe by default more options are helpful myself. I also don't think hiding if they are useful makes sense. In this case I would suggest examining what is needed over creating another hidden area to expose options. My recommendation would be to start from the point of why is something needed?
Agreed! Classic editor doesn't have these options and always been plugin territory. We've discussed this before and as I recalled we agreed on having filter/hook on the link control for developers to extend; and be able to add these features easily.
We did this with AIOSEO (both toggle controls and a text field) but honestly it was a real pain to do. It would be great if the Gutenberg team added any way for plugin developers to extend the existing options with their own.
💯. To be able to make this work there's a need to create separate format and rely on custom URL popover.
@arnaudbroes Looks like you are using the one I've created for EditorsKit plugin. Would really appreciate if you can support EditorsKit ;) Thanks!
Think of this more of a way for third-party plugins to add link controls here, such as a "No follow" toggle, or "Sponsored" toggle (or whatever a plugin may want to add). I'd say that if there were no additional controls added to the filter, nothing changes from how the link controls look today.
BUT, if there _are_ additional controls added to a future filter, then the "More link controls" arrow could add those additional controls.
Sorta the best of both worlds by letting folks essentially configure their experience. I believe adding more top-level controls here would just further complicate the interface - especially if those controls are no where near the primary action (no follow for example).
Firstly thanks for raising this @paaljoachim. Much appreciated.
I recalled we agreed on having filter/hook on the link control for developers to extend; and be able to add these features easily.
When I originally worked on this component this was the approach we were going to take. However, I seem to recall we (I) ran out of "space" to accommodate in the PR. Apologies for this.
Could we not try the following:
For me, the issue is that we can't service _every_ requirement in Core without ending up with a completely cluttered link UI. That is something we should avoid. Plugins are a good fit for many of these options IMHO.
...then the "More link controls" arrow could add those additional controls.
Yes, that would be a good approach. The component is geared up for this already. And the settings are easy to extend once we have the filters in place.
Here's an updated Figma Prototype and modified mockup.
@arnaudbroes Looks like you are using the one I've created for EditorsKit plugin. Would really appreciate if you can support EditorsKit ;) Thanks!
That's correct, it's inspired on your great work, although we made quite a bit of changes. We also added support for the new component that was included in WP v3.4.0. Feel free to have a look at it!
I don't believe by default more options are helpful myself.
A"nofollow" option is quite useful though. I might be mistaken but I believe an earlier iteration of the previous default editor in WordPress had an option to add this. That's why I'm personally not fully convinced that this should be plugin territory.
I also don't think hiding if they are useful makes sense. In this case I would suggest examining what is needed over creating another hidden area to expose options.
Fully agree on this. If they're added, they shouldn't be hidden. I do understand that we want to strike a balance between extra options and UI clutter.
Here's an updated Figma Prototype and modified mockup.
What concerns me here is that this might not* be very intuitive for the average user if they're hidden by default, although you could argue these options are meant for more "advanced" editors.
What concerns me here is that this might not* be very intuitive for the average user if they're hidden by default, although you could argue these options are meant for more "advanced" editors.
I'm not sure the everyday WordPress user would understand what a no-follow link does, though it would be nice to test for discoverability.
I'm just so hesitant on continuously adding to the current UI – its already difficult to navigate.
Relates to #16609 as well, which was closed, but which caused both AIOSEO, and Editor Kit, and us at Yoast, to build something which is really really ugly and not what we wanted to do. I'm all for calling this plugin territory as I don't think we'd implement it the same way even between those plugins, but it should be _possible_ to do at least. So, mostly, I want this to be filterable / slot fillable.
Looping back to this, am I right that the path forward would be to have it as hooks and then consider from there if core has an interface for it (or not)? That said, this should change to hooks specifically and have a dev flag I feel, so going to do that and move it on from design feedback as the interface isn't something to be considered right now.
Most helpful comment
We did this with AIOSEO (both toggle controls and a text field) but honestly it was a real pain to do. It would be great if the Gutenberg team added any way for plugin developers to extend the existing options with their own.