From 9136f8e4088cded40c0c3d80c49bf346b4d29322 Mon Sep 17 00:00:00 2001 From: Manabu Matsumoto Date: Tue, 21 Mar 2023 17:17:42 +0900 Subject: [PATCH] fix(UI): give the spacer a few standard sizes (#49723) Co-authored-by: Muhammed Mustafa --- .../client-only-routes/show-certification.tsx | 14 +++++----- .../client-only-routes/show-project-links.tsx | 4 +-- .../src/client-only-routes/show-settings.tsx | 18 ++++++------- .../client-only-routes/show-unsubscribed.tsx | 6 ++--- client/src/client-only-routes/show-user.tsx | 10 +++---- .../src/components/Donation/donate-form.tsx | 2 +- .../components/Donation/donation-modal.tsx | 4 +-- client/src/components/FourOhFour/index.tsx | 8 +++--- .../Intro/components/intro-description.tsx | 2 +- client/src/components/Intro/index.tsx | 18 ++++++------- client/src/components/Map/index.tsx | 2 +- client/src/components/helpers/spacer.tsx | 14 +++++++--- .../landing/components/certifications.tsx | 4 +-- .../landing/components/landing-top.tsx | 6 ++--- .../profile/components/certifications.tsx | 4 +-- .../profile/components/heat-map.tsx | 4 +-- client/src/components/profile/profile.tsx | 12 ++++----- client/src/components/settings/about.tsx | 4 +-- .../src/components/settings/certification.js | 6 ++--- .../src/components/settings/danger-zone.tsx | 6 ++--- .../src/components/settings/delete-modal.tsx | 2 +- client/src/components/settings/email.tsx | 2 +- client/src/components/settings/portfolio.tsx | 10 +++---- client/src/components/settings/privacy.tsx | 2 +- .../src/components/settings/reset-modal.tsx | 2 +- client/src/components/settings/sound.tsx | 2 +- .../components/settings/toggle-setting.tsx | 2 +- client/src/components/settings/user-token.tsx | 6 ++--- client/src/components/signout-modal/index.tsx | 2 +- client/src/pages/blocked.tsx | 6 ++--- client/src/pages/donate.tsx | 10 +++---- client/src/pages/email-sign-up.tsx | 16 ++++++------ client/src/pages/learn.tsx | 2 +- client/src/pages/update-email.tsx | 2 +- .../templates/Challenges/codeally/show.tsx | 26 +++++++++---------- client/src/templates/Challenges/odin/show.tsx | 16 ++++++------ .../Challenges/projects/backend/show.tsx | 4 +-- .../Challenges/projects/frontend/show.tsx | 4 +-- .../src/templates/Challenges/video/show.tsx | 10 +++---- .../Introduction/components/block.tsx | 2 +- .../components/super-block-intro.tsx | 4 +-- client/src/templates/Introduction/intro.tsx | 4 +-- .../Introduction/super-block-intro.tsx | 14 +++++----- 43 files changed, 153 insertions(+), 145 deletions(-) diff --git a/client/src/client-only-routes/show-certification.tsx b/client/src/client-only-routes/show-certification.tsx index 541199ecc14..0acc5406e33 100644 --- a/client/src/client-only-routes/show-certification.tsx +++ b/client/src/client-only-routes/show-certification.tsx @@ -240,7 +240,7 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => { const donationSection = (
- + {!isDonationSubmitted && ( @@ -263,7 +263,7 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => { {isDonationSubmitted && donationCloseBtn} - +
); @@ -281,7 +281,7 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => { > {t('profile.add-linkedin')} - + - + ); @@ -365,11 +365,11 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => {
- + {signedInUserName === username ? shareCertBtns : ''} - + - +
); diff --git a/client/src/client-only-routes/show-project-links.tsx b/client/src/client-only-routes/show-project-links.tsx index 7f96f8f9a9d..012dbe92fcb 100644 --- a/client/src/client-only-routes/show-project-links.tsx +++ b/client/src/client-only-routes/show-project-links.tsx @@ -160,7 +160,7 @@ const ShowProjectLinks = (props: ShowProjectLinksProps): JSX.Element => { : 'certification.project.heading', { user: name } )} - + @@ -170,7 +170,7 @@ const ShowProjectLinks = (props: ShowProjectLinksProps): JSX.Element => { {renderProjectsFor(certName)}
- +
- +

{t('settings.for', { username: username })}

@@ -180,16 +180,16 @@ export function ShowSettings(props: ShowSettingsProps): JSX.Element { toggleKeyboardShortcuts={toggleKeyboardShortcuts} username={username} /> - + - + - + - + {/* @ts-expect-error Portfolio types mismatch */} - + - + {userToken && ( <> - + )} - +
diff --git a/client/src/client-only-routes/show-unsubscribed.tsx b/client/src/client-only-routes/show-unsubscribed.tsx index ff809f2174e..fc701d47ebf 100644 --- a/client/src/client-only-routes/show-unsubscribed.tsx +++ b/client/src/client-only-routes/show-unsubscribed.tsx @@ -23,9 +23,9 @@ function ShowUnsubscribed({
- + - +

{t('misc.unsubscribed')}

{t('misc.keep-coding')}

@@ -42,7 +42,7 @@ function ShowUnsubscribed({
) : null} - +
diff --git a/client/src/client-only-routes/show-user.tsx b/client/src/client-only-routes/show-user.tsx index 7714c6712f2..efc15a22d54 100644 --- a/client/src/client-only-routes/show-user.tsx +++ b/client/src/client-only-routes/show-user.tsx @@ -83,7 +83,7 @@ function ShowUser({ return (
- + @@ -91,11 +91,11 @@ function ShowUser({ - + {t('buttons.click-here')} - + @@ -108,7 +108,7 @@ function ShowUser({ {t('report.portfolio')} | freeCodeCamp.org - +

{t('report.portfolio-2', { username: username })}

@@ -135,7 +135,7 @@ function ShowUser({ - +
diff --git a/client/src/components/Donation/donate-form.tsx b/client/src/components/Donation/donate-form.tsx index bfbfc48ed41..9984f55cbc5 100644 --- a/client/src/components/Donation/donate-form.tsx +++ b/client/src/components/Donation/donate-form.tsx @@ -273,7 +273,7 @@ class DonateForm extends Component { {this.getDonationButtonLabel()}: - +
diff --git a/client/src/components/Donation/donation-modal.tsx b/client/src/components/Donation/donation-modal.tsx index 73e2bc3ce9f..ad6e32efb94 100644 --- a/client/src/components/Donation/donation-modal.tsx +++ b/client/src/components/Donation/donation-modal.tsx @@ -134,7 +134,7 @@ function DonateModal({ > {donationText} - + - + - + { /> - +
diff --git a/client/src/components/profile/profile.tsx b/client/src/components/profile/profile.tsx index bf4352078ed..ec68412886b 100644 --- a/client/src/components/profile/profile.tsx +++ b/client/src/components/profile/profile.tsx @@ -29,7 +29,7 @@ function renderMessage(

{t('profile.you-change-privacy')}

- + ) : ( <> @@ -43,7 +43,7 @@ function renderMessage( {t('profile.username-change-privacy', { username: username })}

- + ); } @@ -103,7 +103,7 @@ function renderProfile(user: ProfileProps['user']): JSX.Element { {showTimeLine ? ( ) : null} - + ); } @@ -120,9 +120,9 @@ function Profile({ user, isSessionUser }: ProfileProps): JSX.Element { {t('buttons.profile')} | freeCodeCamp.org - + - + {isLocked ? renderMessage(isSessionUser, username, t) : null} {!isLocked || isSessionUser ? renderProfile(user) : null} {isSessionUser ? null : ( @@ -132,7 +132,7 @@ function Profile({ user, isSessionUser }: ProfileProps): JSX.Element { )} - + ); diff --git a/client/src/components/settings/about.tsx b/client/src/components/settings/about.tsx index 8b147491621..215071ced9d 100644 --- a/client/src/components/settings/about.tsx +++ b/client/src/components/settings/about.tsx @@ -208,7 +208,7 @@ class AboutSettings extends Component { return ( <> - + {t('settings.headings.personal-info')}
@@ -271,7 +271,7 @@ class AboutSettings extends Component {
- + - +

{t(`certification.title.${certName}`, certName)}

@@ -345,7 +345,7 @@ export class CertificationSettings extends Component { }; return ( - +

{t('certification.title.Legacy Full Stack Certification')}

@@ -403,7 +403,7 @@ export class CertificationSettings extends Component { )}
- + ); }; diff --git a/client/src/components/settings/danger-zone.tsx b/client/src/components/settings/danger-zone.tsx index 5e8a86bb12f..5f7cef2f4b5 100644 --- a/client/src/components/settings/danger-zone.tsx +++ b/client/src/components/settings/danger-zone.tsx @@ -45,7 +45,7 @@ function DangerZone({ deleteAccount, resetProgress, t }: DangerZoneProps) { {t('settings.danger.heading')} - +

{t('settings.danger.be-careful')}

- + - +
diff --git a/client/src/components/settings/delete-modal.tsx b/client/src/components/settings/delete-modal.tsx index 07128525c2c..7c166347045 100644 --- a/client/src/components/settings/delete-modal.tsx +++ b/client/src/components/settings/delete-modal.tsx @@ -52,7 +52,7 @@ function DeleteModal(props: DeleteModalProps): JSX.Element { > {t('settings.danger.nevermind')} - +
- + {portfolio.length ? portfolio.map(this.renderPortfolio) : null} ); diff --git a/client/src/components/settings/privacy.tsx b/client/src/components/settings/privacy.tsx index 8f2d89fb18a..a83462f4de3 100644 --- a/client/src/components/settings/privacy.tsx +++ b/client/src/components/settings/privacy.tsx @@ -161,7 +161,7 @@ function PrivacySettings({ - +

{t('settings.data')}

- + - +
diff --git a/client/src/components/signout-modal/index.tsx b/client/src/components/signout-modal/index.tsx index b9c95f03c65..abad3be8ab0 100644 --- a/client/src/components/signout-modal/index.tsx +++ b/client/src/components/signout-modal/index.tsx @@ -79,7 +79,7 @@ function SignoutModal(props: SignoutModalProps): JSX.Element { > {t('signout.nevermind')} - + - + - +
); } else { return ( - + - + ); } @@ -139,7 +139,7 @@ function AcceptPrivacyTerms({ - +
@@ -147,13 +147,13 @@ function AcceptPrivacyTerms({ {t('misc.quincy')} - +

{t('misc.email-blast')}

- + {renderEmailListOptin(isSignedIn, showLoading)} - +
diff --git a/client/src/pages/learn.tsx b/client/src/pages/learn.tsx index 172933a5ca3..65e7b3e5c02 100644 --- a/client/src/pages/learn.tsx +++ b/client/src/pages/learn.tsx @@ -106,7 +106,7 @@ function LearnPage({ isDonating={isDonating} /> - + diff --git a/client/src/pages/update-email.tsx b/client/src/pages/update-email.tsx index 6159dcb904e..6441f5a7cea 100644 --- a/client/src/pages/update-email.tsx +++ b/client/src/pages/update-email.tsx @@ -71,7 +71,7 @@ function UpdateEmail({ isNewEmail, t, updateMyEmail }: UpdateEmailProps) { {t('misc.update-email-1')} | freeCodeCamp.org - +

{t('misc.update-email-2')}

diff --git a/client/src/templates/Challenges/codeally/show.tsx b/client/src/templates/Challenges/codeally/show.tsx index 9918545c7bf..bc5587485d6 100644 --- a/client/src/templates/Challenges/codeally/show.tsx +++ b/client/src/templates/Challenges/codeally/show.tsx @@ -253,16 +253,16 @@ class ShowCodeAlly extends Component { - + {title} - + - + - + {isSignedIn && challengeType === challengeTypes.codeAllyCert && ( <> @@ -283,7 +283,7 @@ class ShowCodeAlly extends Component { {t('learn.complete-both-steps')}
- + {t('learn.step-1')} {(isPartiallyCompleted || isCompleted) && ( { }} /> )} - +
{t('learn.runs-in-vm')}
- + - + )} @@ -321,7 +321,7 @@ class ShowCodeAlly extends Component { challengeType === challengeTypes.codeAllyCert && ( <>
- + {t('learn.step-2')} {isCompleted && ( { }} /> )} - +
{t('learn.submit-public-url')}
- + - + { )}
- + { {videoId && ( - +
{!this.state.videoIsLoaded ? (
@@ -262,10 +262,10 @@ class ShowOdin extends Component { )} - +

{title}

- + {assignments.length > 0 && ( <> @@ -291,11 +291,11 @@ class ShowOdin extends Component { className={'video-quiz-option'} text={assignment} /> - + ))}
{' '} - + )} @@ -326,7 +326,7 @@ class ShowOdin extends Component { ))}
- +
{ )}
- + - + { - + { output={output} /> - + { - + { guideUrl={getGuideUrl({ forumTopicId, title })} />
- + { /> - + { - +
{answers.map((option, index) => ( @@ -273,7 +273,7 @@ class ShowVideo extends Component { ))}
- +
{ {t('learn.check-answer')} )}
- + - + { {blockrenderer()} {(isNewResponsiveWebDesign || isNewJsAlgos || isCollegeAlgebraPy) && !isProjectBlock ? null : ( - + )} ); diff --git a/client/src/templates/Introduction/components/super-block-intro.tsx b/client/src/templates/Introduction/components/super-block-intro.tsx index 28577b5cf10..afa94e92089 100644 --- a/client/src/templates/Introduction/components/super-block-intro.tsx +++ b/client/src/templates/Introduction/components/super-block-intro.tsx @@ -26,9 +26,9 @@ function SuperBlockIntro(props: SuperBlockIntroProps): JSX.Element { return ( <>

{i18nSuperBlock}

- + {generateIconComponent(superBlock, 'cert-header-icon')} - + {superBlockIntroText.map((str, i) => (

{str}

))} diff --git a/client/src/templates/Introduction/intro.tsx b/client/src/templates/Introduction/intro.tsx index bd4842ebf58..c1c3d0141a5 100644 --- a/client/src/templates/Introduction/intro.tsx +++ b/client/src/templates/Introduction/intro.tsx @@ -67,11 +67,11 @@ function IntroductionPage({ > {t('buttons.first-lesson')} - + {t('buttons.view-curriculum')} - +
diff --git a/client/src/templates/Introduction/super-block-intro.tsx b/client/src/templates/Introduction/super-block-intro.tsx index c050a0f32f3..74e84867dc2 100644 --- a/client/src/templates/Introduction/super-block-intro.tsx +++ b/client/src/templates/Introduction/super-block-intro.tsx @@ -190,14 +190,14 @@ const SuperBlockIntroductionPage = (props: SuperBlockProp) => {
- + - +

{t(`intro:misc-text.courses`)}

- +
{defaultCurriculumNames.map(blockDashedName => ( @@ -224,20 +224,20 @@ const SuperBlockIntroductionPage = (props: SuperBlockProp) => {
{!isSignedIn && !signInLoading && (
- + {t('buttons.logged-out-cta-btn')}
)} - +

{t(`intro:misc-text.browse-other`)}

- + - +