Skip to content

Commit 87f2597

Browse files
authored
Merge branch 'latest' into missing-page-view-change
2 parents dd21382 + 6aafde7 commit 87f2597

24 files changed

Lines changed: 40 additions & 457 deletions

File tree

src/app/components/Account/AccountSignInModal/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const AccountSignInModal = ({ onClose }: AccountSignInModalProps) => {
2828
closeLabel = 'Close',
2929
title = '',
3030
description = '',
31-
} = translations.accountPromoBanner ?? {};
31+
} = translations.accountSignInModal ?? {};
3232

3333
const viewTracker = useViewTracker({
3434
componentName: 'account-sign-in-modal',

src/app/components/FrostedGlassPromo/__snapshots__/index.test.tsx.snap

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,6 @@ exports[`Frosted Glass Promo when given props for a CPS promo 1`] = `
298298
}
299299
}
300300
301-
@media (prefers-color-scheme: dark) {
302-
.emotion-8 {
303-
color: #E6E8EA;
304-
}
305-
}
306-
307301
@media (min-width: 25rem) {
308302
.emotion-8 {
309303
font-size: 0.875rem;
@@ -507,12 +501,6 @@ exports[`Frosted Glass Promo when given props for a Link promo 1`] = `
507501
}
508502
}
509503
510-
@media (prefers-color-scheme: dark) {
511-
.emotion-8 {
512-
color: #E6E8EA;
513-
}
514-
}
515-
516504
@media (min-width: 25rem) {
517505
.emotion-8 {
518506
font-size: 0.875rem;
@@ -716,12 +704,6 @@ exports[`Frosted Glass Promo when given props for a Optimo promo 1`] = `
716704
}
717705
}
718706
719-
@media (prefers-color-scheme: dark) {
720-
.emotion-8 {
721-
color: #E6E8EA;
722-
}
723-
}
724-
725707
@media (min-width: 25rem) {
726708
.emotion-8 {
727709
font-size: 0.875rem;
@@ -925,12 +907,6 @@ exports[`Frosted Glass Promo when given props for an a Optimo promo with no imag
925907
}
926908
}
927909
928-
@media (prefers-color-scheme: dark) {
929-
.emotion-8 {
930-
color: #E6E8EA;
931-
}
932-
}
933-
934910
@media (min-width: 25rem) {
935911
.emotion-8 {
936912
font-size: 0.875rem;

src/app/components/MostRead/Canonical/LastUpdated/__snapshots__/index.test.tsx.snap

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ exports[`MostReadCanonical - LastUpdated should render LastUpdated correctly 1`]
2525
}
2626
}
2727
28-
@media (prefers-color-scheme: dark) {
29-
.emotion-0 {
30-
color: #E6E8EA;
31-
}
32-
}
33-
3428
<div>
3529
<time
3630
class="emotion-0 emotion-1"

src/app/components/SaveArticleButton/index.test.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ describe('SaveArticleButton', () => {
5353
await act(async () =>
5454
render(<SaveArticleButton {...defaultProps} />, signedInRenderOptions),
5555
);
56-
expect(screen.getByRole('button')).toHaveTextContent('Save for later');
56+
expect(screen.getByRole('button')).toHaveTextContent(
57+
'बाद में पढ़ने के लिए सहेजें',
58+
);
5759
});
5860

