-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Icon: Add X social media icon #5589
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
Conversation
There was a problem hiding this 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
- Confirmed that the icon can be found via search with the following terms: “x”, “twitter”, “social”, “social media”
There was a problem hiding this 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
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.
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 namedx
. 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 likesocial-x
to disambiguate with something like aclose
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:
On the Footer page in the USWDS Storybook:
src="./img/usa-icons/x.svg"
In the
usa-icon
package:src/img/template/uswds-icon-template.sketch
file exists