-
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
Link settings extensibility #13190
Link settings extensibility #13190
Conversation
7174da7
to
dfaa108
Compare
Howdy, any news here about the state or if something is missing? Is there already a scheudule when this will be included into Gutenberg? Currently there are a lot of options which could be possible be added to the LinkSettings to support e.G. custom data-attributes for tracking or even kind of theming to open modals. |
@xyfi Can you add the No Follow example to the docs? |
Noting a related discussion from the #core-editor meeting in WP Slack today: https://wordpress.slack.com/archives/C02QB2JS7/p1547046547434300 |
1e10b34
to
8273c4c
Compare
See #12325 |
+1 to have this feature ASAP. Any ETA? 5.1? |
I'd like to point to #10128 in an effort to keep the styling and interaction consistent. This is what that interaction looks like. |
This makes me wonder whether we should include more options it in the core by default without adding the overhead of slots and fills. Maybe we should add more options under 3 dots menu based on this PR and Button block. In particular, in the case of the Button block, these Link Settings sections feel super disconnected from the UI. We should think about the flow when someone has to use the keyboard to set link rel after providing url. I think it would be super annoying to tab as much to edit related settings. |
…g link and updated snapshot
32f4218
to
0629911
Compare
There are a lot of options that could/should be there. Some of those are documented on #11599 For example:
I agree that core should likely add the first 3 as defaults, but a slot definitely seems like the way to solve this for the long term, and notably the lack of extensibility in this space is a huge regression from classic editor to Gutenberg |
For me this is the wrong point to add this specific feature. It should be abstracted into a "general thing", which is re-used accross all Components which can have HTML-attributes [1]. This gernalized implementation should allow to add/remove key/value pairs (value could be maybe even a "selection of predefined allowed values"). Also blacklisting "core"-attributes (not changeable) - like on the Link-Component the [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes |
FYI: There's a plugin called EditorsKit that you can install and get nofollow functionality today. Not sure how they're doing it, but you can try it today. |
The Link UI has evolved a lot since this PR was in active development. What is the status of the PR? |
@xyfi considering that now the linking mechanism evolved into using |
Description
Adds the possibility to expand the inline link settings via Slot/Fill and alter the link's attributes.
To achieve this I had to refactor the logic that determined the link's attributes because the only possibility was to change the link to an external link.
While working on this I found out that the
aria-label
logic is broken. The label will always be(opens in new window)
.How has this been tested?
Add the
NoFollowToggleWrapper
somewhere in your code and make sure the component is always rendered. I simply copied it intopackages/format-library/src/inline.js
.Screenshots
Types of changes
New feature.
Checklist: