Skip to content
Merged
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: 5 additions & 3 deletions client/i18n/locales/english/intro.json
Original file line number Diff line number Diff line change
Expand Up @@ -4569,9 +4569,11 @@
"Learn about Understanding Object Oriented Programming and Encapsulation in these lessons."
]
},
"workshop-placeholder-oop-1": {
"title": "Placeholder - Waiting for title",
"intro": [""]
"workshop-salary-tracker": {
"title": "Build a Salary Tracker",
"intro": [
"In this workshop, you'll practice encapsulation, properties, and other OOP concepts by building a salary tracking system for employees."
]
},
"lab-placeholder-oop-1": {
"title": "Placeholder - Waiting for title",
Expand Down
14 changes: 7 additions & 7 deletions client/src/components/Intro/learn-alert.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Alert, Spacer } from '@freecodecamp/ui';
import { Callout, Spacer } from '@freecodecamp/ui';
import { useFeature } from '@growthbook/growthbook-react';
import { useTranslation } from 'react-i18next';
import { Link } from '../helpers';
Expand All @@ -19,7 +19,7 @@ const LearnAlert = ({
const progressAlertFlag2024 = useFeature('progress-alert-2024');
const createUniversityFlag = useFeature('university-alert');
const progressAlertDefault = (text: string, value?: number) => (
<Alert variant='info' className='annual-donation-alert'>
<Callout variant='info' className='annual-donation-alert'>
{value && (
<>
<div className='text-center'>
Expand Down Expand Up @@ -47,11 +47,11 @@ const LearnAlert = ({
{t('buttons.donate')}
</Link>
</div>
</Alert>
</Callout>
);

const seasonalAlertFlagAlert = (
<Alert variant='info' className='annual-donation-alert'>
<Callout variant='info' className='annual-donation-alert'>
<p>
<b>{t('learn.season-greetings-fcc')}</b>
</p>
Expand All @@ -68,7 +68,7 @@ const LearnAlert = ({
{t('buttons.donate')}
</Link>
</p>
</Alert>
</Callout>
);

const progressAlert2024 = progressAlertDefault(
Expand All @@ -77,7 +77,7 @@ const LearnAlert = ({
);

const universityAlert = (
<Alert variant='info' className='university-alert'>
<Callout variant='info' className='university-alert'>
<p>
<b>{t('learn.building-a-university')}</b>
</p>
Expand All @@ -94,7 +94,7 @@ const LearnAlert = ({
{t('buttons.donate')}
</Link>
</p>
</Alert>
</Callout>
);

if (!isDonating) {
Expand Down
10 changes: 5 additions & 5 deletions client/src/components/growth-book/codeally-down.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { Alert, Spacer } from '@freecodecamp/ui';
import { Callout, Spacer } from '@freecodecamp/ui';
import { useFeature } from '@growthbook/growthbook-react';

const Down = () => {
const { t } = useTranslation();
return (
<Alert variant='danger'>
<Callout variant='danger'>
<p>
<Trans i18nKey='intro:misc-text.course-maintenance'>
<a
Expand All @@ -20,14 +20,14 @@ const Down = () => {
</p>
<Spacer size='xs' />
<p>{t('intro:misc-text.progress-wont-save')}</p>
</Alert>
</Callout>
);
};

const Disabled = () => {
const { t } = useTranslation();
return (
<Alert variant='danger'>
<Callout variant='danger'>
<p>
<Trans i18nKey='intro:misc-text.course-disabled'>
<a
Expand All @@ -41,7 +41,7 @@ const Disabled = () => {
</p>
<Spacer size='xs' />
<p>{t('intro:misc-text.progress-wont-save')}</p>
</Alert>
</Callout>
);
};

Expand Down
6 changes: 3 additions & 3 deletions client/src/components/growth-book/ona-note.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Alert } from '@freecodecamp/ui';
import { Callout } from '@freecodecamp/ui';
import { useFeatureValue } from '@growthbook/growthbook-react';
import { SuperBlocks } from '../../../../shared-dist/config/curriculum';
import { Link } from '../helpers';
Expand All @@ -16,7 +16,7 @@ export function OnaNote({ superBlock }: OnaNoteProps): JSX.Element | null {
const { t } = useTranslation();

return onaNoteFeature.superblocks.includes(superBlock) ? (
<Alert variant='info'>
<Callout variant='info'>
<p>
<Link
external={true}
Expand All @@ -26,6 +26,6 @@ export function OnaNote({ superBlock }: OnaNoteProps): JSX.Element | null {
{t('intro:misc-text.read-database-cert-article')}
</Link>
</p>
</Alert>
</Callout>
) : null;
}
8 changes: 4 additions & 4 deletions client/src/components/profile/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';
import Helmet from 'react-helmet';
import type { TFunction } from 'i18next';
import { useTranslation } from 'react-i18next';
import { Alert, Container, Modal, Row, Spacer } from '@freecodecamp/ui';
import { Callout, Container, Modal, Row, Spacer } from '@freecodecamp/ui';
import { FullWidthRow, Link } from '../helpers';
import Portfolio from './components/portfolio';

Expand Down Expand Up @@ -38,7 +38,7 @@ interface MessageProps {
const UserMessage = ({ t }: Pick<MessageProps, 't'>) => {
return (
<FullWidthRow>
<Alert variant='info'>{t('profile.you-change-privacy')}</Alert>
<Callout variant='info'>{t('profile.you-change-privacy')}</Callout>
<Spacer size='xl' />
</FullWidthRow>
);
Expand Down Expand Up @@ -69,9 +69,9 @@ const VisitorMessage = ({
}: Omit<MessageProps, 'isSessionUser'>) => {
return (
<FullWidthRow>
<Alert variant='info'>
<Callout variant='info'>
{t('profile.username-change-privacy', { username })}
</Alert>
</Callout>
<Spacer size='m' />
</FullWidthRow>
);
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/settings/email.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
HelpBlock,
Alert,
Callout,
FormGroup,
FormGroupProps,
FormControl,
Expand Down Expand Up @@ -168,7 +168,7 @@ function EmailSettings({
{isEmailVerified ? null : (
<FullWidthRow>
<HelpBlock>
<Alert
<Callout
variant='info'
className='text-center'
data-playwright-test-label='email-verification-alert'
Expand All @@ -181,7 +181,7 @@ function EmailSettings({
to='/update-email'
/>
</Trans>
</Alert>
</Callout>
</HelpBlock>
</FullWidthRow>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Introduction to the Introducing Yourself Review
block: es-a1-review-introducing-yoourself
block: es-a1-review-introducing-yourself
superBlock: a1-professional-spanish
---

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Introduction to the Build a Salary Tracker
block: workshop-salary-tracker
superBlock: full-stack-developer
---

## Introduction to the Build a Salary Tracker

In this workshop, you'll practice encapsulation, properties, and other OOP concepts by building a salary tracking system for employees.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Alert } from '@freecodecamp/ui';
import { Callout } from '@freecodecamp/ui';

interface RdbLocalLogoutAlertProps {
course: string;
Expand All @@ -12,9 +12,9 @@ function RdbLocalLogoutAlert({
const { t } = useTranslation();

return (
<Alert variant='danger'>
<Callout variant='danger'>
{t('learn.local.logout-warning', { course })}
</Alert>
</Callout>
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Trans } from 'react-i18next';
import { Alert, Spacer } from '@freecodecamp/ui';
import { Callout, Spacer } from '@freecodecamp/ui';

interface RdbOnaContinueAlertProps {
course: string;
Expand All @@ -10,7 +10,7 @@ function RdbOnaContinueAlert({
course
}: RdbOnaContinueAlertProps): JSX.Element {
return (
<Alert variant='info'>
<Callout variant='info'>
<Trans values={{ course }} i18nKey='learn.ona.continue-project'>
<a href='https://app.ona.com' rel='noopener noreferrer' target='_blank'>
placeholder
Expand All @@ -26,7 +26,7 @@ function RdbOnaContinueAlert({
placeholder
</a>
</Trans>
</Alert>
</Callout>
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Alert } from '@freecodecamp/ui';
import { Callout } from '@freecodecamp/ui';

interface RdbOnaLogoutAlertProps {
course: string;
Expand All @@ -10,7 +10,9 @@ function RdbOnaLogoutAlert({ course }: RdbOnaLogoutAlertProps): JSX.Element {
const { t } = useTranslation();

return (
<Alert variant='danger'>{t('learn.ona.logout-warning', { course })}</Alert>
<Callout variant='danger'>
{t('learn.ona.logout-warning', { course })}
</Callout>
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useStaticQuery, graphql } from 'gatsby';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Alert, Spacer } from '@freecodecamp/ui';
import { Callout, Spacer } from '@freecodecamp/ui';

import {
AllChallengeNode,
Expand Down Expand Up @@ -36,7 +36,7 @@ function MissingPrerequisites({
});

return (
<Alert variant='danger'>
<Callout variant='danger'>
<p>{t('learn.exam.not-qualified')}</p>
<Spacer size='xs' />
<ul>
Expand All @@ -50,7 +50,7 @@ function MissingPrerequisites({
)
)}
</ul>
</Alert>
</Callout>
);
}

Expand Down
6 changes: 3 additions & 3 deletions client/src/templates/Challenges/exam/show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import type { Dispatch } from 'redux';
import { createSelector } from 'reselect';
import { Container, Col, Alert, Row, Button, Spacer } from '@freecodecamp/ui';
import { Container, Col, Callout, Row, Button, Spacer } from '@freecodecamp/ui';
import { micromark } from 'micromark';

// Local Utilities
Expand Down Expand Up @@ -502,9 +502,9 @@ function ShowExam(props: ShowExamProps) {
<Spacer size='m' />

{qualifiedForExam ? (
<Alert variant='info'>
<Callout variant='info'>
<p>{t('learn.exam.qualified')}</p>
</Alert>
</Callout>
) : !prerequisitesComplete ? (
<MissingPrerequisites
missingPrerequisites={missingPrerequisites}
Expand Down
10 changes: 5 additions & 5 deletions client/src/templates/Introduction/components/legacy-links.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Alert } from '@freecodecamp/ui';
import { Callout } from '@freecodecamp/ui';
import { SuperBlocks } from '../../../../../shared-dist/config/curriculum';
import { isRelationalDbCert, isExamCert } from '../../../utils/is-a-cert';
import { CodeAllyDown } from '../../../components/growth-book/codeally-down';
Expand All @@ -22,17 +22,17 @@ function LegacyLinks({ superBlock }: LegacyLinksProps): JSX.Element {
<>
<CodeAllyDown />
{clientLocale != 'english' && (
<Alert variant='info'>
<Callout variant='info'>
<p>{t('intro:misc-text.english-only')}</p>
</Alert>
</Callout>
)}
</>
);
} else if (isExamCert(superBlock) && clientLocale != 'english') {
return (
<Alert variant='info'>
<Callout variant='info'>
<p>{t('intro:misc-text.exam-english-only')}</p>
</Alert>
</Callout>
);
} else {
return <OnaNote superBlock={superBlock} />;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { graphql, useStaticQuery } from 'gatsby';
import { useTranslation, Trans } from 'react-i18next';
import { Alert, Spacer, Container, Row, Col, Callout } from '@freecodecamp/ui';
import { Callout, Spacer, Container, Row, Col } from '@freecodecamp/ui';
import { ConnectedProps, connect } from 'react-redux';
import { useFeatureIsOn } from '@growthbook/growthbook-react';
import {
Expand Down Expand Up @@ -68,7 +68,7 @@ export const ConditionalDonationAlert = ({

if (!isDonating && betaCertifications.includes(superBlock))
return (
<Alert variant='info' className='annual-donation-alert'>
<Callout variant='info' className='annual-donation-alert'>
<p>{t('donate.beta-certification')}</p>
<hr />
<p className='btn-container'>
Expand All @@ -82,20 +82,20 @@ export const ConditionalDonationAlert = ({
{t('buttons.donate-now')}
</Link>
</p>
</Alert>
</Callout>
);

if (!isDonating && unfinishedCertifications.includes(superBlock))
return (
<Alert variant='info' className='annual-donation-alert'>
<Callout variant='info' className='annual-donation-alert'>
<p>
<Trans i18nKey='donate.consider-donating-2'>
<Link className='inline' to='/donate'>
placeholder
</Link>
</Trans>
</p>
</Alert>
</Callout>
);

return null;
Expand Down
Loading
Loading