Skip to content
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

Guardian source update #1339

Merged
merged 3 commits into from
May 28, 2024
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
2 changes: 0 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ module.exports = {
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:jest/recommended',
'plugin:@guardian/source-foundations/recommended',
'plugin:@guardian/source-react-components/recommended',
],
plugins: ['react', 'jest'],
settings: {
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.6.0
18.20.3
2 changes: 1 addition & 1 deletion .storybook/viewport.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { breakpoints } from '@guardian/source-foundations';
import { breakpoints } from '@guardian/source/foundations';

const viewportMeta = {
mobile: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
font-size: 1.75rem;
line-height: 1.15;
font-weight: 700;
font-style: normal;
--source-text-decoration-thickness: 3px;
margin-bottom: 24px;
}
Expand Down Expand Up @@ -48,6 +49,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin: 0;
padding: 16px 47px 16px 16px;
Expand Down Expand Up @@ -110,6 +112,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin: 6px 0 4px;
}
Expand All @@ -119,6 +122,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 700;
font-style: normal;
--source-text-decoration-thickness: 2px;
word-break: break-word;
}
Expand All @@ -128,6 +132,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin: 6px 0 4px;
}
Expand All @@ -137,6 +142,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin-bottom: 0;
}
Expand All @@ -160,6 +166,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin: 0;
padding: 16px 47px 16px 16px;
Expand Down Expand Up @@ -406,6 +413,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 1.75rem;
line-height: 1.15;
font-weight: 700;
font-style: normal;
--source-text-decoration-thickness: 3px;
margin-bottom: 24px;
}
Expand Down Expand Up @@ -445,6 +453,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin: 0;
padding: 16px 47px 16px 16px;
Expand Down Expand Up @@ -507,6 +516,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin: 6px 0 4px;
}
Expand All @@ -516,6 +526,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 700;
font-style: normal;
--source-text-decoration-thickness: 2px;
word-break: break-word;
}
Expand All @@ -525,6 +536,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin: 6px 0 4px;
}
Expand All @@ -534,6 +546,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin-bottom: 0;
}
Expand All @@ -557,6 +570,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin: 0;
padding: 16px 47px 16px 16px;
Expand Down Expand Up @@ -803,6 +817,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 1.75rem;
line-height: 1.15;
font-weight: 700;
font-style: normal;
--source-text-decoration-thickness: 3px;
margin-bottom: 4px;
}
Expand All @@ -824,6 +839,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin-bottom: 4px;
max-width: 320px;
Expand Down Expand Up @@ -856,6 +872,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 0.9375rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
color: #0077B6;
-webkit-text-decoration: underline;
Expand Down Expand Up @@ -900,6 +917,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
}

Expand All @@ -914,6 +932,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
font-size: 1.25rem;
line-height: 1.3;
font-weight: 700;
font-style: normal;
--source-text-decoration-thickness: 3px;
color: #333333;
position: relative;
Expand Down Expand Up @@ -1082,6 +1101,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
font-size: 1.25rem;
line-height: 1.3;
font-weight: 700;
font-style: normal;
--source-text-decoration-thickness: 3px;
color: #333333;
position: relative;
Expand Down Expand Up @@ -1114,6 +1134,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
padding: 0 16px 16px 16px;
margin: 0;
Expand Down Expand Up @@ -1148,6 +1169,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin: 0;
padding: 16px 47px 16px 16px;
Expand Down Expand Up @@ -1210,6 +1232,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin-bottom: 0;
}
Expand All @@ -1233,6 +1256,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
margin: 0;
padding: 16px 47px 16px 16px;
Expand Down Expand Up @@ -1297,6 +1321,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
font-size: 0.9375rem;
line-height: 1.3;
font-weight: 700;
font-style: normal;
--source-text-decoration-thickness: 2px;
}

Expand All @@ -1305,6 +1330,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
font-size: 0.9375rem;
line-height: 1.3;
font-weight: 400;
font-style: normal;
--source-text-decoration-thickness: 2px;
max-width: 830px;
margin: 0;
Expand Down
14 changes: 4 additions & 10 deletions client/components/helpCentre/BackToHelpCentreLink.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
import { css } from '@emotion/react';
import {
neutral,
palette,
space,
textSans,
} from '@guardian/source-foundations';
import { SvgChevronLeftSingle } from '@guardian/source-react-components';
import { palette, space, textSans17 } from '@guardian/source/foundations';
import { SvgChevronLeftSingle } from '@guardian/source/react-components';
import { Link } from 'react-router-dom';

const dividerCss = css`
margin-top: ${space[12]}px;
padding-top: ${space[9]}px;
border-top: 1px solid ${neutral['86']};
border-top: 1px solid ${palette.neutral['86']};
`;

const linkCss = css`
display: flex;
align-items: center;
${textSans.medium()};
color: ${palette.brand[500]};
${textSans17}: color: ${palette.brand[500]};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a semicolon rather than a colon here.

Suggested change
${textSans17}: color: ${palette.brand[500]};
${textSans17};
color: ${palette.brand[500]};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AAAH, good spot, I'll fix this with a subsequent small pr. It only seems to affect the link colour and nothing more serious.

&:hover,
&:focus {
text-decoration: underline;
Expand Down
9 changes: 7 additions & 2 deletions client/components/helpCentre/HelpCentre.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { css } from '@emotion/react';
import { from, headline, neutral, space } from '@guardian/source-foundations';
import {
from,
headlineBold28,
neutral,
space,
} from '@guardian/source/foundations';
import { helpCentreConfig } from './HelpCentreConfig';
import { HelpCentreContactOptions } from './HelpCentreContactOptions';
import { HelpCentreLandingMoreTopics } from './HelpCentreLandingMoreTopics';
Expand All @@ -8,7 +13,7 @@ import { HelpTopicBox } from './HelpTopicBox';
const subtitleStyles = css`
margin-top: 30px;
margin-bottom: ${space[6]}px;
${headline.small({ fontWeight: 'bold' })};
${headlineBold28};
border-top: 1px solid ${neutral['86']};
${from.tablet} {
margin-bottom: ${space[6]}px;
Expand Down
24 changes: 12 additions & 12 deletions client/components/helpCentre/HelpCentreArticle.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { css } from '@emotion/react';
import {
brand,
from,
headline,
neutral,
headlineBold20,
palette,
space,
textSans,
} from '@guardian/source-foundations';
import { Button } from '@guardian/source-react-components';
textSans15,
textSansBold17,
} from '@guardian/source/foundations';
import { Button } from '@guardian/source/react-components';
import { captureException, captureMessage } from '@sentry/browser';
import { useEffect, useState } from 'react';
import * as React from 'react';
Expand Down Expand Up @@ -66,7 +66,7 @@ export const HelpCentreArticle = () => {

const articleContainerCss = css`
max-width: 620px;
color: ${neutral['7']};
color: ${palette.neutral['7']};
`;
setPageTitle(article?.title);

Expand Down Expand Up @@ -133,7 +133,7 @@ interface ArticleBodyProps {

const ArticleBody = (props: ArticleBodyProps) => {
const aCss = css`
color: ${brand[500]};
color: ${palette.brand[500]};
text-decoration: underline;
`;
const ulCss = css`
Expand All @@ -155,7 +155,7 @@ const ArticleBody = (props: ArticleBodyProps) => {
}
`;
const articleBodyH2Css = css`
${headline.xxsmall({ fontWeight: 'bold' })};
${headlineBold20};
margin: ${space[6]}px 0 ${space[2]}px;
b {
font-weight: 700;
Expand Down Expand Up @@ -252,7 +252,7 @@ const ArticleBody = (props: ArticleBodyProps) => {
const articleFeedbackWidgetCss = css`
display: flex;
flex-direction: column;
border: 1px solid ${neutral[86]};
border: 1px solid ${palette.neutral[86]};
padding: ${space[4]}px ${space[3]}px;
margin: 36px 0 48px;
${from.desktop} {
Expand All @@ -265,7 +265,7 @@ const articleFeedbackWidgetCss = css`
}
& p {
margin: 0;
${textSans.medium({ fontWeight: 'bold' })}
${textSansBold17};
}
& .buttonDiv {
min-height: 36px;
Expand All @@ -282,7 +282,7 @@ const articleFeedbackWidgetCss = css`
}
}
& p {
${textSans.small({ fontWeight: 'regular' })}
${textSans15};
}
}
`;
Expand Down
16 changes: 8 additions & 8 deletions client/components/helpCentre/HelpCentreContactOptions.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { css } from '@emotion/react';
import {
from,
headline,
neutral,
headlineBold28,
palette,
space,
textSans,
} from '@guardian/source-foundations';
import { Button } from '@guardian/source-react-components';
textSans17,
} from '@guardian/source/foundations';
import { Button } from '@guardian/source/react-components';
import { useState } from 'react';
import { CallCentreEmailAndNumbers } from '../shared/CallCenterEmailAndNumbers';
import { HelpCentreEmailAndLiveChat } from './HelpCentreEmailAndLiveChat';
Expand All @@ -23,9 +23,9 @@ interface HelpCentreContactOptionsProps {
}

const baseSubtitleStyles = css`
border-top: 1px solid ${neutral['86']};
border-top: 1px solid ${palette.neutral['86']};
margin-top: 30px;
${headline.small({ fontWeight: 'bold' })};
${headlineBold28};
`;

const subtitleStyles = css`
Expand All @@ -47,7 +47,7 @@ const liveChatSubtitleStyles = css`
`;

const emailAndLiveChatSubheadingCss = css`
${textSans.medium()};
${textSans17};
margin-bottom: ${space[1]}px;
max-width: 320px;
${from.tablet} {
Expand Down
Loading
Loading