Skip to content

Commit 3880d81

Browse files
committed
feat: Change Twitter to X
1 parent 60d9602 commit 3880d81

File tree

10 files changed

+157
-159
lines changed

10 files changed

+157
-159
lines changed

src/profile/ProfilePage.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ describe('<ProfilePage />', () => {
168168
courseCertificates: ['course certificates'],
169169
levelOfEducation: 'some level',
170170
languageProficiencies: ['some lang'],
171-
socialLinks: ['twitter'],
171+
socialLinks: ['xTwitter'],
172172
timeZone: 'time zone',
173173
accountPrivacy: 'all_users',
174174
},

src/profile/__mocks__/savingEditedBio.mockStore.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ module.exports = {
1313
socialLink: 'https://www.facebook.com/aloha'
1414
},
1515
{
16-
platform: 'twitter',
17-
socialLink: 'https://www.twitter.com/ALOHA'
16+
platform: 'xTwitter',
17+
socialLink: 'https://www.x.com/ALOHA'
1818
}
1919
],
2020
profileImage: {
@@ -85,8 +85,8 @@ module.exports = {
8585
socialLink: 'https://www.facebook.com/aloha'
8686
},
8787
{
88-
platform: 'twitter',
89-
socialLink: 'https://www.twitter.com/ALOHA'
88+
platform: 'xTwitter',
89+
socialLink: 'https://www.x.com/ALOHA'
9090
}
9191
],
9292
timeZone: null,

src/profile/__mocks__/viewOtherProfile.mockStore.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ module.exports = {
1313
socialLink: 'https://www.facebook.com/aloha'
1414
},
1515
{
16-
platform: 'twitter',
17-
socialLink: 'https://www.twitter.com/ALOHA'
16+
platform: 'xTwitter',
17+
socialLink: 'https://www.x.com/ALOHA'
1818
}
1919
],
2020
profileImage: {

src/profile/__mocks__/viewOwnProfile.mockStore.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ module.exports = {
1313
socialLink: 'https://www.facebook.com/aloha'
1414
},
1515
{
16-
platform: 'twitter',
17-
socialLink: 'https://www.twitter.com/ALOHA'
16+
platform: 'xTwitter',
17+
socialLink: 'https://www.x.com/ALOHA'
1818
}
1919
],
2020
profileImage: {
@@ -85,8 +85,8 @@ module.exports = {
8585
socialLink: 'https://www.facebook.com/aloha'
8686
},
8787
{
88-
platform: 'twitter',
89-
socialLink: 'https://www.twitter.com/ALOHA'
88+
platform: 'xTwitter',
89+
socialLink: 'https://www.x.com/ALOHA'
9090
}
9191
],
9292
timeZone: null,

src/profile/__snapshots__/ProfilePage.test.jsx.snap

Lines changed: 112 additions & 114 deletions
Large diffs are not rendered by default.

src/profile/data/constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ const SOCIAL = {
1414
linkedin: {
1515
title: 'LinkedIn',
1616
},
17-
twitter: {
18-
title: 'Twitter',
17+
xTwitter: {
18+
title: 'X',
1919
},
2020
facebook: {
2121
title: 'Facebook',

src/profile/data/selectors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export const formSocialLinksSelector = createSelector(
201201
socialLinksByPlatformSelector,
202202
draftSocialLinksByPlatformSelector,
203203
(linksByPlatform, draftLinksByPlatform) => {
204-
const knownPlatforms = ['twitter', 'facebook', 'linkedin'];
204+
const knownPlatforms = ['xTwitter', 'facebook', 'linkedin'];
205205
const socialLinks = [];
206206
// For each known platform
207207
knownPlatforms.forEach((platform) => {

src/profile/forms/SocialLinks.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
33
import { Alert } from '@openedx/paragon';
44
import { connect } from 'react-redux';
55
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
6-
import { faTwitter, faFacebook, faLinkedin } from '@fortawesome/free-brands-svg-icons';
6+
import { faXTwitter, faFacebook, faLinkedin } from '@fortawesome/free-brands-svg-icons';
77
import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n';
88
import classNames from 'classnames';
99

@@ -23,9 +23,9 @@ const platformDisplayInfo = {
2323
icon: faFacebook,
2424
name: 'Facebook',
2525
},
26-
twitter: {
27-
icon: faTwitter,
28-
name: 'Twitter',
26+
xTwitter: {
27+
icon: faXTwitter,
28+
name: 'X (Twitter)',
2929
},
3030
linkedin: {
3131
icon: faLinkedin,
@@ -108,7 +108,7 @@ const EmptyListItem = ({ onClick, name }) => (
108108
values={{
109109
network: name,
110110
}}
111-
description="{network} is the name of a social network such as Facebook or Twitter"
111+
description="{network} is the name of a social network such as Facebook or X"
112112
/>
113113
</EmptyContent>
114114
</li>
@@ -181,7 +181,7 @@ class SocialLinks extends React.Component {
181181
}
182182

183183
mergeWithDrafts(newSocialLink) {
184-
const knownPlatforms = ['twitter', 'facebook', 'linkedin'];
184+
const knownPlatforms = ['xTwitter', 'facebook', 'linkedin'];
185185
const updated = [];
186186
knownPlatforms.forEach((platform) => {
187187
if (newSocialLink.platform === platform) {

src/profile/forms/SocialLinks.test.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ const defaultProps = {
2222
socialLink: 'https://www.facebook.com/aloha',
2323
},
2424
{
25-
platform: 'twitter',
26-
socialLink: 'https://www.twitter.com/ALOHA',
25+
platform: 'xTwitter',
26+
socialLink: 'https://www.x.com/ALOHA',
2727
},
2828
],
2929
drafts: {},

src/profile/forms/__snapshots__/SocialLinks.test.jsx.snap

Lines changed: 23 additions & 23 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)