Skip to content

Prioritise Mastodon over Twitter #4365

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: main
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
8 changes: 4 additions & 4 deletions frontend/src/components/blocks/socials-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export const SocialsSection = ({ hashtag, label }: Props) => {
hoverColor="green"
socials={[
{
icon: "twitter",
link: "https://twitter.com/pyconit",
icon: "mastodon",
link: "https://social.python.it/@pycon",
rel: "me",
},
{
Expand All @@ -48,8 +48,8 @@ export const SocialsSection = ({ hashtag, label }: Props) => {
rel: "me",
},
{
icon: "mastodon",
link: "https://social.python.it/@pycon",
icon: "twitter",
link: "https://twitter.com/pyconit",
rel: "me",
},
]}
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/cfp-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ export const CfpForm = ({
participantData.me.participant.website,
);
formState.setField(
"participantTwitterHandle",
participantData.me.participant.twitterHandle,
"participantMastodonHandle",
participantData.me.participant.mastodonHandle,
);
formState.setField(
"participantInstagramHandle",
Expand All @@ -258,8 +258,8 @@ export const CfpForm = ({
participantData.me.participant.facebookUrl,
);
formState.setField(
"participantMastodonHandle",
participantData.me.participant.mastodonHandle,
"participantTwitterHandle",
participantData.me.participant.twitterHandle,
);
formState.setField(
"speakerAvailabilities",
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/edit-profile-page-handler/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ const onMyProfileFetched = (data: MyEditProfileQuery, formState) => {
me.participant?.previousTalkVideo ?? "",
);
formState.setField(
"participantTwitterHandle",
me.participant?.twitterHandle ?? "",
"participantMastodonHandle",
me.participant?.mastodonHandle ?? "",
);
formState.setField(
"participantInstagramHandle",
Expand All @@ -85,8 +85,8 @@ const onMyProfileFetched = (data: MyEditProfileQuery, formState) => {
me.participant?.facebookUrl ?? "",
);
formState.setField(
"participantMastodonHandle",
me.participant?.mastodonHandle ?? "",
"participantTwitterHandle",
me.participant?.twitterHandle ?? "",
);
};

Expand Down
12 changes: 6 additions & 6 deletions frontend/src/components/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ export const Footer = () => {
</div>
}
socials={[
{ icon: "twitter", link: "https://twitter.com/pyconit", rel: "me" },
{
icon: "mastodon",
link: "https://social.python.it/@pycon",
rel: "me",
},
{
icon: "facebook",
link: "https://www.facebook.com/pythonitalia",
Expand All @@ -88,11 +92,7 @@ export const Footer = () => {
link: "https://www.linkedin.com/company/pycon-italia",
rel: "me",
},
{
icon: "mastodon",
link: "https://social.python.it/@pycon",
rel: "me",
},
{ icon: "twitter", link: "https://twitter.com/pyconit", rel: "me" },
]}
/>
</>
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/grant-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ export const GrantForm = ({
participantData.me.participant.website,
);
formState.setField(
"participantTwitterHandle",
participantData.me.participant.twitterHandle,
"participantMastodonHandle",
participantData.me.participant.mastodonHandle,
);
formState.setField(
"participantInstagramHandle",
Expand All @@ -236,8 +236,8 @@ export const GrantForm = ({
participantData.me.participant.facebookUrl,
);
formState.setField(
"participantMastodonHandle",
participantData.me.participant.mastodonHandle,
"participantTwitterHandle",
participantData.me.participant.twitterHandle,
);
}
}, []);
Expand Down
24 changes: 12 additions & 12 deletions frontend/src/components/participant-info-section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ export const ParticipantInfoSection = ({
justifyContent="end"
gap="medium"
>
{participant?.twitterHandle && (
{participant?.mastodonHandle && (
<Link
target="_blank"
href={`https://twitter.com/${participant.twitterHandle}`}
href={convertMastodonHandle(participant.mastodonHandle)}
>
<TwitterIcon className="w-6 h-6" />
<MastodonIcon className="w-6 h-6" />
</Link>
)}

Expand All @@ -76,15 +76,6 @@ export const ParticipantInfoSection = ({
</Link>
)}

{participant?.mastodonHandle && (
<Link
target="_blank"
href={convertMastodonHandle(participant.mastodonHandle)}
>
<MastodonIcon className="w-6 h-6" />
</Link>
)}

{participant?.linkedinUrl && (
<Link target="_blank" href={participant.linkedinUrl}>
<LinkedinIcon className="w-6 h-6" />
Expand All @@ -102,6 +93,15 @@ export const ParticipantInfoSection = ({
<WebIcon className="w-6 h-6" />
</Link>
)}

{participant?.twitterHandle && (
<Link
target="_blank"
href={`https://twitter.com/${participant.twitterHandle}`}
>
<TwitterIcon className="w-6 h-6" />
</Link>
)}
</HorizontalStack>
</VerticalStack>
</LayoutContent>
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/components/public-profile-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,6 @@ export const PublicProfileCard = <T extends ParticipantFormFields>({
errors={getParticipantValidationError("website")}
/>
</InputWrapper>
<InputWrapper title="Twitter">
<Input
{...text("participantTwitterHandle")}
required={false}
maxLength={15}
placeholder={inputPlaceholder}
errors={getParticipantValidationError("twitterHandle")}
/>
</InputWrapper>
<InputWrapper title="Mastodon">
<Input
{...text("participantMastodonHandle")}
Expand Down Expand Up @@ -163,6 +154,15 @@ export const PublicProfileCard = <T extends ParticipantFormFields>({
errors={getParticipantValidationError("facebookUrl")}
/>
</InputWrapper>
<InputWrapper title="Twitter">
<Input
{...text("participantTwitterHandle")}
required={false}
maxLength={15}
placeholder={inputPlaceholder}
errors={getParticipantValidationError("twitterHandle")}
/>
</InputWrapper>
</Grid>
</CardPart>
</MultiplePartsCard>
Expand Down