Skip to content

Conversation

thisisdano
Copy link
Contributor

@thisisdano thisisdano commented Oct 30, 2023

Summary

Add X social media icon. We added the X social media icon, but also preserved the legacy Twitter icon to allow teams to make the decision on when to update their social media information.

X icon as part of the icon Storybook page

Breaking change

This is not a breaking change.

Related issue

Closes #5471

Related pull requests

Changelog PR: uswds/uswds-site#2329

Preview link

Icon Storybook page

Problem statement

The social media platform Twitter recently rebranded to X, and has a new logo. Teams that wish to update their social media icons to reflect this change have no way to use the X icon in the same way they used the Twitter icon.

Solution

This PR adds a X icon that conforms with the brand toolkit linked above. I've included this new icon while also maintaining the legacy Twitter icon so teams can be intentional about updating their social media account information. Just as the previous Twitter icon was named twitter, this new icon is named x. I wondered about how well a one-character name would work in our spritesheet, but it seems to work without issue. I considered renaming the icon something like social-x to disambiguate with something like a close icon, but decided that naming consistency with the other social icons was more important than solving for an issue (icon ambiguity) that we haven't actually observed.

This PR adds the new X icon to the USWDS icon set and to the default sprite.

It also adds an icon template in Sketch format so we're better able to manage icon source files going forward.

Testing and review

On the Icon page in the USWDS Storybook:

  1. Check to see that the X icon appears, in alphabetical order.
  2. Check to see that the legacy Twitter icon also exists.
  3. Check that the icon changes to white on highlight as expected.

On the Footer page in the USWDS Storybook:

  1. Update the twitter icon image src to src="./img/usa-icons/x.svg"
  2. Check that the X icon appears and looks about the same visual size as the legacy Twitter icon

In the usa-icon package:

  1. Check that the src/img/template/uswds-icon-template.sketch file exists

Copy link
Contributor

@amyleadem amyleadem left a comment

Choose a reason for hiding this comment

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

This is looking good to me.

I noticed that the footer component is still using the legacy Twitter icon. I'm assuming that this is intentional for this issue, but just wanted to confirm.

I tested the following:

  • Confirmed that the new X icon lives in the usa-icon directory
  • Confirmed that the Twitter icon still exists in the usa-icon directory
  • Confirmed that the X icon appears on the icon page
  • Confirmed the X icon changes to white on hover
  • Confirmed that gulp buildSprite builds a sprite with the X icon
  • Confirmed icon is approximately the same size as the Twitter icon
    • My design tools are limited, but this is what it looks like in comparison to other social media icons:
      image
    • This is what it looks like in contexts like the footer component:
      image
  • Confirmed that the icon can be found via search with the following terms: “x”, “twitter”, “social”, “social media”

Copy link
Contributor

@mahoneycm mahoneycm left a comment

Choose a reason for hiding this comment

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

Lgtm!

  • Icon displays as expected in icons story
  • Naming matches current convention
  • Icon displays appropriately when used as an image src
  • Sketch binary file is added with this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

USWDS - Feature: X/Twitter icon update
3 participants