5961
it('renders Saved to My News when saved', async () => {
@@ -62,7 +64,9 @@ describe('SaveArticleButton', () => {
6264
await act(async () =>
6365
render(<SaveArticleButton {...defaultProps} />, signedInRenderOptions),
6466
);
65-
expect(screen.getByRole('button')).toHaveTextContent('Saved to My News');
67+
expect(screen.getByRole('button')).toHaveTextContent(
68+
'मेरी ख़बरों में सहेजा गया',
69+
);
6670
});
6771

6872
it('renders loading state and keeps the button focusable', async () => {
@@ -76,7 +80,7 @@ describe('SaveArticleButton', () => {
7680
);
7781
const button = screen.getByRole('button');
7882

79-
expect(button).toHaveTextContent('Loading');
83+
expect(button).toHaveTextContent('लोड हो रहा है');
8084
expect(button).toBeEnabled();
8185
});
8286

@@ -94,7 +98,7 @@ describe('SaveArticleButton', () => {
9498
);
9599
const button = screen.getByRole('button');
96100

97-
expect(button).toHaveTextContent('Saving');
101+
expect(button).toHaveTextContent('सहेजा जा रहा है');
98102
expect(button).toBeEnabled();
99103
});
100104

@@ -112,7 +116,7 @@ describe('SaveArticleButton', () => {
112116
);
113117
const button = screen.getByRole('button');
114118

115-
expect(button).toHaveTextContent('Removing');
119+
expect(button).toHaveTextContent('हटाया जा रहा है');
116120
expect(button).toBeEnabled();
117121
});
118122

src/app/legacy/components/Promo/a.jsx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
import styled from '@emotion/styled';
22

33
const A = styled.a`
4-
color: ${props =>
5-
props.theme.isDarkUi
6-
? props.theme.palette.GREY_2
7-
: props.theme.palette.GREY_10};
4+
color: ${props => props.theme.palette.GREY_10};
85
text-decoration: none;
96
display: block;
107
&:hover,
118
&:focus {
129
text-decoration: underline;
1310
}
1411
&:visited {
15-
color: ${props =>
16-
props.theme.isDarkUi
17-
? props.theme.palette.GREY_4
18-
: props.theme.palette.GREY_6};
12+
color: ${props => props.theme.palette.GREY_6};
1913
}
2014
&:before {
2115
position: absolute;
@@ -25,17 +19,6 @@ const A = styled.a`
2519
right: 0;
2620
content: '';
2721
}
28-
29-
@media (prefers-color-scheme: dark) {
30-
${props =>
31-
!props.theme.isDarkUi &&
32-
`
33-
color: ${props.theme.palette.GREY_2};
34-
&:visited {
35-
color: ${props.theme.palette.GREY_4};
36-
}
37-
`}
38-
}
3922
`;
4023

4124
// TODO: event tracking

src/app/legacy/components/Promo/body.jsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@ import styled from '@emotion/styled';
33
const P = styled.p`
44
${({ theme: { fontVariants } }) => fontVariants.sansRegular};
55
${({ theme: { fontSizes } }) => fontSizes.bodyCopy};
6-
color: ${props =>
7-
props.theme.isDarkUi
8-
? props.theme.palette.GREY_3
9-
: props.theme.palette.EBON};
10-
11-
@media (prefers-color-scheme: dark) {
12-
${props => !props.theme.isDarkUi && `color: ${props.theme.palette.GREY_3};`}
13-
}
6+
color: ${props => props.theme.palette.EBON};
147
`;
158

169
export default P;

src/app/legacy/components/Promo/heading.jsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,9 @@ import styled from '@emotion/styled';
33
const Heading = styled.h2`
44
${props => props.theme.fontVariants.serifMedium}
55
${props => props.theme.fontSizes.bodyCopy}
6-
color: ${props =>
7-
props.theme.isDarkUi
8-
? props.theme.palette.GREY_2
9-
: props.theme.palette.EBON};
6+
color: ${props => props.theme.palette.EBON};
107
margin-top: 0;
118
margin-bottom: ${props => `${props.theme.spacings.FULL}rem`};
12-
13-
@media (prefers-color-scheme: dark) {
14-
${props => !props.theme.isDarkUi && `color: ${props.theme.palette.GREY_2};`}
15-
}
169
`;
1710

1811
export default Heading;

src/app/legacy/components/RadioSchedule/StartTime/__snapshots__/index.test.jsx.snap

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ exports[`StartTime should render LTR correctly 1`] = `
114114
}
115115
}
116116
117-
@media (prefers-color-scheme: dark) {
118-
.emotion-8 {
119-
color: #E6E8EA;
120-
}
121-
}
122-
123117
<div>
124118
<div
125119
class="emotion-0 emotion-1"
@@ -274,12 +268,6 @@ exports[`StartTime should render RTL correctly 1`] = `
274268
}
275269
}
276270
277-
@media (prefers-color-scheme: dark) {
278-
.emotion-8 {
279-
color: #E6E8EA;
280-
}
281-
}
282-
283271
<div>
284272
<div
285273
class="emotion-0 emotion-1"

src/app/legacy/components/RadioSchedule/__snapshots__/index.test.jsx.snap

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,6 @@ exports[`RadioSchedule should render ltr radio schedules correctly 1`] = `
342342
}
343343
}
344344
345-
@media (prefers-color-scheme: dark) {
346-
.emotion-16 {
347-
color: #E6E8EA;
348-
}
349-
}
350-
351345
.emotion-18 {
352346
padding-top: 0.5rem;
353347
background-color: #FFFFFF;
@@ -1653,12 +1647,6 @@ exports[`RadioSchedule should render rtl radio schedules correctly 1`] = `
16531647
}
16541648
}
16551649
1656-
@media (prefers-color-scheme: dark) {
1657-
.emotion-16 {
1658-
color: #E6E8EA;
1659-
}
1660-
}
1661-
16621650
.emotion-18 {
16631651
padding-top: 0.5rem;
16641652
background-color: #FFFFFF;

src/app/legacy/containers/ArticleTimestamp/__snapshots__/index.test.jsx.snap

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,6 @@ exports[`ArticleTimestamp should render a 'created' Timestamp correctly 1`] = `
152152
padding-bottom: 1rem;
153153
}
154154
155-
@media (prefers-color-scheme: dark) {
156-
.emotion-4 {
157-
color: #E6E8EA;
158-
}
159-
}
160-
161155
<div>
162156
<div
163157
class="emotion-0 emotion-1 emotion-2"
@@ -330,12 +324,6 @@ exports[`ArticleTimestamp should render both a 'created' and an 'updated' Timest
330324
padding-bottom: 1rem;
331325
}
332326
333-
@media (prefers-color-scheme: dark) {
334-
.emotion-4 {
335-
color: #E6E8EA;
336-
}
337-
}
338-
339327
<div>
340328
<div
341329
class="emotion-0 emotion-1 emotion-2"
@@ -516,12 +504,6 @@ exports[`ArticleTimestamp should render with a prefix 1`] = `
516504
padding-bottom: 1rem;
517505
}
518506
519-
@media (prefers-color-scheme: dark) {
520-
.emotion-4 {
521-
color: #E6E8EA;
522-
}
523-
}
524-
525507
<div>
526508
<div
527509
class="emotion-0 emotion-1 emotion-2"
@@ -702,12 +684,6 @@ exports[`ArticleTimestamp should render with a suffix 1`] = `
702684
padding-bottom: 1rem;
703685
}
704686
705-
@media (prefers-color-scheme: dark) {
706-
.emotion-4 {
707-
color: #E6E8EA;
708-
}
709-
}
710-
711687
<div>
712688
<div
713689
class="emotion-0 emotion-1 emotion-2"
@@ -888,12 +864,6 @@ exports[`ArticleTimestamp should render with no suffix or prefix 1`] = `
888864
padding-bottom: 1rem;
889865
}
890866
891-
@media (prefers-color-scheme: dark) {
892-
.emotion-4 {
893-
color: #E6E8EA;
894-
}
895-
}
896-
897867
<div>
898868
<div
899869
class="emotion-0 emotion-1 emotion-2"

0 commit comments

Comments
 (0)