Skip to content

feat: Change Twitter to X #1186

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/profile/ProfilePage.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ describe('<ProfilePage />', () => {
courseCertificates: ['course certificates'],
levelOfEducation: 'some level',
languageProficiencies: ['some lang'],
socialLinks: ['twitter'],
socialLinks: ['x'],
timeZone: 'time zone',
accountPrivacy: 'all_users',
},
Expand Down
8 changes: 4 additions & 4 deletions src/profile/__mocks__/savingEditedBio.mockStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ module.exports = {
socialLink: 'https://www.facebook.com/aloha'
},
{
platform: 'twitter',
socialLink: 'https://www.twitter.com/ALOHA'
platform: 'x',
socialLink: 'https://www.x.com/ALOHA'
}
],
profileImage: {
Expand Down Expand Up @@ -85,8 +85,8 @@ module.exports = {
socialLink: 'https://www.facebook.com/aloha'
},
{
platform: 'twitter',
socialLink: 'https://www.twitter.com/ALOHA'
platform: 'x',
socialLink: 'https://www.x.com/ALOHA'
}
],
timeZone: null,
Expand Down
4 changes: 2 additions & 2 deletions src/profile/__mocks__/viewOtherProfile.mockStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ module.exports = {
socialLink: 'https://www.facebook.com/aloha'
},
{
platform: 'twitter',
socialLink: 'https://www.twitter.com/ALOHA'
platform: 'x',
socialLink: 'https://www.x.com/ALOHA'
}
],
profileImage: {
Expand Down
8 changes: 4 additions & 4 deletions src/profile/__mocks__/viewOwnProfile.mockStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ module.exports = {
socialLink: 'https://www.facebook.com/aloha'
},
{
platform: 'twitter',
socialLink: 'https://www.twitter.com/ALOHA'
platform: 'x',
socialLink: 'https://www.x.com/ALOHA'
}
],
profileImage: {
Expand Down Expand Up @@ -85,8 +85,8 @@ module.exports = {
socialLink: 'https://www.facebook.com/aloha'
},
{
platform: 'twitter',
socialLink: 'https://www.twitter.com/ALOHA'
platform: 'x',
socialLink: 'https://www.x.com/ALOHA'
}
],
timeZone: null,
Expand Down
226 changes: 112 additions & 114 deletions src/profile/__snapshots__/ProfilePage.test.jsx.snap

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/profile/data/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const SOCIAL = {
linkedin: {
title: 'LinkedIn',
},
twitter: {
title: 'Twitter',
x: {
title: 'X',
},
facebook: {
title: 'Facebook',
Expand Down
2 changes: 1 addition & 1 deletion src/profile/data/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const formSocialLinksSelector = createSelector(
socialLinksByPlatformSelector,
draftSocialLinksByPlatformSelector,
(linksByPlatform, draftLinksByPlatform) => {
const knownPlatforms = ['twitter', 'facebook', 'linkedin'];
const knownPlatforms = ['x', 'facebook', 'linkedin'];
const socialLinks = [];
// For each known platform
knownPlatforms.forEach((platform) => {
Expand Down
12 changes: 6 additions & 6 deletions src/profile/forms/SocialLinks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { Alert } from '@openedx/paragon';
import { connect } from 'react-redux';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTwitter, faFacebook, faLinkedin } from '@fortawesome/free-brands-svg-icons';
import { faXTwitter, faFacebook, faLinkedin } from '@fortawesome/free-brands-svg-icons';
import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import classNames from 'classnames';

Expand All @@ -23,9 +23,9 @@ const platformDisplayInfo = {
icon: faFacebook,
name: 'Facebook',
},
twitter: {
icon: faTwitter,
name: 'Twitter',
x: {
icon: faXTwitter,
name: 'X (Twitter)',
},
linkedin: {
icon: faLinkedin,
Expand Down Expand Up @@ -108,7 +108,7 @@ const EmptyListItem = ({ onClick, name }) => (
values={{
network: name,
}}
description="{network} is the name of a social network such as Facebook or Twitter"
description="{network} is the name of a social network such as Facebook or X"
/>
</EmptyContent>
</li>
Expand Down Expand Up @@ -181,7 +181,7 @@ class SocialLinks extends React.Component {
}

mergeWithDrafts(newSocialLink) {
const knownPlatforms = ['twitter', 'facebook', 'linkedin'];
const knownPlatforms = ['x', 'facebook', 'linkedin'];
const updated = [];
knownPlatforms.forEach((platform) => {
if (newSocialLink.platform === platform) {
Expand Down
4 changes: 2 additions & 2 deletions src/profile/forms/SocialLinks.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const defaultProps = {
socialLink: 'https://www.facebook.com/aloha',
},
{
platform: 'twitter',
socialLink: 'https://www.twitter.com/ALOHA',
platform: 'x',
socialLink: 'https://www.x.com/ALOHA',
},
],
drafts: {},
Expand Down
46 changes: 23 additions & 23 deletions src/profile/forms/__snapshots__/SocialLinks.test.jsx.snap

Large diffs are not rendered by default.

Loading