Skip to content

Social Link: add missing 'width' and 'height' attributes#41373

Merged
Soean merged 1 commit intoWordPress:trunkfrom
merkys7:fix/social_link_size
Jul 29, 2022
Merged

Social Link: add missing 'width' and 'height' attributes#41373
Soean merged 1 commit intoWordPress:trunkfrom
merkys7:fix/social_link_size

Conversation

@merkys7
Copy link
Copy Markdown
Member

@merkys7 merkys7 commented May 26, 2022

What?

All SVG in social-link.php have "...<svg width="24" height="24" viewBox="0 0 24 24"..." but the last one named "Share Icon" have no fixed WIDTH and HEIGHT

Why?

No WIDTH and HEIGHT cause the large icon

How?

Adds missing WIDTH and HEIGHT options

Related: https://core.trac.wordpress.org/ticket/51120

Screenshots or screencast

@merkys7 merkys7 requested a review from ajitbohra as a code owner May 26, 2022 13:03
@github-actions
Copy link
Copy Markdown

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @merkys7! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label May 26, 2022
@amustaque97 amustaque97 self-requested a review May 28, 2022 14:31
@amustaque97 amustaque97 added [Block] Social Affects the Social Block - used to display Social Media accounts Needs Design Feedback Needs general design feedback. labels May 28, 2022
@amustaque97
Copy link
Copy Markdown
Member

@merkys7 thank you for working on this 👏🏻 . It would be great if you can add testing instructions.

@carolinan
Copy link
Copy Markdown
Contributor

I tried to test this but as far as I can tell, this icon is never used? When I add the block, I can not find an option to use it.
"Share" is not listed as a variation here: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/social-link/variations.js
What problems does the missing size cause?

@amustaque97
Copy link
Copy Markdown
Member

I tried to test this but as far as I can tell, this icon is never used? When I add the block, I can not find an option to use it. "Share" is not listed as a variation here: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/social-link/variations.js What problems does the missing size cause?

yes right, even I was not able to figure it out. That's why I asked the author for steps to reproduce.

@carolinan carolinan added the [Status] Needs More Info Follow-up required in order to be actionable. label Jul 8, 2022
@Soean
Copy link
Copy Markdown
Member

Soean commented Jul 29, 2022

It is used as a fallback, if there is no Icon for the service: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/social-link/index.php#L96

You can test it by editing the code like this:

<!-- wp:social-links -->
<ul class="wp-block-social-links"><!-- wp:social-link {"url":"https://wordpress.org/","service":"this-does-not-exist"} /--></ul>
<!-- /wp:social-links -->

Copy link
Copy Markdown
Member

@Soean Soean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no visible change, but I think it is good to be consistent here.

@Soean Soean merged commit f54350b into WordPress:trunk Jul 29, 2022
@Soean Soean removed [Status] Needs More Info Follow-up required in order to be actionable. Needs Design Feedback Needs general design feedback. labels Jul 29, 2022
@github-actions
Copy link
Copy Markdown

Congratulations on your first merged pull request, @merkys7! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts:

https://profiles.wordpress.org/me/profile/edit/

And if you don't have a WordPress.org account, you can create one on this page:

https://login.wordpress.org/register

Kudos!

@github-actions github-actions bot added this to the Gutenberg 13.9 milestone Jul 29, 2022
@oandregal oandregal changed the title Fix social-link block missing 'width' and 'height' attributes Social Link: add missing 'width' and 'height' attributes Aug 10, 2022
@desrosj
Copy link
Copy Markdown
Member

desrosj commented Oct 4, 2022

Just noting that this was also reported in Core Trac and linking.

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 First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants