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 Links: add Threads Icon #52685

Merged
merged 7 commits into from
Jul 27, 2023
Merged

Conversation

jeherve
Copy link
Contributor

@jeherve jeherve commented Jul 17, 2023

Fixes #52463

What?

This introduces a new Social Link icon, for the Threads app.

Why?

Threads was released very recently but has quickly become very popular. Site owners will want to link to their Threads profiles in the future, so it makes sense to have it as an option with the Social Links block.

How?

This adds the new icon and service, as well as tests.

Testing Instructions

  1. Go to Posts > Add New
  2. Add the Social Links block
  3. Within the block, add a new Threads block
  4. Publish your post
  5. View on the frontend.

Testing Instructions for Keyboard

Same as above, this behavior does not change in this PR.

Screenshots or screencast

Editor

Screenshot 2023-07-17 at 14 27 29

Frontend, when a label is added for the icon

Screenshot 2023-07-17 at 14 37 29

@jeherve jeherve requested a review from ajitbohra as a code owner July 17, 2023 12:46
@t-hamano
Copy link
Contributor

Thanks for the PR! I mistakenly assumed in this comment that it was the addition of a new oEmbed provider, but it would make sense if it was an addition to the social links 😅

I think this PR is working well, but I have two confirmations:

  • The icon appears to be slightly to the left. Where did you get this SVG from?
  • The color value is #1c1e21, how was this determined? From the App page, the color value seems to be #000.

threads

ccing @jasmussen @richtabor Because I think we need design feedback 🙇

@apeatling apeatling added Needs Design Feedback Needs general design feedback. [Block] Social Affects the Social Block - used to display Social Media accounts labels Jul 24, 2023
@jeherve
Copy link
Contributor Author

jeherve commented Jul 25, 2023

The icon appears to be slightly to the left. Where did you get this SVG from?

I took it from this resource:
https://en.wikipedia.org/wiki/File:Threads_(app)_logo.svg

The color value is #1c1e21, how was this determined?

I took it from https://www.threads.net/ , since I could not find a brand guidelines document. I've now updated it to #000 as per your recommendation.

@jasmussen
Copy link
Contributor

jasmussen commented Jul 25, 2023

Thanks for the ping. Yep, social icons should be around 18x18 inside a 24x24 square:

Screenshot 2023-07-25 at 11 33 38

Here's a new threads SVG that does that, and is optimized:

<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 24 24" viewBox="0 0 24 24"><path d="M16.3 11.3c-.1 0-.2-.1-.2-.1-.1-2.6-1.5-4-3.9-4-1.4 0-2.6.6-3.3 1.7l1.3.9c.5-.8 1.4-1 2-1 .8 0 1.4.2 1.7.7.3.3.5.8.5 1.3-.7-.1-1.4-.2-2.2-.1-2.2.1-3.7 1.4-3.6 3.2 0 .9.5 1.7 1.3 2.2.7.4 1.5.6 2.4.6 1.2-.1 2.1-.5 2.7-1.3.5-.6.8-1.4.9-2.4.6.3 1 .8 1.2 1.3.4.9.4 2.4-.8 3.6-1.1 1.1-2.3 1.5-4.3 1.5-2.1 0-3.8-.7-4.8-2S5.7 14.3 5.7 12c0-2.3.5-4.1 1.5-5.4 1.1-1.3 2.7-2 4.8-2 2.2 0 3.8.7 4.9 2 .5.7.9 1.5 1.2 2.5l1.5-.4c-.3-1.2-.8-2.2-1.5-3.1-1.3-1.7-3.3-2.6-6-2.6-2.6 0-4.7.9-6 2.6C4.9 7.2 4.3 9.3 4.3 12s.6 4.8 1.9 6.4c1.4 1.7 3.4 2.6 6 2.6 2.3 0 4-.6 5.3-2 1.8-1.8 1.7-4 1.1-5.4-.4-.9-1.2-1.7-2.3-2.3zm-4 3.8c-1 .1-2-.4-2-1.3 0-.7.5-1.5 2.1-1.6h.5c.6 0 1.1.1 1.6.2-.2 2.3-1.3 2.7-2.2 2.7z" style="fill:#010101"/></svg>
Screenshot 2023-07-25 at 11 35 13

I'm personally of the opinion that we should not add new icons, including this, and that instead of adding icons we should build an extension architeture so plugins can add these, mainly so we avoid being arbiters of what icons go in vs. what icons are left out. It's even a pain to keep up with re-brandings, i.e. do we keep the Twitter logo now?

That's not a blocking opinion, though, but someone else will need to give a green light.

@t-hamano
Copy link
Contributor

Thanks for the advice, @jasmussen!

I agree with you on the implementation of the architecture to add new icons. It seems that there are already two PRs listed that do just that.

However, I personally think it is a good idea to add this icon to make it easier to add more current and well-known icons without having to write code or install a plugin.

jeherve and others added 2 commits July 25, 2023 17:11
See WordPress#52685 (comment)

Co-authored-by: Joen A <1204802+jasmussen@users.noreply.github.com>
@jeherve
Copy link
Contributor Author

jeherve commented Jul 25, 2023

Here's a new threads SVG that does that, and is optimized:

Thanks, I pushed 4fb637a with your suggestion:

Screenshot 2023-07-25 at 17 10 39

@richtabor
Copy link
Member

Pushed a tiny commit to fix the front-end:

CleanShot 2023-07-25 at 12 51 06

Now here's what we get:

CleanShot 2023-07-25 at 12 57 50

@richtabor
Copy link
Member

However, I personally think it is a good idea to add this icon to make it easier to add more current and well-known icons without having to write code or install a plugin.

I agree, I think it's fine for the bigger social platforms.

I'm personally of the opinion that we should not add new icons, including this, and that instead of adding icons we should build an extension architeture so plugins can add these

I think it'd be nice for sure, but I don't think it should block this.

@richtabor richtabor self-requested a review July 25, 2023 17:01
Copy link
Member

@richtabor richtabor left a comment

Choose a reason for hiding this comment

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

Pending passing tests this looks good to me.

@t-hamano
Copy link
Contributor

Thanks for the design feedback, @jasmussen, @richtabor! it looks good to me, both design and code, and I would like to merge it.

@jeherve
Thanks for the contribution!

@t-hamano t-hamano merged commit b0dbcf8 into WordPress:trunk Jul 27, 2023
@github-actions github-actions bot added this to the Gutenberg 16.4 milestone Jul 27, 2023
@jeherve jeherve deleted the add/threads-icon branch July 27, 2023 12:27
@mikachan mikachan added the [Type] Enhancement A suggestion for improvement. label Aug 1, 2023
@mtias
Copy link
Member

mtias commented Aug 10, 2023

I'm fine with core maintaining social icons given our current ability to replace them dynamically. It provides a consistent affordance and reliability to users, pattern, and theme builders.

@femkreations femkreations added the Needs User Documentation Needs new user documentation label Sep 28, 2023
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 Needs Design Feedback Needs general design feedback. Needs User Documentation Needs new user documentation [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Social Links Block: add support for Threads
8 participants