Skip to content

Commit 16de1d6

Browse files
authored
feat: Change Twitter to X (#1186)
1 parent f04aaa0 commit 16de1d6

File tree

10 files changed

+386
-124
lines changed

10 files changed

+386
-124
lines changed

package-lock.json

Lines changed: 359 additions & 97 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/profile/ProfilePage.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ describe('<ProfilePage />', () => {
158158
courseCertificates: [{ title: 'Course 1' }],
159159
levelOfEducation: 'bachelors',
160160
languageProficiencies: [{ code: 'en' }],
161-
socialLinks: [{ platform: 'twitter', socialLink: 'https://twitter.com/user' }],
161+
socialLinks: [{ platform: 'x', socialLink: 'https://x.com/user' }],
162162
},
163163
preferences: {
164164
...storeMocks.viewOtherProfile.profilePage.preferences,

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: 'x',
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: 'x',
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: 'x',
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: 'x',
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: 'x',
89+
socialLink: 'https://www.x.com/ALOHA'
9090
}
9191
],
9292
timeZone: null,

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing other profi
504504
class="h5 font-weight-bold m-0 pb-1.5"
505505
data-hj-suppress="true"
506506
>
507-
X
507+
X (Twitter)
508508
</p>
509509
<div
510510
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
@@ -515,7 +515,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing other profi
515515
<h4
516516
class="edit-section-header text-gray-700"
517517
>
518-
https://twitter.com/user
518+
https://x.com/user
519519
</h4>
520520
</div>
521521
<div
@@ -1169,7 +1169,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
11691169
class="h5 font-weight-bold m-0 pb-1.5"
11701170
data-hj-suppress="true"
11711171
>
1172-
X
1172+
X (Twitter)
11731173
</p>
11741174
<div
11751175
class="w-100 overflowWrap-breakWord"
@@ -1183,7 +1183,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
11831183
<h4
11841184
class="edit-section-header text-gray-700"
11851185
>
1186-
https://www.twitter.com/ALOHA
1186+
https://www.x.com/ALOHA
11871187
</h4>
11881188
</div>
11891189
<div
@@ -2085,7 +2085,7 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
20852085
class="h5 font-weight-bold m-0 pb-1.5"
20862086
data-hj-suppress="true"
20872087
>
2088-
X
2088+
X (Twitter)
20892089
</p>
20902090
<div
20912091
class="w-100 overflowWrap-breakWord"
@@ -2099,7 +2099,7 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
20992099
<h4
21002100
class="edit-section-header text-gray-700"
21012101
>
2102-
https://www.twitter.com/ALOHA
2102+
https://www.x.com/ALOHA
21032103
</h4>
21042104
</div>
21052105
<div

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+
x: {
18+
title: 'X',
1919
},
2020
facebook: {
2121
title: 'Facebook',

src/profile/data/reducers.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('profilePage reducer', () => {
3232
bio: 'Software Engineer',
3333
country: 'US',
3434
levelOfEducation: 'bachelors',
35-
socialLinks: [{ platform: 'twitter', link: 'twitter.com/johndoe' }],
35+
socialLinks: [{ platform: 'x', link: 'x.com/johndoe' }],
3636
languageProficiencies: [{ code: 'en', name: 'English' }],
3737
profileImage: { url: 'profile.jpg' },
3838
yearOfBirth: 1990,

src/profile/data/selectors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export const formSocialLinksSelector = createSelector(
187187
socialLinksByPlatformSelector,
188188
draftSocialLinksByPlatformSelector,
189189
(linksByPlatform, draftLinksByPlatform) => {
190-
const knownPlatforms = ['twitter', 'facebook', 'linkedin'];
190+
const knownPlatforms = ['x', 'facebook', 'linkedin'];
191191
const socialLinks = [];
192192
knownPlatforms.forEach((platform) => {
193193
if (draftLinksByPlatform[platform] !== undefined) {

src/profile/forms/SocialLinks.jsx

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

@@ -19,9 +19,9 @@ const platformDisplayInfo = {
1919
icon: faFacebook,
2020
name: 'Facebook',
2121
},
22-
twitter: {
23-
icon: faTwitter,
24-
name: 'X',
22+
x: {
23+
icon: faXTwitter,
24+
name: 'X (Twitter)',
2525
},
2626
linkedin: {
2727
icon: faLinkedin,
@@ -46,7 +46,7 @@ const SocialLinks = ({
4646
const [activePlatform, setActivePlatform] = useState(null);
4747

4848
const mergeWithDrafts = (newSocialLink) => {
49-
const knownPlatforms = ['twitter', 'facebook', 'linkedin'];
49+
const knownPlatforms = ['x', 'facebook', 'linkedin'];
5050
const updated = [];
5151
knownPlatforms.forEach((platform) => {
5252
if (newSocialLink.platform === platform) {
@@ -164,7 +164,7 @@ const SocialLinks = ({
164164
values={{
165165
network: platformDisplayInfo[platform].name,
166166
}}
167-
description="{network} is the name of a social network such as Facebook or Twitter"
167+
description="{network} is the name of a social network such as Facebook or X"
168168
/>
169169
</EmptyContent>
170170
</div>

0 commit comments

Comments
 (0)