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

Update source dependencies #1338

Merged
merged 2 commits into from
May 23, 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
8 changes: 6 additions & 2 deletions client/__tests__/__snapshots__/main.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,12 @@ exports[`Main renders something 1`] = `
-webkit-text-decoration: none;
text-decoration: none;
white-space: nowrap;
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
vertical-align: middle;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 700;
font-style: normal;
--source-text-decoration-thickness: 2px;
height: 36px;
min-height: 36px;
Expand Down Expand Up @@ -413,15 +415,17 @@ html:not(.src-focus-disabled) .emotion-60:focus {
align-items: center;
height: 44px;
padding-left: 8px;
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 0.9375rem;
line-height: 1.3;
font-weight: 700;
font-style: normal;
--source-text-decoration-thickness: 2px;
color: #FFFFFF;
background-color: #052962;
-webkit-text-decoration: none;
text-decoration: none;
white-space: nowrap;
}
.emotion-63 :hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
.emotion-0 {
border-top: 1px solid #DCDCDC;
margin-top: 30px;
font-family: GH Guardian Headline,Guardian Egyptian Web,Georgia,serif;
font-family: "GH Guardian Headline","Guardian Egyptian Web",Georgia,serif;
font-size: 1.75rem;
line-height: 1.15;
font-weight: 700;
Expand Down Expand Up @@ -44,7 +44,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
}
.emotion-2 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand Down Expand Up @@ -106,7 +106,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
}
.emotion-5 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand All @@ -115,7 +115,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
}
.emotion-6 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 700;
Expand All @@ -124,7 +124,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
}
.emotion-7 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand All @@ -133,7 +133,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
}
.emotion-8 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand All @@ -156,7 +156,7 @@ exports[`HelpCentreContactOptions Help Centre landing page Help Centre article (
}
.emotion-12 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand Down Expand Up @@ -402,7 +402,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
.emotion-0 {
border-top: 1px solid #DCDCDC;
margin-top: 30px;
font-family: GH Guardian Headline,Guardian Egyptian Web,Georgia,serif;
font-family: "GH Guardian Headline","Guardian Egyptian Web",Georgia,serif;
font-size: 1.75rem;
line-height: 1.15;
font-weight: 700;
Expand Down Expand Up @@ -441,7 +441,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
}
.emotion-2 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand Down Expand Up @@ -503,7 +503,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
}
.emotion-5 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand All @@ -512,7 +512,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
}
.emotion-6 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 700;
Expand All @@ -521,7 +521,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
}
.emotion-7 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand All @@ -530,7 +530,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
}
.emotion-8 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand All @@ -553,7 +553,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
}
.emotion-12 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand Down Expand Up @@ -799,7 +799,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
.emotion-0 {
border-top: 1px solid #DCDCDC;
margin-top: 30px;
font-family: GH Guardian Headline,Guardian Egyptian Web,Georgia,serif;
font-family: "GH Guardian Headline","Guardian Egyptian Web",Georgia,serif;
font-size: 1.75rem;
line-height: 1.15;
font-weight: 700;
Expand All @@ -820,7 +820,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
Still can’t find what you’re looking for?
</h2>,
.emotion-0 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand Down Expand Up @@ -852,7 +852,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
}
.emotion-0 a {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 0.9375rem;
line-height: 1.3;
font-weight: 400;
Expand Down Expand Up @@ -896,7 +896,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
-ms-flex-direction: column;
flex-direction: column;
border: 1px solid #DCDCDC;
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand All @@ -910,7 +910,7 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
}
.emotion-3 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.25rem;
line-height: 1.3;
font-weight: 700;
Expand Down Expand Up @@ -1006,10 +1006,12 @@ exports[`HelpCentreContactOptions Help Centre landing page with live chat featur
-webkit-text-decoration: none;
text-decoration: none;
white-space: nowrap;
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
vertical-align: middle;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 700;
font-style: normal;
--source-text-decoration-thickness: 2px;
height: 44px;
min-height: 44px;
Expand Down Expand Up @@ -1076,7 +1078,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
}
.emotion-15 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.25rem;
line-height: 1.3;
font-weight: 700;
Expand Down Expand Up @@ -1108,7 +1110,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
.emotion-17 {
display: none;
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand Down Expand Up @@ -1142,7 +1144,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
}
.emotion-20 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand Down Expand Up @@ -1204,7 +1206,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
}
.emotion-23 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand All @@ -1227,7 +1229,7 @@ html:not(.src-focus-disabled) .emotion-7:focus {
}
.emotion-27 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.0625rem;
line-height: 1.3;
font-weight: 400;
Expand Down Expand Up @@ -1291,15 +1293,15 @@ html:not(.src-focus-disabled) .emotion-7:focus {
.emotion-46 {
margin: 0;
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 0.9375rem;
line-height: 1.3;
font-weight: 700;
--source-text-decoration-thickness: 2px;
}
.emotion-47 {
font-family: GuardianTextSans,Guardian Text Sans Web,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
font-family: GuardianTextSans,"Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 0.9375rem;
line-height: 1.3;
font-weight: 400;
Expand Down
44 changes: 20 additions & 24 deletions client/components/mma/accountoverview/ProductCard.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { css, ThemeProvider } from '@emotion/react';
import { css } from '@emotion/react';
import { palette, textSans } from '@guardian/source-foundations';
import {
Button,
buttonThemeReaderRevenueBrand,
Stack,
SvgInfoRound,
themeButtonReaderRevenueBrand,
} from '@guardian/source-react-components';
import { InfoSummary } from '@guardian/source-react-components-development-kitchen';
import { useNavigate } from 'react-router';
Expand Down Expand Up @@ -352,27 +352,23 @@ export const ProductCard = ({
</Button>
)}
{showSwitchButton && (
<ThemeProvider
theme={buttonThemeReaderRevenueBrand}
<Button
theme={themeButtonReaderRevenueBrand}
size="small"
cssOverrides={css`
justify-content: center;
`}
onClick={() =>
navigate(`/switch`, {
state: {
productDetail: productDetail,
user: user,
},
})
}
>
<Button
size="small"
cssOverrides={css`
justify-content: center;
`}
onClick={() =>
navigate(`/switch`, {
state: {
productDetail:
productDetail,
user: user,
},
})
}
>
Change to all-access digital
</Button>
</ThemeProvider>
Change to all-access digital
</Button>
)}
</div>
</div>
Expand All @@ -385,7 +381,7 @@ export const ProductCard = ({
</h4>
<div>
<dl css={keyValueCss}>
<dt>{atob('TFBQRlJFRTZHTFRY')}</dt>
<dt>{window.atob('TFBQRlJFRTZHTFRY')}</dt>
<dd>
Copy link
Contributor Author

@rBangay rBangay May 23, 2024

Choose a reason for hiding this comment

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

the linter seems to get confused between the browser and node versions of this function, the node one throwing a deprecation warning. This should force the hand of the linter to let it know that we are only concerned with the browser implimentation here.

reference: microsoft/TypeScript#45566

gives you 6 free tickets each year (1
per event)
Expand All @@ -394,7 +390,7 @@ export const ProductCard = ({
</div>
<div>
<dl css={keyValueCss}>
<dt>{atob('TFBQMjAyR0xUWA==')}</dt>
<dt>{window.atob('TFBQMjAyR0xUWA==')}</dt>
<dd>
gives you 20% off an extra 2 tickets per
event
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { css, ThemeProvider } from '@emotion/react';
import { css } from '@emotion/react';
import { palette, space, textSans, until } from '@guardian/source-foundations';
import {
Button,
buttonThemeReaderRevenueBrand,
ChoiceCard,
ChoiceCardGroup,
InlineError,
Link,
SvgInfoRound,
TextInput,
themeButtonReaderRevenueBrand,
} from '@guardian/source-react-components';
import { useEffect, useState } from 'react';
import type { PaidSubscriptionPlan } from '../../../../../shared/productResponse';
Expand Down Expand Up @@ -323,17 +323,14 @@ export const SupporterPlusUpdateAmountForm = (
buttonContainerCss,
]}
>
<ThemeProvider
theme={buttonThemeReaderRevenueBrand}
<Button
theme={themeButtonReaderRevenueBrand}
cssOverrides={buttonCentredCss}
onClick={changeAmountClick}
size="small"
>
<Button
cssOverrides={buttonCentredCss}
onClick={changeAmountClick}
size="small"
>
Change amount
</Button>
</ThemeProvider>
Change amount
</Button>
</section>
<div
css={css`
Expand Down
Loading
Loading