-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 without a link are invisible #55543
Comments
May I work on fixing this issue during the Core Table at WordCamp Madrid Contributor's Day? |
@c4rl0sbr4v0 #55296 could also be an interesting one for Contributor Day. Also a Social Icons bug. |
To clarify the original issue description: the use case is previewing an unfinished site, when I'm in the middle of editing it. It's very confusing that some blocks are outright missing from the site preview. The final site is going to have icons with links, the issue will no longer be there. |
Could we add just a # so the user does not experience any navigation when clicking on it but still showing the icons? |
I think that a |
That's true. We can work on the PR and then wait for more feedback in case if needed. Using either the hashtag (#) or the canonical URL should not be a big change. |
Even though I initially was also confused, I'd argue that it makes sense not showing the icons if there is no link. Gutenberg has also a lot of other blocks that are invisible if they are not filled out, such as the pre- and suffix for categories and tags, the Read more link in excerpts or in general empty paragraphs and spaces. |
These are dynamic blocks though, where their content depends on whether there are categories or tags, whether the excerpt is short or long... On the other hand, a social icon is a completely static markup.
That's true, an Instagram social link is not only an ad for your Instagram profile, but also for the Instagram platform itself. It's unavoidable, but it happens no matter what is the default value for the |
remove the Don't render if no URL st now render icons whitout URL Co authors @tiniacoleyba @DanoValero
@jsnajdr is this issue resolved, or still lingering? |
@tomfinitely It's been discussed at various places over the last year, but it's still not resolved. |
Putting # as a URL gives me unexpected results in the href attribute; it becomes href="http://#/", which looks weird and is not valid. Please fix this. It is really useful to leave # as a URL because some marketplaces don't allow third-party links in themes (for example, TemplateMonster). |
This is a good point and I can trace back this behavior to @Mamaduka's #42167. The
|
Steps to reproduce:
Design your site's header in the Site Editor, and add a social icon to the header. Don't add your profile URL to that icon yet. In the editor, you see the social icon is there, aligned exactly how you need it etc.:
Now open the site preview in a new tab. The social icon is not there!
My first impression is that I'm very confused. I'm not sure if the edited content was saved properly etc. Only later I find out that social icons without an
url
are not rendered and am able to rationalize what I saw.The solution could be to assign default value to the
url
attribute. Every social network has an obvious "canonical" URL likehttps://instagram.com
. We could use it.Block patterns already use this "trick" -- on WordPress.com you can insert patterns like "header with social icons" and the markup has the
url
attributes populated. If they didn't do this, the inserted social icons wouldn't be visible.The text was updated successfully, but these errors were encountered: