@newskit-render/core 1.90.2 → 1.91.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/pages/__snapshots__/[articleSlug].test.tsx.snap +129 -106
- package/__tests__/pages/__snapshots__/brightcove.test.tsx.snap +1 -1
- package/__tests__/pages/__snapshots__/home.test.tsx.snap +78 -77
- package/__tests__/pages/__snapshots__/relatedArticles.test.tsx.snap +15 -14
- package/app-context/InstrumentationContextProvider.tsx +1 -0
- package/components/ErrorPage/ErrorPage.tsx +4 -1
- package/components/article/Highlights.tsx +1 -3
- package/components/article/RelatedArticles.tsx +3 -11
- package/components/article/RelatedTopics.tsx +2 -2
- package/components/article/ShareBarComponent.tsx +9 -7
- package/components/article/__tests__/__snapshots__/index.test.tsx.snap +155 -132
- package/components/article/index.tsx +2 -3
- package/components/common/ShareButton.tsx +5 -1
- package/components/common/ViewMoreButton.tsx +5 -1
- package/components/common/icons/IconFilledTwitter.tsx +14 -0
- package/components/common/icons/StyledIconFilledChevronRight.tsx +5 -1
- package/components/footer/__snapshots__/index.test.tsx.snap +8 -8
- package/components/section/layouts/__tests__/__snapshots__/Lead.test.tsx.snap +12 -12
- package/components/section/layouts/__tests__/__snapshots__/SectionTitle.test.tsx.snap +15 -12
- package/context/multi-tenancy/index.tsx +1 -0
- package/cypress/e2e/account/payment-failer.spec.js +3 -0
- package/cypress/support/commands.js +4 -1
- package/helpers/__tests__/getRecommendation.test.ts +8 -10
- package/helpers/mocks/getRecommendationsMock.ts +1 -1
- package/jest.config.js +3 -0
- package/package.json +27 -22
- package/pages/_app.tsx +2 -1
- package/pages/_document.tsx +41 -39
- package/pages/index.tsx +0 -1
- package/pages/preview/[articleId]/version/[versionId]/index.tsx +4 -1
|
@@ -107,10 +107,11 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
107
107
|
<svg
|
|
108
108
|
aria-hidden="true"
|
|
109
109
|
aria-label="Mobile Menu Button"
|
|
110
|
-
class="css-
|
|
110
|
+
class="css-11lepi0 css-18cthx4-EmotionIconBase ex0cdmw0"
|
|
111
111
|
data-testid="mobile-menu-btn"
|
|
112
112
|
fill="currentColor"
|
|
113
113
|
focusable="false"
|
|
114
|
+
overrides="[object Object]"
|
|
114
115
|
role="button"
|
|
115
116
|
tabindex="0"
|
|
116
117
|
viewBox="0 0 24 24"
|
|
@@ -151,7 +152,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
151
152
|
class="css-1o99qvy"
|
|
152
153
|
>
|
|
153
154
|
<span
|
|
154
|
-
class="css-
|
|
155
|
+
class="css-8r74mr"
|
|
155
156
|
>
|
|
156
157
|
Section One
|
|
157
158
|
</span>
|
|
@@ -174,7 +175,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
174
175
|
class="css-1o99qvy"
|
|
175
176
|
>
|
|
176
177
|
<span
|
|
177
|
-
class="css-
|
|
178
|
+
class="css-8r74mr"
|
|
178
179
|
>
|
|
179
180
|
Section Two
|
|
180
181
|
</span>
|
|
@@ -197,7 +198,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
197
198
|
class="css-1o99qvy"
|
|
198
199
|
>
|
|
199
200
|
<span
|
|
200
|
-
class="css-
|
|
201
|
+
class="css-8r74mr"
|
|
201
202
|
>
|
|
202
203
|
Section Three
|
|
203
204
|
</span>
|
|
@@ -248,10 +249,10 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
248
249
|
class="css-dzecoh"
|
|
249
250
|
>
|
|
250
251
|
<section
|
|
251
|
-
class="css-
|
|
252
|
+
class="css-3bvy7k"
|
|
252
253
|
>
|
|
253
254
|
<h3
|
|
254
|
-
class="nk-headline-heading css-
|
|
255
|
+
class="nk-headline-heading css-b3iww6"
|
|
255
256
|
>
|
|
256
257
|
Related Articles
|
|
257
258
|
</h3>
|
|
@@ -269,7 +270,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
269
270
|
</div>
|
|
270
271
|
</div>
|
|
271
272
|
<div
|
|
272
|
-
class="css-
|
|
273
|
+
class="css-sxhtf1"
|
|
273
274
|
>
|
|
274
275
|
<div
|
|
275
276
|
class="css-8atxkm"
|
|
@@ -333,7 +334,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
333
334
|
class="css-17x5lw"
|
|
334
335
|
>
|
|
335
336
|
<span
|
|
336
|
-
class="css-
|
|
337
|
+
class="css-yk25sg"
|
|
337
338
|
>
|
|
338
339
|
NavLink One
|
|
339
340
|
</span>
|
|
@@ -352,7 +353,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
352
353
|
class="css-17x5lw"
|
|
353
354
|
>
|
|
354
355
|
<span
|
|
355
|
-
class="css-
|
|
356
|
+
class="css-yk25sg"
|
|
356
357
|
>
|
|
357
358
|
NavLink Two
|
|
358
359
|
</span>
|
|
@@ -371,7 +372,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
371
372
|
class="css-17x5lw"
|
|
372
373
|
>
|
|
373
374
|
<span
|
|
374
|
-
class="css-
|
|
375
|
+
class="css-yk25sg"
|
|
375
376
|
>
|
|
376
377
|
NavLink Three
|
|
377
378
|
</span>
|
|
@@ -390,7 +391,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
390
391
|
class="css-17x5lw"
|
|
391
392
|
>
|
|
392
393
|
<span
|
|
393
|
-
class="css-
|
|
394
|
+
class="css-yk25sg"
|
|
394
395
|
>
|
|
395
396
|
NavLink Four
|
|
396
397
|
</span>
|
|
@@ -409,7 +410,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
409
410
|
class="css-17x5lw"
|
|
410
411
|
>
|
|
411
412
|
<span
|
|
412
|
-
class="css-
|
|
413
|
+
class="css-yk25sg"
|
|
413
414
|
>
|
|
414
415
|
NavLink Five
|
|
415
416
|
</span>
|
|
@@ -428,7 +429,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
428
429
|
class="css-17x5lw"
|
|
429
430
|
>
|
|
430
431
|
<span
|
|
431
|
-
class="css-
|
|
432
|
+
class="css-yk25sg"
|
|
432
433
|
>
|
|
433
434
|
NavLink Six
|
|
434
435
|
</span>
|
|
@@ -446,7 +447,7 @@ exports[`Recommendation render related article page when data is null page 1`] =
|
|
|
446
447
|
/>
|
|
447
448
|
</div>
|
|
448
449
|
<p
|
|
449
|
-
class="css-
|
|
450
|
+
class="css-tiln3q"
|
|
450
451
|
>
|
|
451
452
|
Copyright © 2022 News Corp. All rights reserved.
|
|
452
453
|
</p>
|
|
@@ -4,16 +4,19 @@ import {
|
|
|
4
4
|
Cell,
|
|
5
5
|
Image,
|
|
6
6
|
TextBlock,
|
|
7
|
-
IconFilledKeyboardArrowLeft,
|
|
8
7
|
styled,
|
|
9
8
|
getMediaQueryFromTheme,
|
|
10
9
|
getSizingCssFromTheme,
|
|
10
|
+
toNewsKitIcon,
|
|
11
11
|
} from 'newskit'
|
|
12
12
|
import Head from 'next/head'
|
|
13
13
|
import { NextLink } from '@newskit-render/shared-components'
|
|
14
|
+
import { KeyboardArrowLeft as FilledKeyboardArrowLeft } from '@emotion-icons/material/KeyboardArrowLeft'
|
|
14
15
|
import Layout from '../layout'
|
|
15
16
|
import { headerSize } from '../header'
|
|
16
17
|
|
|
18
|
+
const IconFilledKeyboardArrowLeft = toNewsKitIcon(FilledKeyboardArrowLeft)
|
|
19
|
+
|
|
17
20
|
const cb = (size: string) => ({
|
|
18
21
|
minHeight: `calc(100vh - calc(${size} + 183px))`,
|
|
19
22
|
})
|
|
@@ -5,9 +5,7 @@ import {
|
|
|
5
5
|
Grid,
|
|
6
6
|
Stack,
|
|
7
7
|
Cell,
|
|
8
|
-
AlignSelfValues,
|
|
9
8
|
StackChild,
|
|
10
|
-
Card,
|
|
11
9
|
Divider,
|
|
12
10
|
Visible,
|
|
13
11
|
TitleBar,
|
|
@@ -78,7 +76,7 @@ const Highlights: React.FC<{
|
|
|
78
76
|
<Visible xs lg xl>
|
|
79
77
|
<Divider />
|
|
80
78
|
<Stack>
|
|
81
|
-
<StackChild alignSelf=
|
|
79
|
+
<StackChild alignSelf="center">
|
|
82
80
|
<ViewMoreButton href="/" />
|
|
83
81
|
</StackChild>
|
|
84
82
|
<Divider />
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
Block,
|
|
4
|
-
TitleBar,
|
|
5
|
-
Stack,
|
|
6
|
-
StackChild,
|
|
7
|
-
AlignSelfValues,
|
|
8
|
-
Divider,
|
|
9
|
-
Visible,
|
|
10
|
-
} from 'newskit'
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Block, TitleBar, Stack, StackChild, Divider, Visible } from 'newskit'
|
|
11
3
|
import { useRouter } from 'next/router'
|
|
12
4
|
import ViewMoreButton from '../common/ViewMoreButton'
|
|
13
5
|
import { BasicRow } from '../section/layouts'
|
|
@@ -57,7 +49,7 @@ const RelatedArticles: React.FC<{
|
|
|
57
49
|
<Visible xs lg>
|
|
58
50
|
<Divider />
|
|
59
51
|
<Stack>
|
|
60
|
-
<StackChild alignSelf=
|
|
52
|
+
<StackChild alignSelf="center">
|
|
61
53
|
<ViewMoreButton href={relatedArticlesPath} />
|
|
62
54
|
</StackChild>
|
|
63
55
|
<Divider />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Headline, Block, Divider, Stack, Tag
|
|
2
|
+
import { Headline, Block, Divider, Stack, Tag } from 'newskit'
|
|
3
3
|
import { Topic } from '../../helpers/global-types'
|
|
4
4
|
|
|
5
5
|
const RelatedTopics: React.FC<{
|
|
@@ -35,7 +35,7 @@ const RelatedTopics: React.FC<{
|
|
|
35
35
|
<Block key={link} spaceStack="space040">
|
|
36
36
|
<Tag
|
|
37
37
|
href={link}
|
|
38
|
-
size=
|
|
38
|
+
size="medium"
|
|
39
39
|
overrides={{
|
|
40
40
|
typographyPreset: {
|
|
41
41
|
xs: 'utilityLabel010',
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { ShareBar, toNewsKitIcon } from 'newskit'
|
|
3
|
+
import { Facebook as FilledFacebook } from '@emotion-icons/material/Facebook'
|
|
4
|
+
import { Link as OutlinedLink } from '@emotion-icons/material-outlined/Link'
|
|
5
|
+
import { Email as OutlinedEmail } from '@emotion-icons/material-outlined/Email'
|
|
6
|
+
import { IconFilledTwitter } from '../common/icons/IconFilledTwitter'
|
|
7
|
+
|
|
8
|
+
const IconFilledFacebook = toNewsKitIcon(FilledFacebook)
|
|
9
|
+
const IconOutlinedLink = toNewsKitIcon(OutlinedLink)
|
|
10
|
+
const IconOutlinedEmail = toNewsKitIcon(OutlinedEmail)
|
|
9
11
|
|
|
10
12
|
const ShareBarComponent = () => (
|
|
11
13
|
<ShareBar
|