Skip to content
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

Social icons Block: Open link in a new tab. #20707

Closed
paaljoachim opened this issue Mar 8, 2020 · 13 comments · Fixed by #25468
Closed

Social icons Block: Open link in a new tab. #20707

paaljoachim opened this issue Mar 8, 2020 · 13 comments · Fixed by #25468
Labels
[Block] Social Affects the Social Block - used to display Social Media accounts [Status] Blocked Used to indicate that a current effort isn't able to move forward [Type] Enhancement A suggestion for improvement.

Comments

@paaljoachim
Copy link
Contributor

paaljoachim commented Mar 8, 2020

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:

Screen Shot 2020-03-08 at 19 15 00

@mkaz @jasmussen

@jorgefilipecosta jorgefilipecosta added [Block] Social Affects the Social Block - used to display Social Media accounts [Type] Enhancement A suggestion for improvement. labels Mar 9, 2020
@mkaz
Copy link
Member

mkaz commented Mar 9, 2020

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

@mkaz mkaz self-assigned this Mar 9, 2020
@paaljoachim
Copy link
Contributor Author

I also assume that the Social Block will be almost an exact replica setup/UI style as the Buttons Block.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Mar 9, 2020
@mkaz mkaz removed their assignment Mar 11, 2020
@mkaz
Copy link
Member

mkaz commented Mar 11, 2020

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/

@mkaz mkaz added [Status] Blocked Used to indicate that a current effort isn't able to move forward and removed [Status] In Progress Tracking issues with work in progress labels Mar 11, 2020
@mrwweb
Copy link

mrwweb commented Apr 23, 2020

This appears to be a duplicate of #18486.

@paaljoachim
Copy link
Contributor Author

paaljoachim commented May 19, 2020

Btw I believe this issue in relation to consistency in the Link Control Component needs to be looked at: #17293

@xpurichan
Copy link

xpurichan commented Jul 30, 2020

We had an additional request from a customer in chat today.

@drywall
Copy link

drywall commented Aug 6, 2020

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.

@paaljoachim
Copy link
Contributor Author

New explorations are being done with link control: #23375
I would think that this would also drip down to the Social Icons Block.

@allysonsouza
Copy link

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.

@paaljoachim
Copy link
Contributor Author

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:

Screen Shot 2021-03-01 at 23 14 29

@bomsn
Copy link

bomsn commented Oct 25, 2023

This is still an issue with widget blocks, there needs to be an option to open them in a new tab.

@HumanGeigerCounter
Copy link

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...

@HumanGeigerCounter
Copy link

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:

Screen Shot 2021-03-01 at 23 14 29

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Social Affects the Social Block - used to display Social Media accounts [Status] Blocked Used to indicate that a current effort isn't able to move forward [Type] Enhancement A suggestion for improvement.
Projects
None yet
10 participants