Closed paaljoachim closed 4 years ago
Good catch, <LinkControl>
was under active development so wasn't ready to switch over.
It should be ready now to switch URLInput
out for using LinkControl
I also assume that the Social Block will be almost an exact replica setup/UI style as the Buttons Block.
The first attempt was to use LinkControl, see #20740, this approach is not a good solution since it requires setting the parameter on each link. The ideal solution is to set the attribute on the parent and not each individual block, then on render add the proper target for the links
To read the parent attribute from the server-side render requires #19685
So this ticket can be picked up after that one closes.
An additional piece when adding a target="_blank"
to a link, we should also include rel="noopener noreferrer"
for security per
https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/
This appears to be a duplicate of #18486.
Btw I believe this issue in relation to consistency in the Link Control Component needs to be looked at: https://github.com/WordPress/gutenberg/issues/17293
We had an additional request from a customer in chat today.
Put me down as someone else requesting this. I'm sure there are compelling technical reasons why it hasn't been done, but for an end-user this is inexplicable... seems like a reasonably common use case.
New explorations are being done with link control: https://github.com/WordPress/gutenberg/issues/23375 I would think that this would also drip down to the Social Icons Block.
I'm with @drywall, it's really a very common use case, it's even difficulty to explain to an end user why it's not solved yet.
Hi @allysonsouza
I am testing with WordPress 5.7 RC1. No Gutenberg plugin active. I am using the WordPress beta tester plugin. Twenty Twenty One is the active theme.
Social icons will open in a new tab if one chooses to do so. There is a Link settings in the sidebar:
This is still an issue with widget blocks, there needs to be an option to open them in a new tab.
Checking in from the future where this is still an issue... I am guessing it is a ploy to encourage users to purchaser a higher tier plan that allows the installation of plugins to correct the issue...
Hi @allysonsouza
I am testing with WordPress 5.7 RC1. No Gutenberg plugin active. I am using the WordPress beta tester plugin. Twenty Twenty One is the active theme.
Social icons will open in a new tab if one chooses to do so. There is a Link settings in the sidebar:
Is this something that was launched in an update or did it die in beta? I don't currently see anything like this in my editor view. Any help is appreciated, thanks!
It would be nice to have the possibility to open social icons in a new tab.
We also received a request for it here: https://wordpress.org/support/topic/social-icons-link-target-attributes/
Today the link attribute in Social Icons Block look like this:
@mkaz @jasmussen