From 5bbaa59cffa9e7cbe41264b2e3956dd44e22de62 Mon Sep 17 00:00:00 2001 From: Shayne Marc Enzo Ahchoon Date: Mon, 16 Dec 2024 15:48:35 +0000 Subject: [PATCH 02/14] WSTEAM1-HACK:Update --- src/app/components/EasyReadCTA/index.stories.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/components/EasyReadCTA/index.stories.tsx b/src/app/components/EasyReadCTA/index.stories.tsx index f9283c57891..5a9e1934c28 100644 --- a/src/app/components/EasyReadCTA/index.stories.tsx +++ b/src/app/components/EasyReadCTA/index.stories.tsx @@ -1,9 +1,11 @@ import React from 'react'; -import LiteSiteCTA from '.'; +import EasyReadCTA from '.'; -export const Component = () => ; +export const Component = () => ( + +); export default { - title: 'Components/LiteSiteCTA', + title: 'Components/EasyReadCTA', Component, }; From ef0e56a7965e7db3891e0363662ecd82bdb6bf29 Mon Sep 17 00:00:00 2001 From: Shayne Marc Enzo Ahchoon Date: Mon, 16 Dec 2024 17:00:11 +0000 Subject: [PATCH 03/14] WSTEAM1-HACK: Update --- src/app/components/EasyReadCTA/config.tsx | 1 + .../components/EasyReadCTA/index.styles.tsx | 23 ++++++++++++------- src/app/components/EasyReadCTA/index.tsx | 6 +++++ src/app/models/types/translations.ts | 1 + 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/app/components/EasyReadCTA/config.tsx b/src/app/components/EasyReadCTA/config.tsx index c1b4767c42d..8b17283d150 100644 --- a/src/app/components/EasyReadCTA/config.tsx +++ b/src/app/components/EasyReadCTA/config.tsx @@ -2,6 +2,7 @@ export const defaultTranslations = { easyOnboardingMessage: `This is an easy read version of this story.`, standardOnboardingMessage: `There is an easy read version of this article available.`, + aIDisclaimer: `This easy read article has been checked by a journalist. It was created with AI (artificial intelligence) from the standard article. Learn more about easy read.`, toStandardSite: 'Take me to the standard version', toEasySite: 'Take me to the easy read version', informationPageLink: '#', diff --git a/src/app/components/EasyReadCTA/index.styles.tsx b/src/app/components/EasyReadCTA/index.styles.tsx index 2b1bb143b85..354fafd98f8 100644 --- a/src/app/components/EasyReadCTA/index.styles.tsx +++ b/src/app/components/EasyReadCTA/index.styles.tsx @@ -2,11 +2,15 @@ import { css, keyframes, Theme } from '@emotion/react'; import pixelsToRem from '../../utilities/pixelsToRem'; const multicolour = keyframes({ - '0%': { color: '#00FFFF', backgroundColor: '#FFFF00' }, - '25%': { color: '#39FF14', backgroundColor: '#FF1493' }, - '50%': { color: '#FFFF00', backgroundColor: '#00FFFF' }, - '75%': { color: '#FF1493', backgroundColor: '#39FF14' }, - '100%': { color: '#00FFFF', backgroundColor: '#FFFF00' }, + '0%': { backgroundColor: '#00FFFF' }, + '25%': { backgroundColor: '#39FF14' }, + '50%': { backgroundColor: '#FFFF00' }, + '75%': { backgroundColor: '#FF1493' }, +}); + +const changes = keyframes({ + '0%': { backgroundPosition: '0% 50%' }, + '100%': { backgroundPosition: '800% 50%' }, }); const shrinkGrowSpin = keyframes({ @@ -28,16 +32,19 @@ const shrinkGrowSpin = keyframes({ }); export default { - outerContainer: ({ palette, mq, spacings }: Theme) => + outerContainer: ({ mq, spacings }: Theme) => css({ margin: `${spacings.FULL}rem`, - backgroundColor: `${palette.WHITE}`, + background: + 'linear-gradient(90deg, #00FFFF, #39FF14, #E0E722, #FF69B4, #FF0000, #E0E722, #00FFFF, #00FFFF)', + + 'background-size': '800% 800%', border: `${pixelsToRem(25)}rem solid red`, padding: `${pixelsToRem(25)}rem`, [mq.GROUP_2_MIN_WIDTH]: { margin: `${spacings.DOUBLE}rem`, }, - animation: `${multicolour} 0.1s linear infinite`, + animation: `${changes} 2s linear infinite`, }), container: ({ spacings, mq }: Theme) => css({ diff --git a/src/app/components/EasyReadCTA/index.tsx b/src/app/components/EasyReadCTA/index.tsx index b301ce9a277..c4b43494dc7 100644 --- a/src/app/components/EasyReadCTA/index.tsx +++ b/src/app/components/EasyReadCTA/index.tsx @@ -66,6 +66,7 @@ const EasyReadCTA = ({ easyVersionLink, fullVersionLink }: Props) => { toEasySite, easySite, standardSite, + aIDisclaimer, } = easyReadSite; const id = 'LiteSiteCta'; @@ -87,6 +88,11 @@ const EasyReadCTA = ({ easyVersionLink, fullVersionLink }: Props) => { {isEasyVersion ? easyOnboardingMessage : standardOnboardingMessage} + {isEasyVersion && ( + + {aIDisclaimer} + + )} Date: Tue, 17 Dec 2024 16:46:27 +0000 Subject: [PATCH 04/14] WSTEAM1-HACK: Update --- data/news/articles/crkdy3r685jo.json | 15 ++-- data/news/articles/cy0grkwd3zlo.json | 15 ++-- .../components/EasyReadCTAVersion2/config.tsx | 14 ++++ .../EasyReadCTAVersion2/index.stories.tsx | 15 ++++ .../EasyReadCTAVersion2/index.styles.tsx | 51 ++++++++++++ .../EasyReadCTAVersion2/index.test.tsx | 25 ++++++ .../components/EasyReadCTAVersion2/index.tsx | 77 +++++++++++++++++++ src/app/components/icons/index.tsx | 14 ++++ src/app/pages/ArticlePage/ArticlePage.tsx | 5 +- 9 files changed, 213 insertions(+), 18 deletions(-) create mode 100644 src/app/components/EasyReadCTAVersion2/config.tsx create mode 100644 src/app/components/EasyReadCTAVersion2/index.stories.tsx create mode 100644 src/app/components/EasyReadCTAVersion2/index.styles.tsx create mode 100644 src/app/components/EasyReadCTAVersion2/index.test.tsx create mode 100644 src/app/components/EasyReadCTAVersion2/index.tsx diff --git a/data/news/articles/crkdy3r685jo.json b/data/news/articles/crkdy3r685jo.json index 6d7d4913d1f..5e2fc196b22 100644 --- a/data/news/articles/crkdy3r685jo.json +++ b/data/news/articles/crkdy3r685jo.json @@ -2,7 +2,6 @@ "data": { "article": { "metadata": { - "atiAnalytics": { "categoryName": "ADHD~News+presenters~Broadcasting~Learning+disability~Autism~Disability~Television~Journalism~Norway", "contentId": "urn:bbc:optimo:asset:crkdy3r685jo", @@ -714,6 +713,13 @@ }, "position": [1] }, + { + "id": "66204510", + "type": "easyStandardCta", + "model": { + "fullVersionLink": "http://localhost.bbc.com:7080/news/articles/cy0grkwd3zlo" + } + }, { "id": "84a700d7", "type": "image", @@ -874,13 +880,6 @@ }, "position": [4] }, - { - "id": "66204510", - "type": "easyStandardCta", - "model": { - "fullVersionLink": "http://localhost.bbc.com:7080/news/articles/cy0grkwd3zlo" - } - }, { "id": "37f2afbe", "type": "jumpTo", diff --git a/data/news/articles/cy0grkwd3zlo.json b/data/news/articles/cy0grkwd3zlo.json index 18d9f622946..6c6abe1f033 100644 --- a/data/news/articles/cy0grkwd3zlo.json +++ b/data/news/articles/cy0grkwd3zlo.json @@ -551,6 +551,13 @@ }, "position": [1] }, + { + "id": "66204510", + "type": "easyStandardCta", + "model": { + "easyVersionLink": "http://localhost.bbc.com:7080/news/articles/crkdy3r685jo" + } + }, { "id": "6e73d58c", "type": "image", @@ -785,13 +792,7 @@ }, "position": [4] }, - { - "id": "66204510", - "type": "easyStandardCta", - "model": { - "easyVersionLink": "http://localhost.bbc.com:7080/news/articles/crkdy3r685jo" - } - }, + { "id": "83f34b40", "type": "text", diff --git a/src/app/components/EasyReadCTAVersion2/config.tsx b/src/app/components/EasyReadCTAVersion2/config.tsx new file mode 100644 index 00000000000..8e740d5c7d3 --- /dev/null +++ b/src/app/components/EasyReadCTAVersion2/config.tsx @@ -0,0 +1,14 @@ +/* eslint-disable import/prefer-default-export */ +export const defaultTranslations = { + easyOnboardingMessage: `This is an easy read version of this story.`, + standardOnboardingMessage: `There is an easy read version of this article available.`, + aIDisclaimer: `This easy read article has been checked by a journalist. It was created with AI (artificial intelligence) from the standard format.`, + toStandardSite: 'Standard', + toEasySite: 'Easy read', + informationPageLink: '#', + easySite: 'Easy read version', + standardSite: 'Standard version', + learnMore: 'Learn more about easy read', + learnMoreLink: 'https://www.bbc.co.uk/', + format: 'Format', +}; diff --git a/src/app/components/EasyReadCTAVersion2/index.stories.tsx b/src/app/components/EasyReadCTAVersion2/index.stories.tsx new file mode 100644 index 00000000000..b52064f072d --- /dev/null +++ b/src/app/components/EasyReadCTAVersion2/index.stories.tsx @@ -0,0 +1,15 @@ +import React from 'react'; +import EasyReadCTA from '.'; + +export const Component = () => ( + +); + +export const EasyComponent = () => ( + +); + +export default { + title: 'Components/EasyReadCTAVersion2', + Component, +}; diff --git a/src/app/components/EasyReadCTAVersion2/index.styles.tsx b/src/app/components/EasyReadCTAVersion2/index.styles.tsx new file mode 100644 index 00000000000..e9a38157843 --- /dev/null +++ b/src/app/components/EasyReadCTAVersion2/index.styles.tsx @@ -0,0 +1,51 @@ +import { css, Theme } from '@emotion/react'; +import pixelsToRem from '../../utilities/pixelsToRem'; + +export default { + icon: ({ palette, mq }: Theme) => + css({ + color: palette.GREY_10, + fill: 'currentColor', + verticalAlign: 'middle', + width: `${pixelsToRem(14)}rem`, + height: `${pixelsToRem(14)}rem`, + }), + link: ({ spacings }: Theme) => + css({ + display: 'inline-block', + textDecoration: 'none', + borderLeft: `${pixelsToRem(1)}rem solid #AEAEB5`, + padding: `0 0 0 ${spacings.FULL}rem`, + margin: `0 0 0 ${spacings.FULL}rem`, + '&:first-of-type': { + borderLeft: 'none', + margin: '0', + }, + }), + linkText: () => + css({ + textDecoration: 'none', + 'a:visited &': { + color: '#141414', + borderBottom: `${pixelsToRem(1)}rem solid #141414`, + }, + 'a:focus &, a:hover &': { + borderBottom: `${pixelsToRem(2)}rem solid #141414`, + color: '#141414', + }, + }), + selected: () => + css({ + borderBottom: `${pixelsToRem(1)}rem solid #141414`, + }), + disclaimer: ({ spacings }: Theme) => + css({ + margin: ` ${spacings.FULL}rem 0 0 0`, + color: '#545658', + display: 'block', + }), + bottomSpacing: ({ spacings }: Theme) => + css({ + margin: `0 0 ${spacings.QUADRUPLE}rem 0`, + }), +}; diff --git a/src/app/components/EasyReadCTAVersion2/index.test.tsx b/src/app/components/EasyReadCTAVersion2/index.test.tsx new file mode 100644 index 00000000000..b096552d838 --- /dev/null +++ b/src/app/components/EasyReadCTAVersion2/index.test.tsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { render } from '../react-testing-library-with-providers'; +import EasyReadCTA from '.'; + +describe('LiteSiteCTA', () => { + it('Should have a hidden strong element with lite site identifier.', () => { + const { container } = render( + , + ); + const strongText = container.querySelector('strong'); + expect(strongText?.innerHTML).toBe('Easy read version'); + expect(strongText).toHaveAttribute('hidden'); + }); + it('Should have a CTA link to the main site.', () => { + const { container } = render( + , + ); + const [ctaText] = container.querySelectorAll('a span'); + const [ctaLink] = container.querySelectorAll( + 'a[href="https://www.test.bbc.com/news/articles/c0g992jmmkko"]', + ); + expect(ctaText?.innerHTML).toBe('Take me to the standard version'); + expect(ctaLink).toBeTruthy(); + }); +}); diff --git a/src/app/components/EasyReadCTAVersion2/index.tsx b/src/app/components/EasyReadCTAVersion2/index.tsx new file mode 100644 index 00000000000..a2fe24d55d4 --- /dev/null +++ b/src/app/components/EasyReadCTAVersion2/index.tsx @@ -0,0 +1,77 @@ +/** @jsx jsx */ +import { useContext } from 'react'; +import { jsx } from '@emotion/react'; +import Text from '../Text'; +import { ServiceContext } from '../../contexts/ServiceContext'; +import styles from './index.styles'; +import { defaultTranslations } from './config'; +import InlineLink from '../InlineLink'; +import { FormatIcon } from '../icons'; + +type CtaLinkProps = { + href: string; + text: string; + ignoreLiteExtension?: boolean; + className?: string; + selected?: boolean; +}; + +const CtaLink = ({ href, text, className, selected = false }: CtaLinkProps) => { + return ( + + + {text} + + + ); +}; + +type Props = { + easyVersionLink?: string; + fullVersionLink?: string; +}; + +const EasyReadCTA = ({ easyVersionLink, fullVersionLink }: Props) => { + const isEasyVersion = fullVersionLink != null; + + const { translations } = useContext(ServiceContext); + + const { easyReadSite = defaultTranslations } = translations; + const { + toStandardSite, + toEasySite, + format, + aIDisclaimer, + learnMore, + learnMoreLink, + } = easyReadSite; + + const id = 'Format'; + const href = isEasyVersion ? fullVersionLink : easyVersionLink; + if (href == null) return null; + + return ( +
+
+ + + + +
+ {isEasyVersion && ( + + {aIDisclaimer} . + + )} +
+ ); +}; + +export default EasyReadCTA; diff --git a/src/app/components/icons/index.tsx b/src/app/components/icons/index.tsx index cca09bb311a..8770a102b85 100644 --- a/src/app/components/icons/index.tsx +++ b/src/app/components/icons/index.tsx @@ -11,6 +11,20 @@ export const Ellipsis = () => ( ); + +export const FormatIcon = ({ className }: { className?: string }) => ( + +); + export const LeftChevron = ({ className }: { className?: string }) => ( { jumpToVariation === 'on' ? ( ) : null, - easyStandardCta: EasyReadCTA, + easyStandardCta: EasyReadCTAVersion2, }; const visuallyHiddenBlock = { From 4451fb953d0c22aeba0f5064ef7d86eb05134706 Mon Sep 17 00:00:00 2001 From: Shayne Marc Enzo Ahchoon Date: Wed, 18 Dec 2024 11:32:16 +0000 Subject: [PATCH 05/14] WSTEAM1-HACK: Update --- .../components/EasyReadCTAVersion2/config.tsx | 5 -- .../EasyReadCTAVersion2/index.styles.tsx | 40 ++++++++++----- .../components/EasyReadCTAVersion2/index.tsx | 49 ++++++++++++------- src/app/models/types/translations.ts | 10 ++-- 4 files changed, 61 insertions(+), 43 deletions(-) diff --git a/src/app/components/EasyReadCTAVersion2/config.tsx b/src/app/components/EasyReadCTAVersion2/config.tsx index 8e740d5c7d3..27404ad76be 100644 --- a/src/app/components/EasyReadCTAVersion2/config.tsx +++ b/src/app/components/EasyReadCTAVersion2/config.tsx @@ -1,13 +1,8 @@ /* eslint-disable import/prefer-default-export */ export const defaultTranslations = { - easyOnboardingMessage: `This is an easy read version of this story.`, - standardOnboardingMessage: `There is an easy read version of this article available.`, aIDisclaimer: `This easy read article has been checked by a journalist. It was created with AI (artificial intelligence) from the standard format.`, toStandardSite: 'Standard', toEasySite: 'Easy read', - informationPageLink: '#', - easySite: 'Easy read version', - standardSite: 'Standard version', learnMore: 'Learn more about easy read', learnMoreLink: 'https://www.bbc.co.uk/', format: 'Format', diff --git a/src/app/components/EasyReadCTAVersion2/index.styles.tsx b/src/app/components/EasyReadCTAVersion2/index.styles.tsx index e9a38157843..7eae9667129 100644 --- a/src/app/components/EasyReadCTAVersion2/index.styles.tsx +++ b/src/app/components/EasyReadCTAVersion2/index.styles.tsx @@ -2,7 +2,7 @@ import { css, Theme } from '@emotion/react'; import pixelsToRem from '../../utilities/pixelsToRem'; export default { - icon: ({ palette, mq }: Theme) => + icon: ({ palette }: Theme) => css({ color: palette.GREY_10, fill: 'currentColor', @@ -10,20 +10,18 @@ export default { width: `${pixelsToRem(14)}rem`, height: `${pixelsToRem(14)}rem`, }), - link: ({ spacings }: Theme) => + linkContainer: ({ spacings }: Theme) => css({ - display: 'inline-block', textDecoration: 'none', - borderLeft: `${pixelsToRem(1)}rem solid #AEAEB5`, - padding: `0 0 0 ${spacings.FULL}rem`, - margin: `0 0 0 ${spacings.FULL}rem`, - '&:first-of-type': { + display: 'inline-block', + padding: `${spacings.FULL}rem 0 ${spacings.DOUBLE}rem 0`, + '&:first-of-type span': { borderLeft: 'none', - margin: '0', }, }), linkText: () => css({ + display: 'inline-block', textDecoration: 'none', 'a:visited &': { color: '#141414', @@ -34,18 +32,34 @@ export default { color: '#141414', }, }), + linkTextContainer: ({ spacings }: Theme) => + css({ + textDecoration: 'none', + display: 'inline-block', + borderLeft: `${pixelsToRem(1)}rem solid #AEAEB5`, + padding: `0 ${spacings.FULL}rem`, + }), selected: () => css({ - borderBottom: `${pixelsToRem(1)}rem solid #141414`, + borderBottom: `${pixelsToRem(2)}rem solid #141414`, + }), + notSelected: () => + css({ + margin: `0 0 ${pixelsToRem(2)}rem 0`, + 'a:visited &': { + margin: `0 0 ${pixelsToRem(1)}rem 0`, + }, + 'a:focus &, a:hover &': { + margin: `0`, + }, }), - disclaimer: ({ spacings }: Theme) => + disclaimer: () => css({ - margin: ` ${spacings.FULL}rem 0 0 0`, color: '#545658', display: 'block', }), - bottomSpacing: ({ spacings }: Theme) => + outerContainer: ({ spacings }: Theme) => css({ - margin: `0 0 ${spacings.QUADRUPLE}rem 0`, + padding: `0 0 ${spacings.TRIPLE}rem 0`, }), }; diff --git a/src/app/components/EasyReadCTAVersion2/index.tsx b/src/app/components/EasyReadCTAVersion2/index.tsx index a2fe24d55d4..b50fcbd9d8b 100644 --- a/src/app/components/EasyReadCTAVersion2/index.tsx +++ b/src/app/components/EasyReadCTAVersion2/index.tsx @@ -1,6 +1,7 @@ /** @jsx jsx */ import { useContext } from 'react'; import { jsx } from '@emotion/react'; +import { GridItemMedium } from '#app/legacy/components/Grid'; import Text from '../Text'; import { ServiceContext } from '../../contexts/ServiceContext'; import styles from './index.styles'; @@ -21,12 +22,20 @@ const CtaLink = ({ href, text, className, selected = false }: CtaLinkProps) => { - - {text} - + + + {text} + + ); }; @@ -56,21 +65,23 @@ const EasyReadCTA = ({ easyVersionLink, fullVersionLink }: Props) => { if (href == null) return null; return ( -
-
- - - - -
- {isEasyVersion && ( - - {aIDisclaimer} . - - )} -
+ +
+
+ + + + +
+ {isEasyVersion && ( + + {aIDisclaimer} . + + )} +
+
); }; diff --git a/src/app/models/types/translations.ts b/src/app/models/types/translations.ts index 4c0e76186ef..37bf3685a95 100644 --- a/src/app/models/types/translations.ts +++ b/src/app/models/types/translations.ts @@ -27,14 +27,12 @@ export interface Translations { dataSaving: string; }; easyReadSite?: { - aIDisclaimer: string; - easyOnboardingMessage: string; - standardOnboardingMessage: string; toStandardSite: string; toEasySite: string; - informationPageLink: string; - easySite: string; - standardSite: string; + format: string; + aIDisclaimer: string; + learnMore: string; + learnMoreLink: string; }; mediaAssetPage: { mediaPlayer: string; From 2e95b058e9f40c9c7041b0b860cdad6afc6757a7 Mon Sep 17 00:00:00 2001 From: Shayne Marc Enzo Ahchoon Date: Wed, 18 Dec 2024 16:00:42 +0000 Subject: [PATCH 06/14] WSTEAM1-HACK: Upadte --- data/news/articles/crkdy3r685jo.json | 4 +- data/news/articles/cy0grkwd3zlo.json | 37 ++++++++++- .../EasyReadCTAVersion2/index.stories.tsx | 4 +- .../EasyReadCTAVersion2/index.styles.tsx | 7 +- .../EasyReadCTAVersion2/index.test.tsx | 24 ++++--- .../components/EasyReadCTAVersion2/index.tsx | 66 ++++++++++++------- .../psammead/psammead-headings/src/index.jsx | 6 +- src/app/models/types/optimo.ts | 7 ++ src/app/pages/ArticlePage/ArticlePage.tsx | 33 +++++++++- 9 files changed, 141 insertions(+), 47 deletions(-) diff --git a/data/news/articles/crkdy3r685jo.json b/data/news/articles/crkdy3r685jo.json index 5e2fc196b22..ab9186896bc 100644 --- a/data/news/articles/crkdy3r685jo.json +++ b/data/news/articles/crkdy3r685jo.json @@ -715,9 +715,9 @@ }, { "id": "66204510", - "type": "easyStandardCta", + "type": "easyReadMeta", "model": { - "fullVersionLink": "http://localhost.bbc.com:7080/news/articles/cy0grkwd3zlo" + "originalAssetId": "cy0grkwd3zlo" } }, { diff --git a/data/news/articles/cy0grkwd3zlo.json b/data/news/articles/cy0grkwd3zlo.json index 6c6abe1f033..053b653a8b7 100644 --- a/data/news/articles/cy0grkwd3zlo.json +++ b/data/news/articles/cy0grkwd3zlo.json @@ -552,10 +552,41 @@ "position": [1] }, { - "id": "66204510", - "type": "easyStandardCta", + "type": "easyRead", "model": { - "easyVersionLink": "http://localhost.bbc.com:7080/news/articles/crkdy3r685jo" + "hasBeenReviewed": true, + "suitableForAbridgement": false, + "blocks": [ + { + "type": "text", + "model": { + "blocks": [ + { + "type": "paragraph", + "model": { + "text": "Fancy wording", + "blocks": [ + { + "type": "fragment", + "model": { + "text": "Fancy wording", + "attributes": [] + } + } + ] + } + } + ] + } + }, + { + "type": "easyReadMeta", + "model": { + "easyReadAssetId": "crkdy3r685jo", + "originalAssetId": "cy0grkwd3zlo" + } + } + ] } }, { diff --git a/src/app/components/EasyReadCTAVersion2/index.stories.tsx b/src/app/components/EasyReadCTAVersion2/index.stories.tsx index b52064f072d..64e4f21ee26 100644 --- a/src/app/components/EasyReadCTAVersion2/index.stories.tsx +++ b/src/app/components/EasyReadCTAVersion2/index.stories.tsx @@ -2,11 +2,11 @@ import React from 'react'; import EasyReadCTA from '.'; export const Component = () => ( - + ); export const EasyComponent = () => ( - + ); export default { diff --git a/src/app/components/EasyReadCTAVersion2/index.styles.tsx b/src/app/components/EasyReadCTAVersion2/index.styles.tsx index 7eae9667129..5df2ac66995 100644 --- a/src/app/components/EasyReadCTAVersion2/index.styles.tsx +++ b/src/app/components/EasyReadCTAVersion2/index.styles.tsx @@ -53,13 +53,10 @@ export default { margin: `0`, }, }), - disclaimer: () => + disclaimer: ({ spacings }: Theme) => css({ + padding: `0 0 ${spacings.TRIPLE}rem 0`, color: '#545658', display: 'block', }), - outerContainer: ({ spacings }: Theme) => - css({ - padding: `0 0 ${spacings.TRIPLE}rem 0`, - }), }; diff --git a/src/app/components/EasyReadCTAVersion2/index.test.tsx b/src/app/components/EasyReadCTAVersion2/index.test.tsx index b096552d838..53644234ea0 100644 --- a/src/app/components/EasyReadCTAVersion2/index.test.tsx +++ b/src/app/components/EasyReadCTAVersion2/index.test.tsx @@ -5,21 +5,27 @@ import EasyReadCTA from '.'; describe('LiteSiteCTA', () => { it('Should have a hidden strong element with lite site identifier.', () => { const { container } = render( - , + , ); const strongText = container.querySelector('strong'); - expect(strongText?.innerHTML).toBe('Easy read version'); + expect(strongText?.innerHTML).toBe('Format'); expect(strongText).toHaveAttribute('hidden'); }); - it('Should have a CTA link to the main site.', () => { + + it('Should have a CTA link to the easy site.', () => { const { container } = render( - , + , ); - const [ctaText] = container.querySelectorAll('a span'); - const [ctaLink] = container.querySelectorAll( - 'a[href="https://www.test.bbc.com/news/articles/c0g992jmmkko"]', + const [ctaText] = container.querySelectorAll( + 'a[href="/news/articles/crkdy3r685jo"] span span', ); - expect(ctaText?.innerHTML).toBe('Take me to the standard version'); - expect(ctaLink).toBeTruthy(); + + expect(ctaText?.innerHTML).toBe('Easy read'); }); }); diff --git a/src/app/components/EasyReadCTAVersion2/index.tsx b/src/app/components/EasyReadCTAVersion2/index.tsx index b50fcbd9d8b..e99e3d37f1a 100644 --- a/src/app/components/EasyReadCTAVersion2/index.tsx +++ b/src/app/components/EasyReadCTAVersion2/index.tsx @@ -2,6 +2,7 @@ import { useContext } from 'react'; import { jsx } from '@emotion/react'; import { GridItemMedium } from '#app/legacy/components/Grid'; +import { RequestContext } from '#app/contexts/RequestContext'; import Text from '../Text'; import { ServiceContext } from '../../contexts/ServiceContext'; import styles from './index.styles'; @@ -17,6 +18,15 @@ type CtaLinkProps = { selected?: boolean; }; +export const createHrefRelativeToPage = (currentPath: string, id?: string) => { + const noExtenstionPath = currentPath.split('.')[0]; + const slugs = noExtenstionPath.split('/'); + const idToAppend = id ?? slugs[slugs.length - 1]; + slugs.splice(-1, 1, idToAppend); + + return slugs.join('/').replace(' ', ''); +}; + const CtaLink = ({ href, text, className, selected = false }: CtaLinkProps) => { return ( { }; type Props = { - easyVersionLink?: string; - fullVersionLink?: string; + easyReadAssetId?: string; + originalAssetId?: string; }; -const EasyReadCTA = ({ easyVersionLink, fullVersionLink }: Props) => { - const isEasyVersion = fullVersionLink != null; - +const EasyReadCTA = ({ easyReadAssetId, originalAssetId }: Props) => { + const { pathname } = useContext(RequestContext); const { translations } = useContext(ServiceContext); + if (easyReadAssetId == null && originalAssetId == null) { + return null; + } + + const easyHref = createHrefRelativeToPage(pathname, easyReadAssetId); + const originalHref = createHrefRelativeToPage(pathname, originalAssetId); + + const isEasyActive = easyReadAssetId == null; + const { easyReadSite = defaultTranslations } = translations; const { toStandardSite, @@ -61,26 +79,30 @@ const EasyReadCTA = ({ easyVersionLink, fullVersionLink }: Props) => { } = easyReadSite; const id = 'Format'; - const href = isEasyVersion ? fullVersionLink : easyVersionLink; - if (href == null) return null; return ( -
-
- - - - -
- {isEasyVersion && ( - - {aIDisclaimer} . - - )} -
+
+ + + + +
+ {isEasyActive && ( + + {aIDisclaimer} . + + )}
); }; diff --git a/src/app/legacy/psammead/psammead-headings/src/index.jsx b/src/app/legacy/psammead/psammead-headings/src/index.jsx index 5f5b576fd87..5018db651ad 100644 --- a/src/app/legacy/psammead/psammead-headings/src/index.jsx +++ b/src/app/legacy/psammead/psammead-headings/src/index.jsx @@ -23,9 +23,11 @@ export const Headline = styled.h1` theme.isDarkUi ? theme.palette.GREY_2 : theme.palette.GREY_10}; display: block; /* Explicitly set */ margin: 0; /* Reset */ - padding: ${GEL_SPACING_QUAD} 0; + padding: ${GEL_SPACING_QUAD} 0 + ${slimPadding => (slimPadding ? GEL_SPACING_TRPL : GEL_SPACING_QUAD)} 0; ${MEDIA_QUERY_TYPOGRAPHY.LAPTOP_AND_LARGER} { - padding: ${GEL_SPACING_QUIN} 0; + padding: ${GEL_SPACING_QUIN} 0 + ${slimPadding => (slimPadding ? GEL_SPACING_QUAD : GEL_SPACING_QUIN)} 0; } `; diff --git a/src/app/models/types/optimo.ts b/src/app/models/types/optimo.ts index 98973e6f00a..1a86313c760 100644 --- a/src/app/models/types/optimo.ts +++ b/src/app/models/types/optimo.ts @@ -41,6 +41,13 @@ export type OptimoAltTextBlock = { }; }; +export type EasyReadMetaBlock = { + type: 'easyRead'; + model: { + blocks: OptimoBlock[]; + }; +}; + export type OptimoBylineContributorMetadataBlock = { type: 'name' | 'role' | 'link' | 'location' | 'images'; model: { diff --git a/src/app/pages/ArticlePage/ArticlePage.tsx b/src/app/pages/ArticlePage/ArticlePage.tsx index 3ec2753508a..8e3cd6ade4d 100644 --- a/src/app/pages/ArticlePage/ArticlePage.tsx +++ b/src/app/pages/ArticlePage/ArticlePage.tsx @@ -37,7 +37,11 @@ import RelatedTopics from '#containers/RelatedTopics'; import NielsenAnalytics from '#containers/NielsenAnalytics'; import CpsRecommendations from '#containers/CpsRecommendations'; import InlinePodcastPromo from '#containers/PodcastPromo/Inline'; -import { Article, OptimoBylineBlock } from '#app/models/types/optimo'; +import { + Article, + EasyReadMetaBlock, + OptimoBylineBlock, +} from '#app/models/types/optimo'; import ScrollablePromo from '#components/ScrollablePromo'; import JumpTo, { JumpToProps } from '#app/components/JumpTo'; import useOptimizelyVariation from '#app/hooks/useOptimizelyVariation'; @@ -80,6 +84,31 @@ import { const ArticlePage = ({ pageData }: { pageData: Article }) => { const { isApp, pageType, service, isAmp, env } = useContext(RequestContext); + // SHOULD MOVE TO REQUEST CONTEXT + const easyMetaBlock = pageData.content.model.blocks.find( + block => block.type === 'easyReadMeta', + ); + const isEasyPage = easyMetaBlock != null; + + // MOVE TO BFF + if (!isEasyPage) { + const easyReadStandardBlockIndex = pageData.content.model.blocks.findIndex( + block => block.type === 'easyRead', + ); + if (easyReadStandardBlockIndex) { + const { blocks } = pageData.content.model; + const { + model: { blocks: standardMetaBlock }, + } = blocks[easyReadStandardBlockIndex] as EasyReadMetaBlock; + const metaBlock = standardMetaBlock.find( + block => block.type === 'easyReadMeta', + ); + if (metaBlock) { + blocks.splice(1, easyReadStandardBlockIndex, metaBlock); + } + } + } + const { articleAuthor, isTrustProjectParticipant, @@ -242,7 +271,7 @@ const ArticlePage = ({ pageData }: { pageData: Article }) => { jumpToVariation === 'on' ? ( ) : null, - easyStandardCta: EasyReadCTAVersion2, + easyReadMeta: EasyReadCTAVersion2, }; const visuallyHiddenBlock = { From fd0deea7320a5a448d211bc54c8b077518df3aa3 Mon Sep 17 00:00:00 2001 From: emilysaffron Date: Wed, 18 Dec 2024 16:32:40 +0000 Subject: [PATCH 07/14] add translations for afrique --- src/app/lib/config/services/afrique.ts | 12 ++++++++++++ src/app/models/types/translations.ts | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/src/app/lib/config/services/afrique.ts b/src/app/lib/config/services/afrique.ts index 76641871b0a..e53cab950fb 100644 --- a/src/app/lib/config/services/afrique.ts +++ b/src/app/lib/config/services/afrique.ts @@ -63,6 +63,18 @@ export const service: DefaultServiceConfig = { relatedContent: 'Lire plus', relatedTopics: 'Sujets associés', navMenuText: 'Rubriques', + easyReadSite: { + easyOnboardingMessage: `This is an easy read version of this story.`, + standardOnboardingMessage: `There is an easy read version of this article available.`, + toStandardSite: 'Version standard ', + toEasySite: 'Version facile à lire', + easySite: 'Facile à lire', + standardSite: 'Standard', + format: 'Format', + aIDisclaimer: `Cet article en version facile à lire et à comprendre a été vérifié par un journaliste. Il a été créé avec l'IA (intelligence artificielle) à partir de la version originale. En savoir plus sur la version facile à lire et à comprendre`, + learnMore: 'Learn more about easy read', + learnMoreLink: 'https://www.bbc.co.uk/', + }, mediaAssetPage: { mediaPlayer: 'Lecteur média', audioPlayer: 'Lecteur audio', diff --git a/src/app/models/types/translations.ts b/src/app/models/types/translations.ts index 37bf3685a95..43276304932 100644 --- a/src/app/models/types/translations.ts +++ b/src/app/models/types/translations.ts @@ -27,8 +27,12 @@ export interface Translations { dataSaving: string; }; easyReadSite?: { + easyOnboardingMessage: string; + standardOnboardingMessage: string; toStandardSite: string; toEasySite: string; + easySite: string; + standardSite: string; format: string; aIDisclaimer: string; learnMore: string; From 8b4347e134f97ded0328789c7bddf64213a40e0e Mon Sep 17 00:00:00 2001 From: emilysaffron Date: Wed, 18 Dec 2024 16:38:15 +0000 Subject: [PATCH 08/14] seo title --- src/app/pages/ArticlePage/ArticlePage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/ArticlePage/ArticlePage.tsx b/src/app/pages/ArticlePage/ArticlePage.tsx index 03e6c14d3f1..68953e82064 100644 --- a/src/app/pages/ArticlePage/ArticlePage.tsx +++ b/src/app/pages/ArticlePage/ArticlePage.tsx @@ -270,7 +270,7 @@ const ArticlePage = ({ pageData }: { pageData: Article }) => { Date: Wed, 18 Dec 2024 17:55:09 +0000 Subject: [PATCH 09/14] WSTEAM1-HACK --- data/afrique/articles/c023vz8qn6ro.json | 1767 +++++++++++++++++ data/afrique/articles/c161g3y596go.json | 1093 ++++++++++ src/app/components/EasyReadCTA/config.tsx | 14 +- .../components/EasyReadCTA/index.stories.tsx | 8 +- .../components/EasyReadCTA/index.styles.tsx | 149 +- src/app/components/EasyReadCTA/index.test.tsx | 24 +- src/app/components/EasyReadCTA/index.tsx | 137 +- .../components/EasyReadCTAVersion2/config.tsx | 9 - .../EasyReadCTAVersion2/index.stories.tsx | 15 - .../EasyReadCTAVersion2/index.styles.tsx | 62 - .../EasyReadCTAVersion2/index.test.tsx | 31 - .../components/EasyReadCTAVersion2/index.tsx | 110 - src/app/pages/ArticlePage/ArticlePage.tsx | 65 +- 13 files changed, 3057 insertions(+), 427 deletions(-) create mode 100644 data/afrique/articles/c023vz8qn6ro.json create mode 100644 data/afrique/articles/c161g3y596go.json delete mode 100644 src/app/components/EasyReadCTAVersion2/config.tsx delete mode 100644 src/app/components/EasyReadCTAVersion2/index.stories.tsx delete mode 100644 src/app/components/EasyReadCTAVersion2/index.styles.tsx delete mode 100644 src/app/components/EasyReadCTAVersion2/index.test.tsx delete mode 100644 src/app/components/EasyReadCTAVersion2/index.tsx diff --git a/data/afrique/articles/c023vz8qn6ro.json b/data/afrique/articles/c023vz8qn6ro.json new file mode 100644 index 00000000000..c89f4f91f8a --- /dev/null +++ b/data/afrique/articles/c023vz8qn6ro.json @@ -0,0 +1,1767 @@ +{ + "data": { + "article": { + "metadata": { + "atiAnalytics": { + "categoryName": null, + "contentId": "urn:bbc:optimo:asset:c023vz8qn6ro", + "contentType": "article", + "language": "fr", + "ldpThingIds": null, + "ldpThingLabels": null, + "nationsProducer": null, + "pageIdentifier": "afrique.articles.c023vz8qn6ro.page", + "pageTitle": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "timePublished": "2024-12-18T16:56:09.019Z", + "timeUpdated": "2024-12-18T16:56:09.019Z" + }, + "id": "urn:bbc:ares::article:c023vz8qn6ro", + "locators": { + "optimoUrn": "urn:bbc:optimo:asset:c023vz8qn6ro", + "canonicalUrl": "https://www.bbc.com/afrique/articles/c023vz8qn6ro" + }, + "type": "article", + "createdBy": "Afrique", + "language": "fr", + "firstPublished": 1734540969019, + "lastPublished": 1734540969019, + "options": { "includeComments": false }, + "analyticsLabels": { + "contentId": "urn:bbc:optimo:asset:c023vz8qn6ro", + "producer": "Afrique", + "page": "afrique.articles.c023vz8qn6ro.page", + "irisKeyword": null + }, + "passport": { + "language": "fr", + "home": "http://www.bbc.co.uk/ontologies/passport/home/Afrique", + "taggings": [ + { + "predicate": "http://www.bbc.co.uk/ontologies/bbc/infoClass", + "value": "http://www.bbc.co.uk/things/0db2b959-cbf8-4661-965f-050974a69bb5#id" + }, + { + "predicate": "http://www.bbc.co.uk/ontologies/bbc/assetType", + "value": "http://www.bbc.co.uk/things/22ea958e-2004-4f34-80a7-bf5acad52f6f#id" + } + ], + "predicates": { + "infoClass": [ + { + "value": "http://www.bbc.co.uk/things/0db2b959-cbf8-4661-965f-050974a69bb5#id", + "type": "infoClass" + } + ], + "assetType": [ + { + "value": "http://www.bbc.co.uk/things/22ea958e-2004-4f34-80a7-bf5acad52f6f#id", + "type": "assetType" + } + ] + } + }, + "blockTypes": [ + "headline", + "text", + "paragraph", + "fragment", + "easyRead", + "easyReadMeta" + ], + "includeComments": false, + "consumableAsSFV": false, + "allowAdvertising": true, + "consumableOnRedButton": false, + "consumableOnlyOnRedButton": false, + "breakingNews": { "isBreaking": false }, + "useSensitiveOnwardJourneys": false, + "stats": { "readTime": 4, "wordCount": 979 }, + "isTransliterated": false + }, + "content": { + "model": { + "blocks": [ + { + "id": "d9c4e187", + "type": "headline", + "model": { + "blocks": [ + { + "id": "6deed636", + "type": "text", + "model": { + "blocks": [ + { + "id": "f14780ba", + "type": "paragraph", + "model": { + "text": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "blocks": [ + { + "id": "e4886717", + "type": "fragment", + "model": { + "text": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "attributes": [] + }, + "position": [1, 1, 1, 1] + } + ] + }, + "position": [1, 1, 1] + } + ] + }, + "position": [1, 1] + } + ] + }, + "position": [1] + }, + { + "id": "5f51fb3e", + "type": "timestamp", + "model": { + "firstPublished": 1734540969019, + "lastPublished": 1734540969019 + }, + "position": [2] + }, + { + "id": "78bb26aa", + "type": "text", + "model": { + "blocks": [ + { + "id": "f0d24ca1", + "type": "paragraph", + "model": { + "text": "Si l'idée de passer un examen vous effraie - que ce soit à l'école, à l'université ou pour une promotion au travail - vous n'êtes pas seul.", + "blocks": [ + { + "id": "1d0e3149", + "type": "fragment", + "model": { + "text": "Si l'idée de passer un examen vous effraie - que ce soit à l'école, à l'université ou pour une promotion au travail - vous n'êtes pas seul.", + "attributes": [] + }, + "position": [3, 1, 1] + } + ] + }, + "position": [3, 1] + }, + { + "id": "8c264693", + "type": "paragraph", + "model": { + "text": "Retenir des informations, surtout lorsqu'il s'agit de sujets complexes, est une tâche difficile, même pour les personnes dotées d'une grande intelligence et d'une mémoire prodigieuse.", + "blocks": [ + { + "id": "73eeded9", + "type": "fragment", + "model": { + "text": "Retenir des informations, surtout lorsqu'il s'agit de sujets complexes, est une tâche difficile, même pour les personnes dotées d'une grande intelligence et d'une mémoire prodigieuse.", + "attributes": [] + }, + "position": [3, 2, 1] + } + ] + }, + "position": [3, 2] + }, + { + "id": "c294e13e", + "type": "paragraph", + "model": { + "text": "Cependant, une méthode simple mise au point par le scientifique américain Richard Feynman (1918-1988), lauréat du prix Nobel de physique, s'est révélée être un outil utile pour étudier presque n'importe quoi.", + "blocks": [ + { + "id": "b9074ebd", + "type": "fragment", + "model": { + "text": "Cependant, une méthode simple mise au point par le scientifique américain Richard Feynman (1918-1988), lauréat du prix Nobel de physique, s'est révélée être un outil utile pour étudier presque n'importe quoi.", + "attributes": [] + }, + "position": [3, 3, 1] + } + ] + }, + "position": [3, 3] + }, + { + "id": "1c825715", + "type": "paragraph", + "model": { + "text": "Le physicien - célèbre pour ses contributions importantes au domaine de la mécanique quantique et de la physique des particules - a créé sa technique d'étude afin d'améliorer sa propre compréhension et de transmettre ses connaissances à ses étudiants.", + "blocks": [ + { + "id": "6d191a04", + "type": "fragment", + "model": { + "text": "Le physicien - célèbre pour ses contributions importantes au domaine de la mécanique quantique et de la physique des particules - a créé sa technique d'étude afin d'améliorer sa propre compréhension et de transmettre ses connaissances à ses étudiants.", + "attributes": [] + }, + "position": [3, 4, 1] + } + ] + }, + "position": [3, 4] + } + ] + }, + "position": [3] + }, + { "id": "cffb035e", "type": "mpu", "model": {}, "position": [4] }, + { + "id": "48f1ed83", + "type": "text", + "model": { + "blocks": [ + { + "id": "d73c9e37", + "type": "paragraph", + "model": { + "text": "A lire aussi sur BBC Afrique :", + "blocks": [ + { + "id": "0d0bd4dc", + "type": "fragment", + "model": { + "text": "A lire aussi sur BBC Afrique :", + "attributes": [] + }, + "position": [5, 1, 1] + } + ] + }, + "position": [5, 1] + } + ] + }, + "position": [5] + }, + { + "id": "50dd995d", + "type": "wsoj", + "model": { "type": "recommendations" }, + "position": [6] + }, + { + "id": "4f5626a9", + "type": "text", + "model": { + "blocks": [ + { + "id": "c61fa021", + "type": "paragraph", + "model": { + "text": "Qui est Abdon Atangana, le Camerounais qui veut décoloniser les Mathématiques ?", + "blocks": [ + { + "id": "12f03506", + "type": "fragment", + "model": { + "text": "Qui est Abdon Atangana, le Camerounais qui veut décoloniser les Mathématiques ?", + "attributes": [] + }, + "position": [7, 1, 1] + } + ] + }, + "position": [7, 1] + }, + { + "id": "57508f44", + "type": "paragraph", + "model": { + "text": "10 juillet 2023", + "blocks": [ + { + "id": "b53c3d24", + "type": "fragment", + "model": { + "text": "10 juillet 2023", + "attributes": [] + }, + "position": [7, 2, 1] + } + ] + }, + "position": [7, 2] + } + ] + }, + "position": [7] + }, + { + "id": "ab565825", + "type": "podcastPromo", + "model": { "type": "podcastPromo" }, + "position": [8] + }, + { + "id": "c41c5afe", + "type": "text", + "model": { + "blocks": [ + { + "id": "49fd01d1", + "type": "paragraph", + "model": { + "text": "5 leçons des pays champions dans l'enseignement des mathématiques", + "blocks": [ + { + "id": "f6cb7e5b", + "type": "fragment", + "model": { + "text": "5 leçons des pays champions dans l'enseignement des mathématiques", + "attributes": [] + }, + "position": [9, 1, 1] + } + ] + }, + "position": [9, 1] + }, + { + "id": "69707e99", + "type": "paragraph", + "model": { + "text": "20 octobre 2024", + "blocks": [ + { + "id": "796d6786", + "type": "fragment", + "model": { + "text": "20 octobre 2024", + "attributes": [] + }, + "position": [9, 2, 1] + } + ] + }, + "position": [9, 2] + }, + { + "id": "06283be7", + "type": "paragraph", + "model": { + "text": "Quel est le « problème du secrétaire » et comment il peut vous aider à mieux choisir", + "blocks": [ + { + "id": "56ad2cf7", + "type": "fragment", + "model": { + "text": "Quel est le « problème du secrétaire » et comment il peut vous aider à mieux choisir", + "attributes": [] + }, + "position": [9, 3, 1] + } + ] + }, + "position": [9, 3] + }, + { + "id": "2349b2b4", + "type": "paragraph", + "model": { + "text": "20 octobre 2024", + "blocks": [ + { + "id": "ac13dcc3", + "type": "fragment", + "model": { + "text": "20 octobre 2024", + "attributes": [] + }, + "position": [9, 4, 1] + } + ] + }, + "position": [9, 4] + }, + { + "id": "7082b6a6", + "type": "paragraph", + "model": { + "text": "La clé de cette méthode, qu'il a développée de manière informelle lorsqu'il était lui-même étudiant, est de ramener les idées complexes à la réalité et d'essayer de les expliquer simplement.", + "blocks": [ + { + "id": "b3f5642f", + "type": "fragment", + "model": { + "text": "La clé de cette méthode, qu'il a développée de manière informelle lorsqu'il était lui-même étudiant, est de ramener les idées complexes à la réalité et d'essayer de les expliquer simplement.", + "attributes": [] + }, + "position": [9, 5, 1] + } + ] + }, + "position": [9, 5] + }, + { + "id": "aa3ccaa5", + "type": "paragraph", + "model": { + "text": "Au lieu de mémoriser des concepts, cette méthode vous aide à vous impliquer activement dans le matériel d'étude, à comprendre les idées en profondeur et à les appliquer efficacement.", + "blocks": [ + { + "id": "4dcb60d9", + "type": "fragment", + "model": { + "text": "Au lieu de mémoriser des concepts, cette méthode vous aide à vous impliquer activement dans le matériel d'étude, à comprendre les idées en profondeur et à les appliquer efficacement.", + "attributes": [] + }, + "position": [9, 6, 1] + } + ] + }, + "position": [9, 6] + }, + { + "id": "07b9fe07", + "type": "paragraph", + "model": { + "text": "Nous vous expliquons exactement ce que c'est, étape par étape, afin que vous puissiez appliquer cette technique à tout ce qui vous intéresse.", + "blocks": [ + { + "id": "1041c7dc", + "type": "fragment", + "model": { + "text": "Nous vous expliquons exactement ce que c'est, étape par étape, afin que vous puissiez appliquer cette technique à tout ce qui vous intéresse.", + "attributes": [] + }, + "position": [9, 7, 1] + } + ] + }, + "position": [9, 7] + }, + { + "id": "289f381a", + "type": "paragraph", + "model": { + "text": "4 étapes", + "blocks": [ + { + "id": "ee3417c9", + "type": "fragment", + "model": { "text": "4 étapes", "attributes": [] }, + "position": [9, 8, 1] + } + ] + }, + "position": [9, 8] + }, + { + "id": "74019ff3", + "type": "paragraph", + "model": { + "text": "Richard FeynmanCRÉDIT PHOTO, GETTY IMAGES", + "blocks": [ + { + "id": "0808c839", + "type": "fragment", + "model": { + "text": "Richard FeynmanCRÉDIT PHOTO, GETTY IMAGES", + "attributes": [] + }, + "position": [9, 9, 1] + } + ] + }, + "position": [9, 9] + }, + { + "id": "eae16955", + "type": "paragraph", + "model": { + "text": "Légende image, Le physicien Richard Feynman a été qualifié à la fois de génie et de bouffon pour son approche excentrique de la science.", + "blocks": [ + { + "id": "e9b162f1", + "type": "fragment", + "model": { + "text": "Légende image, Le physicien Richard Feynman a été qualifié à la fois de génie et de bouffon pour son approche excentrique de la science.", + "attributes": [] + }, + "position": [9, 10, 1] + } + ] + }, + "position": [9, 10] + }, + { + "id": "2e230273", + "type": "paragraph", + "model": { + "text": "1. Choisissez un concept", + "blocks": [ + { + "id": "afd85266", + "type": "fragment", + "model": { + "text": "1. Choisissez un concept", + "attributes": [] + }, + "position": [9, 11, 1] + } + ] + }, + "position": [9, 11] + }, + { + "id": "2d783af9", + "type": "paragraph", + "model": { + "text": "Il peut s'agir de n'importe quel concept. La macroéconomie ou l'économie domestique, ou tout ce que vous voulez apprendre. Chimie ou sciences vétérinaires, ou d'abord un concept puis un autre.", + "blocks": [ + { + "id": "f881c3d5", + "type": "fragment", + "model": { + "text": "Il peut s'agir de n'importe quel concept. La macroéconomie ou l'économie domestique, ou tout ce que vous voulez apprendre. Chimie ou sciences vétérinaires, ou d'abord un concept puis un autre.", + "attributes": [] + }, + "position": [9, 12, 1] + } + ] + }, + "position": [9, 12] + }, + { + "id": "5521ae39", + "type": "paragraph", + "model": { + "text": "Notez le sujet.", + "blocks": [ + { + "id": "52b8d4fa", + "type": "fragment", + "model": { + "text": "Notez le sujet.", + "attributes": [] + }, + "position": [9, 13, 1] + } + ] + }, + "position": [9, 13] + }, + { + "id": "4c84ef3c", + "type": "paragraph", + "model": { + "text": "2. Enseignez-le", + "blocks": [ + { + "id": "b879db35", + "type": "fragment", + "model": { + "text": "2. Enseignez-le", + "attributes": [] + }, + "position": [9, 14, 1] + } + ] + }, + "position": [9, 14] + }, + { + "id": "bd8c450d", + "type": "paragraph", + "model": { + "text": "Écrivez tout ce que vous savez sur le sujet comme si vous l'enseigniez à un enfant. Bien que cela paraisse absurde, il s'agit d'une étape très importante.", + "blocks": [ + { + "id": "610112b4", + "type": "fragment", + "model": { + "text": "Écrivez tout ce que vous savez sur le sujet comme si vous l'enseigniez à un enfant. Bien que cela paraisse absurde, il s'agit d'une étape très importante.", + "attributes": [] + }, + "position": [9, 15, 1] + } + ] + }, + "position": [9, 15] + }, + { + "id": "f8b1cc4d", + "type": "paragraph", + "model": { + "text": "Veillez à utiliser le langage le plus simple possible du début à la fin. En n'utilisant que les mots les plus courants, vous éviterez de vous faire croire que, parce que vous connaissez le jargon, vous comprenez ce dont vous parlez.", + "blocks": [ + { + "id": "6b034f31", + "type": "fragment", + "model": { + "text": "Veillez à utiliser le langage le plus simple possible du début à la fin. En n'utilisant que les mots les plus courants, vous éviterez de vous faire croire que, parce que vous connaissez le jargon, vous comprenez ce dont vous parlez.", + "attributes": [] + }, + "position": [9, 16, 1] + } + ] + }, + "position": [9, 16] + }, + { + "id": "96c064b8", + "type": "paragraph", + "model": { + "text": "3. Revenir à", + "blocks": [ + { + "id": "877d0b40", + "type": "fragment", + "model": { "text": "3. Revenir à", "attributes": [] }, + "position": [9, 17, 1] + } + ] + }, + "position": [9, 17] + }, + { + "id": "3d7c587a", + "type": "paragraph", + "model": { + "text": "À l'étape 2, vous avez probablement identifié des lacunes dans vos connaissances, des choses que vous avez oubliées ou que vous n'avez pas pu expliquer.", + "blocks": [ + { + "id": "30dc152f", + "type": "fragment", + "model": { + "text": "À l'étape 2, vous avez probablement identifié des lacunes dans vos connaissances, des choses que vous avez oubliées ou que vous n'avez pas pu expliquer.", + "attributes": [] + }, + "position": [9, 18, 1] + } + ] + }, + "position": [9, 18] + }, + { + "id": "61f396a0", + "type": "paragraph", + "model": { + "text": "C'est à ce stade que vous commencez vraiment à apprendre. Retournez à la source (il peut s'agir de vos livres, de vos notes, d'un podcast) et explorez ce que vous ne comprenez toujours pas.", + "blocks": [ + { + "id": "893130cc", + "type": "fragment", + "model": { + "text": "C'est à ce stade que vous commencez vraiment à apprendre. Retournez à la source (il peut s'agir de vos livres, de vos notes, d'un podcast) et explorez ce que vous ne comprenez toujours pas.", + "attributes": [] + }, + "position": [9, 19, 1] + } + ] + }, + "position": [9, 19] + }, + { + "id": "fb839c9b", + "type": "paragraph", + "model": { + "text": "Et, pour chaque sous-sujet, lorsque vous pensez l'avoir compris, essayez de le mettre sur papier dans des termes que l'enfant à qui vous enseignez comprendrait.", + "blocks": [ + { + "id": "82a31527", + "type": "fragment", + "model": { + "text": "Et, pour chaque sous-sujet, lorsque vous pensez l'avoir compris, essayez de le mettre sur papier dans des termes que l'enfant à qui vous enseignez comprendrait.", + "attributes": [] + }, + "position": [9, 20, 1] + } + ] + }, + "position": [9, 20] + }, + { + "id": "0dcf52fd", + "type": "paragraph", + "model": { + "text": "Une fois que vous êtes à l'aise avec tout ce qui vous déroutait, revenez à votre texte original et continuez.", + "blocks": [ + { + "id": "0d019ed5", + "type": "fragment", + "model": { + "text": "Une fois que vous êtes à l'aise avec tout ce qui vous déroutait, revenez à votre texte original et continuez.", + "attributes": [] + }, + "position": [9, 21, 1] + } + ] + }, + "position": [9, 21] + }, + { + "id": "d75c0dbf", + "type": "paragraph", + "model": { + "text": "4. Réviser et simplifier", + "blocks": [ + { + "id": "f55ec914", + "type": "fragment", + "model": { + "text": "4. Réviser et simplifier", + "attributes": [] + }, + "position": [9, 22, 1] + } + ] + }, + "position": [9, 22] + }, + { + "id": "237cbee0", + "type": "paragraph", + "model": { + "text": "Relisez ce que vous avez écrit. Assurez-vous à nouveau que vous n'avez pas utilisé le jargon associé au sujet qui vous intrigue.", + "blocks": [ + { + "id": "7684a97b", + "type": "fragment", + "model": { + "text": "Relisez ce que vous avez écrit. Assurez-vous à nouveau que vous n'avez pas utilisé le jargon associé au sujet qui vous intrigue.", + "attributes": [] + }, + "position": [9, 23, 1] + } + ] + }, + "position": [9, 23] + }, + { + "id": "9b442080", + "type": "paragraph", + "model": { + "text": "Lisez-le à haute voix.", + "blocks": [ + { + "id": "ca0ffb90", + "type": "fragment", + "model": { + "text": "Lisez-le à haute voix.", + "attributes": [] + }, + "position": [9, 24, 1] + } + ] + }, + "position": [9, 24] + }, + { + "id": "bc4c7d26", + "type": "paragraph", + "model": { + "text": "Si l'explication n'est pas simple ou semble confuse, considérez cela comme une indication que vous ne comprenez pas quelque chose.", + "blocks": [ + { + "id": "246f91de", + "type": "fragment", + "model": { + "text": "Si l'explication n'est pas simple ou semble confuse, considérez cela comme une indication que vous ne comprenez pas quelque chose.", + "attributes": [] + }, + "position": [9, 25, 1] + } + ] + }, + "position": [9, 25] + }, + { + "id": "62d22bf6", + "type": "paragraph", + "model": { + "text": "Essayez de créer des analogies, qui non seulement clarifient les choses, mais montrent également que vous maîtrisez le sujet.", + "blocks": [ + { + "id": "87cd3b6a", + "type": "fragment", + "model": { + "text": "Essayez de créer des analogies, qui non seulement clarifient les choses, mais montrent également que vous maîtrisez le sujet.", + "attributes": [] + }, + "position": [9, 26, 1] + } + ] + }, + "position": [9, 26] + } + ] + }, + "position": [9] + }, + { + "id": "23ec4afd", + "type": "easyRead", + "model": { + "hasBeenReviewed": true, + "suitableForAbridgement": false, + "blocks": [ + { + "id": "af999136", + "type": "text", + "model": { + "blocks": [ + { + "id": "caad4320", + "type": "paragraph", + "model": { + "text": "Technique Feynman : Une méthode facile pour apprendre", + "blocks": [ + { + "id": "97fb2d4a", + "type": "fragment", + "model": { + "text": "Technique Feynman : Une méthode facile pour apprendre", + "attributes": [] + }, + "position": [10, 1, 1, 1] + } + ] + }, + "position": [10, 1, 1] + }, + { + "id": "f8679627", + "type": "paragraph", + "model": { + "text": "Introduction", + "blocks": [ + { + "id": "814581ee", + "type": "fragment", + "model": { + "text": "Introduction", + "attributes": [] + }, + "position": [10, 1, 2, 1] + } + ] + }, + "position": [10, 1, 2] + }, + { + "id": "16394838", + "type": "paragraph", + "model": { + "text": "La technique Feynman est une méthode d'étude créée par Richard Feynman. Richard Feynman était un scientifique américain qui a reçu un prix important pour son travail en physique (étude des règles du monde physique). Cette méthode aide à mieux comprendre des sujets difficiles.", + "blocks": [ + { + "id": "b697008b", + "type": "fragment", + "model": { + "text": "La technique Feynman est une méthode d'étude créée par Richard Feynman. Richard Feynman était un scientifique américain qui a reçu un prix important pour son travail en physique (étude des règles du monde physique). Cette méthode aide à mieux comprendre des sujets difficiles.", + "attributes": [] + }, + "position": [10, 1, 3, 1] + } + ] + }, + "position": [10, 1, 3] + }, + { + "id": "b203868e", + "type": "paragraph", + "model": { + "text": "Pourquoi utiliser cette méthode ?", + "blocks": [ + { + "id": "8ac00333", + "type": "fragment", + "model": { + "text": "Pourquoi utiliser cette méthode ?", + "attributes": [] + }, + "position": [10, 1, 4, 1] + } + ] + }, + "position": [10, 1, 4] + }, + { + "id": "90772b21", + "type": "paragraph", + "model": { + "text": "Passer un examen peut être stressant. Beaucoup de personnes ont du mal à retenir des informations, même celles qui sont intelligentes. La méthode Feynman est simple. Elle aide à apprendre en expliquant les choses clairement.", + "blocks": [ + { + "id": "7baf64fe", + "type": "fragment", + "model": { + "text": "Passer un examen peut être stressant. Beaucoup de personnes ont du mal à retenir des informations, même celles qui sont intelligentes. La méthode Feynman est simple. Elle aide à apprendre en expliquant les choses clairement.", + "attributes": [] + }, + "position": [10, 1, 5, 1] + } + ] + }, + "position": [10, 1, 5] + }, + { + "id": "aa9a54be", + "type": "paragraph", + "model": { + "text": "Les étapes de la méthode Feynman", + "blocks": [ + { + "id": "30559a5a", + "type": "fragment", + "model": { + "text": "Les étapes de la méthode Feynman", + "attributes": [] + }, + "position": [10, 1, 6, 1] + } + ] + }, + "position": [10, 1, 6] + }, + { + "id": "e0f7cce2", + "type": "paragraph", + "model": { + "text": "1. Choisir un sujet", + "blocks": [ + { + "id": "d97d4871", + "type": "fragment", + "model": { + "text": "1. Choisir un sujet", + "attributes": [] + }, + "position": [10, 1, 7, 1] + } + ] + }, + "position": [10, 1, 7] + }, + { + "id": "2551a5f2", + "type": "paragraph", + "model": { + "text": "Choisissez un sujet que vous voulez apprendre. Cela peut être une matière comme la chimie (science des substances) ou l'économie (étude de l'argent et des échanges). Écrivez le nom du sujet.", + "blocks": [ + { + "id": "f22d7790", + "type": "fragment", + "model": { + "text": "Choisissez un sujet que vous voulez apprendre. Cela peut être une matière comme la chimie (science des substances) ou l'économie (étude de l'argent et des échanges). Écrivez le nom du sujet.", + "attributes": [] + }, + "position": [10, 1, 8, 1] + } + ] + }, + "position": [10, 1, 8] + }, + { + "id": "5effb43b", + "type": "paragraph", + "model": { + "text": "2. Expliquer le sujet", + "blocks": [ + { + "id": "ec4b17eb", + "type": "fragment", + "model": { + "text": "2. Expliquer le sujet", + "attributes": [] + }, + "position": [10, 1, 9, 1] + } + ] + }, + "position": [10, 1, 9] + }, + { + "id": "33f9ec88", + "type": "paragraph", + "model": { + "text": "Écrivez tout ce que vous savez sur le sujet. Imaginez que vous expliquez à un enfant. Utilisez des mots simples. Ne vous laissez pas embrouiller par des mots difficiles.", + "blocks": [ + { + "id": "336f9693", + "type": "fragment", + "model": { + "text": "Écrivez tout ce que vous savez sur le sujet. Imaginez que vous expliquez à un enfant. Utilisez des mots simples. Ne vous laissez pas embrouiller par des mots difficiles.", + "attributes": [] + }, + "position": [10, 1, 10, 1] + } + ] + }, + "position": [10, 1, 10] + }, + { + "id": "a206dd6b", + "type": "paragraph", + "model": { + "text": "3. Identifier les lacunes", + "blocks": [ + { + "id": "87594f9f", + "type": "fragment", + "model": { + "text": "3. Identifier les lacunes", + "attributes": [] + }, + "position": [10, 1, 11, 1] + } + ] + }, + "position": [10, 1, 11] + }, + { + "id": "636b33e5", + "type": "paragraph", + "model": { + "text": "Pendant que vous écrivez, vous pouvez voir que vous ne savez pas tout. C'est le moment d'apprendre ce que vous ne comprenez pas. Retournez à vos livres ou à vos notes. Essayez d'écrire encore une fois ce que vous avez compris.", + "blocks": [ + { + "id": "a680a29a", + "type": "fragment", + "model": { + "text": "Pendant que vous écrivez, vous pouvez voir que vous ne savez pas tout. C'est le moment d'apprendre ce que vous ne comprenez pas. Retournez à vos livres ou à vos notes. Essayez d'écrire encore une fois ce que vous avez compris.", + "attributes": [] + }, + "position": [10, 1, 12, 1] + } + ] + }, + "position": [10, 1, 12] + }, + { + "id": "da04ae9b", + "type": "paragraph", + "model": { + "text": "4. Réviser et simplifier", + "blocks": [ + { + "id": "e2e24bfe", + "type": "fragment", + "model": { + "text": "4. Réviser et simplifier", + "attributes": [] + }, + "position": [10, 1, 13, 1] + } + ] + }, + "position": [10, 1, 13] + }, + { + "id": "4dc93409", + "type": "paragraph", + "model": { + "text": "Lisez ce que vous avez écrit. Assurez-vous d'utiliser des mots simples. Lisez à haute voix. Si vous trouvez que c'est encore compliqué, cela veut dire que vous ne comprenez pas bien. Essayez d'expliquer autrement.", + "blocks": [ + { + "id": "f9d89ab6", + "type": "fragment", + "model": { + "text": "Lisez ce que vous avez écrit. Assurez-vous d'utiliser des mots simples. Lisez à haute voix. Si vous trouvez que c'est encore compliqué, cela veut dire que vous ne comprenez pas bien. Essayez d'expliquer autrement.", + "attributes": [] + }, + "position": [10, 1, 14, 1] + } + ] + }, + "position": [10, 1, 14] + }, + { + "id": "a1db769b", + "type": "paragraph", + "model": { + "text": "Exemple : Les élastiques", + "blocks": [ + { + "id": "3ffca605", + "type": "fragment", + "model": { + "text": "Exemple : Les élastiques", + "attributes": [] + }, + "position": [10, 1, 15, 1] + } + ] + }, + "position": [10, 1, 15] + }, + { + "id": "3831105b", + "type": "paragraph", + "model": { + "text": "Richard Feynman a expliqué les élastiques très simplement. Il a dit que les élastiques sont faits de longues chaînes de petites particules (molécules). Quand on tire sur un élastique, il devient plus long. Les petites particules veulent revenir à leur taille normale, et cela crée de la chaleur (température qui monte). Vous pouvez sentir la chaleur en tirant sur un élastique entre vos lèvres.", + "blocks": [ + { + "id": "4fbfeafc", + "type": "fragment", + "model": { + "text": "Richard Feynman a expliqué les élastiques très simplement. Il a dit que les élastiques sont faits de longues chaînes de petites particules (molécules). Quand on tire sur un élastique, il devient plus long. Les petites particules veulent revenir à leur taille normale, et cela crée de la chaleur (température qui monte). Vous pouvez sentir la chaleur en tirant sur un élastique entre vos lèvres.", + "attributes": [] + }, + "position": [10, 1, 16, 1] + } + ] + }, + "position": [10, 1, 16] + }, + { + "id": "9d161a23", + "type": "paragraph", + "model": { + "text": "Avantages et inconvénients", + "blocks": [ + { + "id": "577332e7", + "type": "fragment", + "model": { + "text": "Avantages et inconvénients", + "attributes": [] + }, + "position": [10, 1, 17, 1] + } + ] + }, + "position": [10, 1, 17] + }, + { + "id": "75bacc8c", + "type": "paragraph", + "model": { + "text": "La méthode Feynman est utile pour comprendre des sujets compliqués. Elle aide à relier les idées à votre vie. Mais cette méthode demande du temps et des efforts. Elle n'est pas toujours adaptée aux sujets simples ou quand vous devez juste mémoriser des informations.", + "blocks": [ + { + "id": "227f5126", + "type": "fragment", + "model": { + "text": "La méthode Feynman est utile pour comprendre des sujets compliqués. Elle aide à relier les idées à votre vie. Mais cette méthode demande du temps et des efforts. Elle n'est pas toujours adaptée aux sujets simples ou quand vous devez juste mémoriser des informations.", + "attributes": [] + }, + "position": [10, 1, 18, 1] + } + ] + }, + "position": [10, 1, 18] + }, + { + "id": "fd0bdb9d", + "type": "paragraph", + "model": { + "text": "Conclusion", + "blocks": [ + { + "id": "aacea300", + "type": "fragment", + "model": { + "text": "Conclusion", + "attributes": [] + }, + "position": [10, 1, 19, 1] + } + ] + }, + "position": [10, 1, 19] + }, + { + "id": "8fb3875a", + "type": "paragraph", + "model": { + "text": "La technique de Feynman peut vous aider à mieux préparer vos examens. Essayez-la la prochaine fois que vous devez apprendre quelque chose de nouveau ! (", + "blocks": [ + { + "id": "604e3e48", + "type": "fragment", + "model": { + "text": "La technique de Feynman peut vous aider à mieux préparer vos examens. Essayez-la la prochaine fois que vous devez apprendre quelque chose de nouveau ! (", + "attributes": [] + }, + "position": [10, 1, 20, 1] + } + ] + }, + "position": [10, 1, 20] + } + ] + }, + "position": [10, 1] + }, + { + "id": "ff7b301c", + "type": "easyReadMeta", + "model": { + "easyReadAssetId": "c161g3y596go", + "originalAssetId": "c023vz8qn6ro" + }, + "position": [10, 2] + } + ] + }, + "position": [10] + } + ] + } + }, + "promo": { + "headlines": { + "seoHeadline": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "promoHeadline": { + "blocks": [ + { + "type": "text", + "model": { + "blocks": [ + { + "type": "paragraph", + "model": { + "text": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "blocks": [ + { + "type": "fragment", + "model": { + "text": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "attributes": [] + } + } + ] + } + } + ] + } + } + ] + } + }, + "summary": { + "blocks": [ + { + "type": "text", + "model": { + "blocks": [ + { + "type": "paragraph", + "model": { + "text": "", + "blocks": [ + { + "type": "fragment", + "model": { "text": "", "attributes": [] } + } + ] + } + } + ] + } + } + ] + }, + "serviceIdentifier": "Afrique", + "breakingNews": { "isBreaking": false }, + "consumableAsSFV": false + } + }, + "secondaryData": { + "topStories": [ + { + "headlines": { + "headline": "Ethnicity pay gap revealed for academics" + }, + "locators": { + "assetUri": "/news/23224388", + "cpsUrn": "urn:bbc:content:assetUri:news/23224388", + "curie": "http://www.bbc.co.uk/asset/cc11be5b-3e79-5a40-98c2-1317763d076a", + "assetId": "23224388" + }, + "summary": "BBC Analysis shows a 26% ethnic pay gap at some of the UK's best known universities", + "timestamp": 1544185742000, + "language": "en-gb", + "passport": { + "category": { + "categoryId": "http://www.bbc.co.uk/ontologies/applicationlogic-news/News", + "categoryName": "News" + }, + "taggings": [] + }, + "cpsType": "STY", + "indexImage": { + "id": "63696123", + "subType": "index", + "href": "http://b.files.bbci.co.uk/7DA9/test/_63696123_050408914-1.jpg", + "path": "/cpsdevpb/7DA9/test/_63696123_050408914-1.jpg", + "height": 549, + "width": 976, + "altText": "Three university graduates", + "caption": "The pay gap left Meenakshi Sarkar feeling depressed and devalued", + "copyrightHolder": "Press Association", + "originCode": "cpsdevpb", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "prominence": "standard", + "section": { + "subType": "IDX", + "name": "Home", + "uri": "/news/front_page", + "type": "simple" + }, + "site": { + "subType": "site", + "name": "BBC News", + "uri": "/news", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:news/23224388", + "type": "cps" + } + ], + "features": [ + { + "headlines": { "headline": "Commémoration du massacre de Soweto 35" }, + "locators": { + "assetUri": "/afrique/23053027", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23053027", + "curie": "http://www.bbc.co.uk/asset/d4a17421-fa0c-d448-a3b6-230410ba601a", + "assetId": "23053027" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466154789000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23053027", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 36" }, + "locators": { + "assetUri": "/afrique/23053028", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23053028", + "curie": "http://www.bbc.co.uk/asset/c140434e-ef3b-a347-b1fd-455fb263e139", + "assetId": "23053028" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466154800000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23053028", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 19" }, + "locators": { + "assetUri": "/afrique/23052941", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052941", + "curie": "http://www.bbc.co.uk/asset/32e4242e-43e4-d349-a0ac-cbaf76be2aae", + "assetId": "23052941" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466092777000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052941", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 20" }, + "locators": { + "assetUri": "/afrique/23052943", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052943", + "curie": "http://www.bbc.co.uk/asset/8dfb243a-ab8d-374a-9dab-f478d9ce0bb4", + "assetId": "23052943" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466092863000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052943", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 21" }, + "locators": { + "assetUri": "/afrique/23052944", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052944", + "curie": "http://www.bbc.co.uk/asset/d7e2c23f-e205-814b-945f-a0761b5cec96", + "assetId": "23052944" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466092875000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052944", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 25" }, + "locators": { + "assetUri": "/afrique/23052995", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052995", + "curie": "http://www.bbc.co.uk/asset/b2eb81dc-f351-e346-85ce-ca4dfa1a77ad", + "assetId": "23052995" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466154040000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052995", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 26" }, + "locators": { + "assetUri": "/afrique/23052996", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052996", + "curie": "http://www.bbc.co.uk/asset/1d7e9e57-3393-714e-850c-3b4b426b8998", + "assetId": "23052996" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466154054000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052996", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 27" }, + "locators": { + "assetUri": "/afrique/23052997", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052997", + "curie": "http://www.bbc.co.uk/asset/8078e9b6-57bd-ee49-83c8-76ef49449be5", + "assetId": "23052997" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466154067000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052997", + "type": "cps" + } + ], + "mostRead": { + "generated": "2024-12-18T17:02:56.208Z", + "lastRecordTimeStamp": "2021-05-04T11:53:00Z", + "firstRecordTimeStamp": "2021-05-04T10:53:00Z", + "items": [ + { + "id": "c140434e-ef3b-a347-b1fd-455fb263e139", + "rank": 1, + "title": "Commémoration du massacre de Soweto 36", + "href": "/afrique/23053028", + "timestamp": "2016-06-17T09:13:20.000Z" + }, + { + "id": "8dfb243a-ab8d-374a-9dab-f478d9ce0bb4", + "rank": 2, + "title": "Commémoration du massacre de Soweto 20", + "href": "/afrique/23052943", + "timestamp": "2016-06-16T16:01:03.000Z" + }, + { + "id": "34ce798a-96c4-5444-b0c2-ba6487a88c92", + "rank": 3, + "title": "Commémoration du massacre de Soweto 28", + "href": "/afrique/23052999", + "timestamp": "2016-06-17T09:06:47.000Z" + }, + { + "id": "44e8bed2-d2c8-9c41-acb5-071cad14cfb7", + "rank": 4, + "title": "Commémoration du massacre de Soweto 45", + "href": "/afrique/23053275", + "timestamp": "2016-06-17T10:48:08.000Z" + }, + { + "id": "0dafcaff-9b96-7c41-a572-e7ab306ee0cd", + "rank": 5, + "title": "Un supercalculateur en Côte d'Ivoire", + "href": "/afrique/23207406", + "timestamp": "2018-07-09T11:19:01.000Z" + }, + { + "id": "da6e6871-c335-294c-aed4-ec006199a746", + "rank": 6, + "title": "Af Sud : des candidats de l’ANC abattus", + "href": "/afrique/monde-23061718", + "timestamp": "2016-07-20T10:52:40.000Z" + }, + { + "id": "1949bdae-38e4-0748-9969-ddec3444a52b", + "rank": 7, + "title": "Commémoration du massacre de Soweto 37", + "href": "/afrique/23053029", + "timestamp": "2016-06-17T09:14:31.000Z" + }, + { + "id": "8078e9b6-57bd-ee49-83c8-76ef49449be5", + "rank": 8, + "title": "Commémoration du massacre de Soweto 27", + "href": "/afrique/23052997", + "timestamp": "2016-06-17T09:01:07.000Z" + }, + { + "id": "1a078192-0370-de48-bd06-c336103aab12", + "rank": 9, + "title": "Thai cave rescue continues", + "href": "/afrique/23207350", + "timestamp": "2018-07-09T11:49:08.000Z" + }, + { + "id": "439ba4f6-910e-8a4e-b2cb-11ec6aeea823", + "rank": 10, + "title": "Euro 2016 : la France première du groupe africa", + "href": "/afrique/region-23056013", + "timestamp": "2016-06-27T13:36:54.000Z" + } + ] + }, + "latestMedia": null + } + }, + "contentType": "application/json; charset=utf-8" +} diff --git a/data/afrique/articles/c161g3y596go.json b/data/afrique/articles/c161g3y596go.json new file mode 100644 index 00000000000..9fcdf45a6c2 --- /dev/null +++ b/data/afrique/articles/c161g3y596go.json @@ -0,0 +1,1093 @@ +{ + "data": { + "article": { + "metadata": { + "atiAnalytics": { + "categoryName": null, + "contentId": "urn:bbc:optimo:asset:c161g3y596go", + "contentType": "article", + "language": "fr", + "ldpThingIds": null, + "ldpThingLabels": null, + "nationsProducer": null, + "pageIdentifier": "afrique.articles.c161g3y596go.page", + "pageTitle": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "timePublished": "2024-12-18T16:56:09.394Z", + "timeUpdated": "2024-12-18T16:56:09.394Z" + }, + "id": "urn:bbc:ares::article:c161g3y596go", + "locators": { + "optimoUrn": "urn:bbc:optimo:asset:c161g3y596go", + "canonicalUrl": "https://www.bbc.com/afrique/articles/c161g3y596go" + }, + "type": "article", + "createdBy": "Afrique", + "language": "fr", + "firstPublished": 1734540969394, + "lastPublished": 1734540969394, + "options": { "includeComments": false }, + "analyticsLabels": { + "contentId": "urn:bbc:optimo:asset:c161g3y596go", + "producer": "Afrique", + "page": "afrique.articles.c161g3y596go.page", + "irisKeyword": null + }, + "passport": { + "language": "fr", + "home": "http://www.bbc.co.uk/ontologies/passport/home/Afrique", + "taggings": [] + }, + "blockTypes": [ + "headline", + "text", + "paragraph", + "fragment", + "easyReadMeta" + ], + "includeComments": false, + "consumableAsSFV": false, + "allowAdvertising": true, + "consumableOnRedButton": false, + "consumableOnlyOnRedButton": false, + "breakingNews": { "isBreaking": false }, + "useSensitiveOnwardJourneys": false, + "stats": { "readTime": 1, "wordCount": 407 }, + "isTransliterated": false + }, + "content": { + "model": { + "blocks": [ + { + "id": "a1c95e6d", + "type": "headline", + "model": { + "blocks": [ + { + "id": "bdbbbc8d", + "type": "text", + "model": { + "blocks": [ + { + "id": "1c289552", + "type": "paragraph", + "model": { + "text": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "blocks": [ + { + "id": "b17a3020", + "type": "fragment", + "model": { + "text": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "attributes": [] + }, + "position": [1, 1, 1, 1] + } + ] + }, + "position": [1, 1, 1] + } + ] + }, + "position": [1, 1] + } + ] + }, + "position": [1] + }, + { + "id": "35f0ed1c", + "type": "timestamp", + "model": { + "firstPublished": 1734540969394, + "lastPublished": 1734540969394 + }, + "position": [2] + }, + { + "id": "1b42646d", + "type": "text", + "model": { + "blocks": [ + { + "id": "dc1f46eb", + "type": "paragraph", + "model": { + "text": "Technique Feynman : Une méthode facile pour apprendre", + "blocks": [ + { + "id": "13236bfd", + "type": "fragment", + "model": { + "text": "Technique Feynman : Une méthode facile pour apprendre", + "attributes": [] + }, + "position": [3, 1, 1] + } + ] + }, + "position": [3, 1] + }, + { + "id": "b28deeac", + "type": "paragraph", + "model": { + "text": "Introduction", + "blocks": [ + { + "id": "f81d04c7", + "type": "fragment", + "model": { "text": "Introduction", "attributes": [] }, + "position": [3, 2, 1] + } + ] + }, + "position": [3, 2] + }, + { + "id": "5ec1c7d8", + "type": "paragraph", + "model": { + "text": "La technique Feynman est une méthode d'étude créée par Richard Feynman. Richard Feynman était un scientifique américain qui a reçu un prix important pour son travail en physique (étude des règles du monde physique). Cette méthode aide à mieux comprendre des sujets difficiles.", + "blocks": [ + { + "id": "5082de3a", + "type": "fragment", + "model": { + "text": "La technique Feynman est une méthode d'étude créée par Richard Feynman. Richard Feynman était un scientifique américain qui a reçu un prix important pour son travail en physique (étude des règles du monde physique). Cette méthode aide à mieux comprendre des sujets difficiles.", + "attributes": [] + }, + "position": [3, 3, 1] + } + ] + }, + "position": [3, 3] + }, + { + "id": "2a06ffc8", + "type": "paragraph", + "model": { + "text": "Pourquoi utiliser cette méthode ?", + "blocks": [ + { + "id": "410a3ed9", + "type": "fragment", + "model": { + "text": "Pourquoi utiliser cette méthode ?", + "attributes": [] + }, + "position": [3, 4, 1] + } + ] + }, + "position": [3, 4] + } + ] + }, + "position": [3] + }, + { "id": "1cfba264", "type": "mpu", "model": {}, "position": [4] }, + { + "id": "b3015f7e", + "type": "text", + "model": { + "blocks": [ + { + "id": "75aa4536", + "type": "paragraph", + "model": { + "text": "Passer un examen peut être stressant. Beaucoup de personnes ont du mal à retenir des informations, même celles qui sont intelligentes. La méthode Feynman est simple. Elle aide à apprendre en expliquant les choses clairement.", + "blocks": [ + { + "id": "a3389f58", + "type": "fragment", + "model": { + "text": "Passer un examen peut être stressant. Beaucoup de personnes ont du mal à retenir des informations, même celles qui sont intelligentes. La méthode Feynman est simple. Elle aide à apprendre en expliquant les choses clairement.", + "attributes": [] + }, + "position": [5, 1, 1] + } + ] + }, + "position": [5, 1] + } + ] + }, + "position": [5] + }, + { + "id": "8e37cce6", + "type": "wsoj", + "model": { "type": "recommendations" }, + "position": [6] + }, + { + "id": "3a4b20c9", + "type": "text", + "model": { + "blocks": [ + { + "id": "ff5b315a", + "type": "paragraph", + "model": { + "text": "Les étapes de la méthode Feynman", + "blocks": [ + { + "id": "0a3a808f", + "type": "fragment", + "model": { + "text": "Les étapes de la méthode Feynman", + "attributes": [] + }, + "position": [7, 1, 1] + } + ] + }, + "position": [7, 1] + }, + { + "id": "90badc95", + "type": "paragraph", + "model": { + "text": "1. Choisir un sujet", + "blocks": [ + { + "id": "9a1b2102", + "type": "fragment", + "model": { + "text": "1. Choisir un sujet", + "attributes": [] + }, + "position": [7, 2, 1] + } + ] + }, + "position": [7, 2] + } + ] + }, + "position": [7] + }, + { + "id": "84d2381b", + "type": "podcastPromo", + "model": { "type": "podcastPromo" }, + "position": [8] + }, + { + "id": "c3a9605d", + "type": "text", + "model": { + "blocks": [ + { + "id": "8a3dbc8b", + "type": "paragraph", + "model": { + "text": "Choisissez un sujet que vous voulez apprendre. Cela peut être une matière comme la chimie (science des substances) ou l'économie (étude de l'argent et des échanges). Écrivez le nom du sujet.", + "blocks": [ + { + "id": "85207306", + "type": "fragment", + "model": { + "text": "Choisissez un sujet que vous voulez apprendre. Cela peut être une matière comme la chimie (science des substances) ou l'économie (étude de l'argent et des échanges). Écrivez le nom du sujet.", + "attributes": [] + }, + "position": [9, 1, 1] + } + ] + }, + "position": [9, 1] + }, + { + "id": "5ce380ca", + "type": "paragraph", + "model": { + "text": "2. Expliquer le sujet", + "blocks": [ + { + "id": "257dcd51", + "type": "fragment", + "model": { + "text": "2. Expliquer le sujet", + "attributes": [] + }, + "position": [9, 2, 1] + } + ] + }, + "position": [9, 2] + }, + { + "id": "8e658bab", + "type": "paragraph", + "model": { + "text": "Écrivez tout ce que vous savez sur le sujet. Imaginez que vous expliquez à un enfant. Utilisez des mots simples. Ne vous laissez pas embrouiller par des mots difficiles.", + "blocks": [ + { + "id": "dd9ac25e", + "type": "fragment", + "model": { + "text": "Écrivez tout ce que vous savez sur le sujet. Imaginez que vous expliquez à un enfant. Utilisez des mots simples. Ne vous laissez pas embrouiller par des mots difficiles.", + "attributes": [] + }, + "position": [9, 3, 1] + } + ] + }, + "position": [9, 3] + }, + { + "id": "a0f62588", + "type": "paragraph", + "model": { + "text": "3. Identifier les lacunes", + "blocks": [ + { + "id": "9db27066", + "type": "fragment", + "model": { + "text": "3. Identifier les lacunes", + "attributes": [] + }, + "position": [9, 4, 1] + } + ] + }, + "position": [9, 4] + }, + { + "id": "c5981f66", + "type": "paragraph", + "model": { + "text": "Pendant que vous écrivez, vous pouvez voir que vous ne savez pas tout. C'est le moment d'apprendre ce que vous ne comprenez pas. Retournez à vos livres ou à vos notes. Essayez d'écrire encore une fois ce que vous avez compris.", + "blocks": [ + { + "id": "b7a43d1b", + "type": "fragment", + "model": { + "text": "Pendant que vous écrivez, vous pouvez voir que vous ne savez pas tout. C'est le moment d'apprendre ce que vous ne comprenez pas. Retournez à vos livres ou à vos notes. Essayez d'écrire encore une fois ce que vous avez compris.", + "attributes": [] + }, + "position": [9, 5, 1] + } + ] + }, + "position": [9, 5] + }, + { + "id": "14a4ae7b", + "type": "paragraph", + "model": { + "text": "4. Réviser et simplifier", + "blocks": [ + { + "id": "12f41518", + "type": "fragment", + "model": { + "text": "4. Réviser et simplifier", + "attributes": [] + }, + "position": [9, 6, 1] + } + ] + }, + "position": [9, 6] + }, + { + "id": "09af5ffa", + "type": "paragraph", + "model": { + "text": "Lisez ce que vous avez écrit. Assurez-vous d'utiliser des mots simples. Lisez à haute voix. Si vous trouvez que c'est encore compliqué, cela veut dire que vous ne comprenez pas bien. Essayez d'expliquer autrement.", + "blocks": [ + { + "id": "53a65e5c", + "type": "fragment", + "model": { + "text": "Lisez ce que vous avez écrit. Assurez-vous d'utiliser des mots simples. Lisez à haute voix. Si vous trouvez que c'est encore compliqué, cela veut dire que vous ne comprenez pas bien. Essayez d'expliquer autrement.", + "attributes": [] + }, + "position": [9, 7, 1] + } + ] + }, + "position": [9, 7] + }, + { + "id": "e3489dc9", + "type": "paragraph", + "model": { + "text": "Exemple : Les élastiques", + "blocks": [ + { + "id": "fd52e6b4", + "type": "fragment", + "model": { + "text": "Exemple : Les élastiques", + "attributes": [] + }, + "position": [9, 8, 1] + } + ] + }, + "position": [9, 8] + }, + { + "id": "1f9ddbe3", + "type": "paragraph", + "model": { + "text": "Richard Feynman a expliqué les élastiques très simplement. Il a dit que les élastiques sont faits de longues chaînes de petites particules (molécules). Quand on tire sur un élastique, il devient plus long. Les petites particules veulent revenir à leur taille normale, et cela crée de la chaleur (température qui monte). Vous pouvez sentir la chaleur en tirant sur un élastique entre vos lèvres.", + "blocks": [ + { + "id": "9d41ccf4", + "type": "fragment", + "model": { + "text": "Richard Feynman a expliqué les élastiques très simplement. Il a dit que les élastiques sont faits de longues chaînes de petites particules (molécules). Quand on tire sur un élastique, il devient plus long. Les petites particules veulent revenir à leur taille normale, et cela crée de la chaleur (température qui monte). Vous pouvez sentir la chaleur en tirant sur un élastique entre vos lèvres.", + "attributes": [] + }, + "position": [9, 9, 1] + } + ] + }, + "position": [9, 9] + }, + { + "id": "e697e2d1", + "type": "paragraph", + "model": { + "text": "Avantages et inconvénients", + "blocks": [ + { + "id": "fe03c2ec", + "type": "fragment", + "model": { + "text": "Avantages et inconvénients", + "attributes": [] + }, + "position": [9, 10, 1] + } + ] + }, + "position": [9, 10] + }, + { + "id": "94dfd0aa", + "type": "paragraph", + "model": { + "text": "La méthode Feynman est utile pour comprendre des sujets compliqués. Elle aide à relier les idées à votre vie. Mais cette méthode demande du temps et des efforts. Elle n'est pas toujours adaptée aux sujets simples ou quand vous devez juste mémoriser des informations.", + "blocks": [ + { + "id": "27e6979e", + "type": "fragment", + "model": { + "text": "La méthode Feynman est utile pour comprendre des sujets compliqués. Elle aide à relier les idées à votre vie. Mais cette méthode demande du temps et des efforts. Elle n'est pas toujours adaptée aux sujets simples ou quand vous devez juste mémoriser des informations.", + "attributes": [] + }, + "position": [9, 11, 1] + } + ] + }, + "position": [9, 11] + }, + { + "id": "b548151b", + "type": "paragraph", + "model": { + "text": "Conclusion", + "blocks": [ + { + "id": "ee44cc69", + "type": "fragment", + "model": { "text": "Conclusion", "attributes": [] }, + "position": [9, 12, 1] + } + ] + }, + "position": [9, 12] + }, + { + "id": "f8a33a19", + "type": "paragraph", + "model": { + "text": "La technique de Feynman peut vous aider à mieux préparer vos examens. Essayez-la la prochaine fois que vous devez apprendre quelque chose de nouveau ! (", + "blocks": [ + { + "id": "9ddc5e10", + "type": "fragment", + "model": { + "text": "La technique de Feynman peut vous aider à mieux préparer vos examens. Essayez-la la prochaine fois que vous devez apprendre quelque chose de nouveau ! (", + "attributes": [] + }, + "position": [9, 13, 1] + } + ] + }, + "position": [9, 13] + } + ] + }, + "position": [9] + }, + { + "id": "197257c5", + "type": "easyReadMeta", + "model": { "originalAssetId": "c023vz8qn6ro" }, + "position": [10] + } + ] + } + }, + "promo": { + "headlines": { + "seoHeadline": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "promoHeadline": { + "blocks": [ + { + "type": "text", + "model": { + "blocks": [ + { + "type": "paragraph", + "model": { + "text": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "blocks": [ + { + "type": "fragment", + "model": { + "text": "Qu'est-ce que la technique Feynman, la méthode d'étude créée par un prix Nobel pour tout apprendre", + "attributes": [] + } + } + ] + } + } + ] + } + } + ] + } + }, + "summary": { + "blocks": [ + { + "type": "text", + "model": { + "blocks": [ + { + "type": "paragraph", + "model": { + "text": "", + "blocks": [ + { + "type": "fragment", + "model": { "text": "", "attributes": [] } + } + ] + } + } + ] + } + } + ] + }, + "serviceIdentifier": "Afrique", + "breakingNews": { "isBreaking": false }, + "consumableAsSFV": false + } + }, + "secondaryData": { + "topStories": [ + { + "headlines": { + "headline": "Ethnicity pay gap revealed for academics" + }, + "locators": { + "assetUri": "/news/23224388", + "cpsUrn": "urn:bbc:content:assetUri:news/23224388", + "curie": "http://www.bbc.co.uk/asset/cc11be5b-3e79-5a40-98c2-1317763d076a", + "assetId": "23224388" + }, + "summary": "BBC Analysis shows a 26% ethnic pay gap at some of the UK's best known universities", + "timestamp": 1544185742000, + "language": "en-gb", + "passport": { + "category": { + "categoryId": "http://www.bbc.co.uk/ontologies/applicationlogic-news/News", + "categoryName": "News" + }, + "taggings": [] + }, + "cpsType": "STY", + "indexImage": { + "id": "63696123", + "subType": "index", + "href": "http://b.files.bbci.co.uk/7DA9/test/_63696123_050408914-1.jpg", + "path": "/cpsdevpb/7DA9/test/_63696123_050408914-1.jpg", + "height": 549, + "width": 976, + "altText": "Three university graduates", + "caption": "The pay gap left Meenakshi Sarkar feeling depressed and devalued", + "copyrightHolder": "Press Association", + "originCode": "cpsdevpb", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "prominence": "standard", + "section": { + "subType": "IDX", + "name": "Home", + "uri": "/news/front_page", + "type": "simple" + }, + "site": { + "subType": "site", + "name": "BBC News", + "uri": "/news", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:news/23224388", + "type": "cps" + } + ], + "features": [ + { + "headlines": { "headline": "Commémoration du massacre de Soweto 35" }, + "locators": { + "assetUri": "/afrique/23053027", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23053027", + "curie": "http://www.bbc.co.uk/asset/d4a17421-fa0c-d448-a3b6-230410ba601a", + "assetId": "23053027" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466154789000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23053027", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 36" }, + "locators": { + "assetUri": "/afrique/23053028", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23053028", + "curie": "http://www.bbc.co.uk/asset/c140434e-ef3b-a347-b1fd-455fb263e139", + "assetId": "23053028" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466154800000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23053028", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 19" }, + "locators": { + "assetUri": "/afrique/23052941", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052941", + "curie": "http://www.bbc.co.uk/asset/32e4242e-43e4-d349-a0ac-cbaf76be2aae", + "assetId": "23052941" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466092777000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052941", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 20" }, + "locators": { + "assetUri": "/afrique/23052943", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052943", + "curie": "http://www.bbc.co.uk/asset/8dfb243a-ab8d-374a-9dab-f478d9ce0bb4", + "assetId": "23052943" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466092863000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052943", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 21" }, + "locators": { + "assetUri": "/afrique/23052944", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052944", + "curie": "http://www.bbc.co.uk/asset/d7e2c23f-e205-814b-945f-a0761b5cec96", + "assetId": "23052944" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466092875000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052944", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 25" }, + "locators": { + "assetUri": "/afrique/23052995", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052995", + "curie": "http://www.bbc.co.uk/asset/b2eb81dc-f351-e346-85ce-ca4dfa1a77ad", + "assetId": "23052995" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466154040000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052995", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 26" }, + "locators": { + "assetUri": "/afrique/23052996", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052996", + "curie": "http://www.bbc.co.uk/asset/1d7e9e57-3393-714e-850c-3b4b426b8998", + "assetId": "23052996" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466154054000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052996", + "type": "cps" + }, + { + "headlines": { "headline": "Commémoration du massacre de Soweto 27" }, + "locators": { + "assetUri": "/afrique/23052997", + "cpsUrn": "urn:bbc:content:assetUri:afrique/23052997", + "curie": "http://www.bbc.co.uk/asset/8078e9b6-57bd-ee49-83c8-76ef49449be5", + "assetId": "23052997" + }, + "summary": "Commémoration du massacre de Soweto", + "timestamp": 1466154067000, + "language": "fr", + "cpsType": "STY", + "indexImage": { + "id": "63490121", + "subType": "index", + "href": "http://b.files.bbci.co.uk/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/2F4D/test/_63490121_110329105535_soweto_304x171_b_nocredit.gif", + "height": 261, + "width": 464, + "altText": "Soweto", + "copyrightHolder": "BBC", + "originCode": "cpsdevpb", + "type": "image" + }, + "imageThumbnail": { + "id": "63490119", + "subType": "index-thumbnail", + "href": "http://b.files.bbci.co.uk/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "path": "/cpsdevpb/163E5/test/_63490119_110329105535_soweto_304x171_b_nocredit.gif", + "height": 180, + "width": 320, + "altText": "Soweto", + "copyrightHolder": "BBC", + "type": "image" + }, + "options": { "isBreakingNews": false, "isFactCheck": false }, + "section": { + "subType": "IDX", + "name": "Accueil", + "uri": "/afrique/front_page", + "type": "simple" + }, + "id": "urn:bbc:ares::asset:afrique/23052997", + "type": "cps" + } + ], + "mostRead": { + "generated": "2024-12-18T17:02:56.208Z", + "lastRecordTimeStamp": "2021-05-04T11:53:00Z", + "firstRecordTimeStamp": "2021-05-04T10:53:00Z", + "items": [ + { + "id": "c140434e-ef3b-a347-b1fd-455fb263e139", + "rank": 1, + "title": "Commémoration du massacre de Soweto 36", + "href": "/afrique/23053028", + "timestamp": "2016-06-17T09:13:20.000Z" + }, + { + "id": "8dfb243a-ab8d-374a-9dab-f478d9ce0bb4", + "rank": 2, + "title": "Commémoration du massacre de Soweto 20", + "href": "/afrique/23052943", + "timestamp": "2016-06-16T16:01:03.000Z" + }, + { + "id": "34ce798a-96c4-5444-b0c2-ba6487a88c92", + "rank": 3, + "title": "Commémoration du massacre de Soweto 28", + "href": "/afrique/23052999", + "timestamp": "2016-06-17T09:06:47.000Z" + }, + { + "id": "44e8bed2-d2c8-9c41-acb5-071cad14cfb7", + "rank": 4, + "title": "Commémoration du massacre de Soweto 45", + "href": "/afrique/23053275", + "timestamp": "2016-06-17T10:48:08.000Z" + }, + { + "id": "0dafcaff-9b96-7c41-a572-e7ab306ee0cd", + "rank": 5, + "title": "Un supercalculateur en Côte d'Ivoire", + "href": "/afrique/23207406", + "timestamp": "2018-07-09T11:19:01.000Z" + }, + { + "id": "da6e6871-c335-294c-aed4-ec006199a746", + "rank": 6, + "title": "Af Sud : des candidats de l’ANC abattus", + "href": "/afrique/monde-23061718", + "timestamp": "2016-07-20T10:52:40.000Z" + }, + { + "id": "1949bdae-38e4-0748-9969-ddec3444a52b", + "rank": 7, + "title": "Commémoration du massacre de Soweto 37", + "href": "/afrique/23053029", + "timestamp": "2016-06-17T09:14:31.000Z" + }, + { + "id": "8078e9b6-57bd-ee49-83c8-76ef49449be5", + "rank": 8, + "title": "Commémoration du massacre de Soweto 27", + "href": "/afrique/23052997", + "timestamp": "2016-06-17T09:01:07.000Z" + }, + { + "id": "1a078192-0370-de48-bd06-c336103aab12", + "rank": 9, + "title": "Thai cave rescue continues", + "href": "/afrique/23207350", + "timestamp": "2018-07-09T11:49:08.000Z" + }, + { + "id": "439ba4f6-910e-8a4e-b2cb-11ec6aeea823", + "rank": 10, + "title": "Euro 2016 : la France première du groupe africa", + "href": "/afrique/region-23056013", + "timestamp": "2016-06-27T13:36:54.000Z" + } + ] + }, + "latestMedia": null + } + }, + "contentType": "application/json; charset=utf-8" +} diff --git a/src/app/components/EasyReadCTA/config.tsx b/src/app/components/EasyReadCTA/config.tsx index 8b17283d150..27404ad76be 100644 --- a/src/app/components/EasyReadCTA/config.tsx +++ b/src/app/components/EasyReadCTA/config.tsx @@ -1,11 +1,9 @@ /* eslint-disable import/prefer-default-export */ export const defaultTranslations = { - easyOnboardingMessage: `This is an easy read version of this story.`, - standardOnboardingMessage: `There is an easy read version of this article available.`, - aIDisclaimer: `This easy read article has been checked by a journalist. It was created with AI (artificial intelligence) from the standard article. Learn more about easy read.`, - toStandardSite: 'Take me to the standard version', - toEasySite: 'Take me to the easy read version', - informationPageLink: '#', - easySite: 'Easy read version', - standardSite: 'Standard version', + aIDisclaimer: `This easy read article has been checked by a journalist. It was created with AI (artificial intelligence) from the standard format.`, + toStandardSite: 'Standard', + toEasySite: 'Easy read', + learnMore: 'Learn more about easy read', + learnMoreLink: 'https://www.bbc.co.uk/', + format: 'Format', }; diff --git a/src/app/components/EasyReadCTA/index.stories.tsx b/src/app/components/EasyReadCTA/index.stories.tsx index 5a9e1934c28..64e4f21ee26 100644 --- a/src/app/components/EasyReadCTA/index.stories.tsx +++ b/src/app/components/EasyReadCTA/index.stories.tsx @@ -2,10 +2,14 @@ import React from 'react'; import EasyReadCTA from '.'; export const Component = () => ( - + +); + +export const EasyComponent = () => ( + ); export default { - title: 'Components/EasyReadCTA', + title: 'Components/EasyReadCTAVersion2', Component, }; diff --git a/src/app/components/EasyReadCTA/index.styles.tsx b/src/app/components/EasyReadCTA/index.styles.tsx index 354fafd98f8..16859abf277 100644 --- a/src/app/components/EasyReadCTA/index.styles.tsx +++ b/src/app/components/EasyReadCTA/index.styles.tsx @@ -1,115 +1,92 @@ -import { css, keyframes, Theme } from '@emotion/react'; +import { css, Theme } from '@emotion/react'; import pixelsToRem from '../../utilities/pixelsToRem'; -const multicolour = keyframes({ - '0%': { backgroundColor: '#00FFFF' }, - '25%': { backgroundColor: '#39FF14' }, - '50%': { backgroundColor: '#FFFF00' }, - '75%': { backgroundColor: '#FF1493' }, -}); +// const multicolour = keyframes({ +// '0%': { backgroundColor: '#00FFFF' }, +// '25%': { backgroundColor: '#39FF14' }, +// '50%': { backgroundColor: '#FFFF00' }, +// '75%': { backgroundColor: '#FF1493' }, +// }); -const changes = keyframes({ - '0%': { backgroundPosition: '0% 50%' }, - '100%': { backgroundPosition: '800% 50%' }, -}); +// const changes = keyframes({ +// '0%': { backgroundPosition: '0% 50%' }, +// '100%': { backgroundPosition: '800% 50%' }, +// }); -const shrinkGrowSpin = keyframes({ - '0%': { - transform: 'scale(3) rotate(0deg)', - }, - '25%': { - transform: 'scale(0.5) rotate(90deg)', - }, - '50%': { - transform: 'scale(2) rotate(180deg)', - }, - '75%': { - transform: 'scale(0.5) rotate(270deg)', - }, - '100%': { - transform: 'scale(3) rotate(360deg)', - }, -}); +// const shrinkGrowSpin = keyframes({ +// '0%': { +// transform: 'scale(3) rotate(0deg)', +// }, +// '25%': { +// transform: 'scale(0.5) rotate(90deg)', +// }, +// '50%': { +// transform: 'scale(2) rotate(180deg)', +// }, +// '75%': { +// transform: 'scale(0.5) rotate(270deg)', +// }, +// '100%': { +// transform: 'scale(3) rotate(360deg)', +// }, +// }); export default { - outerContainer: ({ mq, spacings }: Theme) => + icon: ({ palette }: Theme) => css({ - margin: `${spacings.FULL}rem`, - background: - 'linear-gradient(90deg, #00FFFF, #39FF14, #E0E722, #FF69B4, #FF0000, #E0E722, #00FFFF, #00FFFF)', - - 'background-size': '800% 800%', - border: `${pixelsToRem(25)}rem solid red`, - padding: `${pixelsToRem(25)}rem`, - [mq.GROUP_2_MIN_WIDTH]: { - margin: `${spacings.DOUBLE}rem`, - }, - animation: `${changes} 2s linear infinite`, - }), - container: ({ spacings, mq }: Theme) => - css({ - padding: `${spacings.DOUBLE}rem 0 0 0`, - maxWidth: '63.4rem', - position: 'relative', - [mq.GROUP_1_MIN_WIDTH]: { - padding: `${spacings.TRIPLE}rem 0 ${spacings.FULL}rem 0`, - }, - [mq.GROUP_4_MIN_WIDTH]: { - margin: `0 auto`, - }, - }), - message: ({ spacings, mq }: Theme) => - css({ - marginBottom: `${spacings.HALF}rem`, - [mq.GROUP_1_MIN_WIDTH]: { - marginBottom: `${spacings.FULL}rem`, - }, - }), - chevron: ({ palette, spacings, mq }: Theme) => - css({ - animation: `${shrinkGrowSpin} 4s linear infinite`, color: palette.GREY_10, fill: 'currentColor', - marginInlineStart: `${spacings.FULL}rem`, verticalAlign: 'middle', width: `${pixelsToRem(14)}rem`, height: `${pixelsToRem(14)}rem`, + }), + linkContainer: ({ spacings }: Theme) => + css({ + textDecoration: 'none', + display: 'inline-block', + padding: `${spacings.FULL}rem 0 ${spacings.DOUBLE}rem 0`, + '&:first-of-type span': { + borderLeft: 'none', + }, + }), + linkText: () => + css({ + display: 'inline-block', + textDecoration: 'none', 'a:visited &': { - color: palette.METAL, + color: '#141414', + borderBottom: `${pixelsToRem(1)}rem solid #141414`, }, 'a:focus &, a:hover &': { - color: palette.POSTBOX, - }, - [mq.FORCED_COLOURS]: { - fill: 'linkText', - 'a:visited &': { - fill: 'visitedText', - }, - 'a:active &': { - fill: 'activeText', - }, + borderBottom: `${pixelsToRem(2)}rem solid #141414`, + color: '#141414', }, }), - link: () => + linkTextContainer: ({ spacings }: Theme) => css({ - display: 'inline-block', textDecoration: 'none', + display: 'inline-block', + borderLeft: `${pixelsToRem(1)}rem solid #AEAEB5`, + padding: `0 ${spacings.FULL}rem`, }), - topLinkSpacing: ({ spacings }: Theme) => + selected: () => css({ - padding: `${spacings.FULL + spacings.HALF}rem 0 ${spacings.FULL + spacings.HALF}rem`, + borderBottom: `${pixelsToRem(2)}rem solid #141414`, }), - linkText: ({ palette }: Theme) => + notSelected: () => css({ - borderBottom: `${pixelsToRem(1)}rem solid ${palette.GREY_10}`, - textDecoration: 'none', + margin: `0 0 ${pixelsToRem(2)}rem 0`, 'a:visited &': { - color: palette.METAL, - borderBottom: `${pixelsToRem(1)}rem solid ${palette.METAL}`, + margin: `0 0 ${pixelsToRem(1)}rem 0`, }, 'a:focus &, a:hover &': { - borderBottom: `${pixelsToRem(2)}rem solid ${palette.POSTBOX}`, - color: palette.POSTBOX, + margin: `0`, }, }), + disclaimer: ({ spacings }: Theme) => + css({ + padding: `0 0 ${spacings.TRIPLE}rem 0`, + color: '#545658', + display: 'block', + }), }; diff --git a/src/app/components/EasyReadCTA/index.test.tsx b/src/app/components/EasyReadCTA/index.test.tsx index b096552d838..53644234ea0 100644 --- a/src/app/components/EasyReadCTA/index.test.tsx +++ b/src/app/components/EasyReadCTA/index.test.tsx @@ -5,21 +5,27 @@ import EasyReadCTA from '.'; describe('LiteSiteCTA', () => { it('Should have a hidden strong element with lite site identifier.', () => { const { container } = render( - , + , ); const strongText = container.querySelector('strong'); - expect(strongText?.innerHTML).toBe('Easy read version'); + expect(strongText?.innerHTML).toBe('Format'); expect(strongText).toHaveAttribute('hidden'); }); - it('Should have a CTA link to the main site.', () => { + + it('Should have a CTA link to the easy site.', () => { const { container } = render( - , + , ); - const [ctaText] = container.querySelectorAll('a span'); - const [ctaLink] = container.querySelectorAll( - 'a[href="https://www.test.bbc.com/news/articles/c0g992jmmkko"]', + const [ctaText] = container.querySelectorAll( + 'a[href="/news/articles/crkdy3r685jo"] span span', ); - expect(ctaText?.innerHTML).toBe('Take me to the standard version'); - expect(ctaLink).toBeTruthy(); + + expect(ctaText?.innerHTML).toBe('Easy read'); }); }); diff --git a/src/app/components/EasyReadCTA/index.tsx b/src/app/components/EasyReadCTA/index.tsx index c4b43494dc7..e99e3d37f1a 100644 --- a/src/app/components/EasyReadCTA/index.tsx +++ b/src/app/components/EasyReadCTA/index.tsx @@ -1,110 +1,109 @@ /** @jsx jsx */ import { useContext } from 'react'; import { jsx } from '@emotion/react'; -import Paragraph from '../Paragraph'; +import { GridItemMedium } from '#app/legacy/components/Grid'; +import { RequestContext } from '#app/contexts/RequestContext'; import Text from '../Text'; -import { LeftChevron, RightChevron } from '../icons'; import { ServiceContext } from '../../contexts/ServiceContext'; import styles from './index.styles'; import { defaultTranslations } from './config'; +import InlineLink from '../InlineLink'; +import { FormatIcon } from '../icons'; type CtaLinkProps = { - isRtl: boolean; href: string; text: string; - fontVariant?: string; - showChevron?: boolean; ignoreLiteExtension?: boolean; className?: string; + selected?: boolean; }; -const CtaLink = ({ - isRtl, - href, - text, - fontVariant = 'sansRegular', - showChevron = false, - ignoreLiteExtension = false, - className, -}: CtaLinkProps) => { - const chevron = isRtl ? ( - - ) : ( - - ); +export const createHrefRelativeToPage = (currentPath: string, id?: string) => { + const noExtenstionPath = currentPath.split('.')[0]; + const slugs = noExtenstionPath.split('/'); + const idToAppend = id ?? slugs[slugs.length - 1]; + slugs.splice(-1, 1, idToAppend); + + return slugs.join('/').replace(' ', ''); +}; +const CtaLink = ({ href, text, className, selected = false }: CtaLinkProps) => { return (
- - {text} - - {showChevron && chevron} + + + {text} + + ); }; type Props = { - easyVersionLink?: string; - fullVersionLink?: string; + easyReadAssetId?: string; + originalAssetId?: string; }; -const EasyReadCTA = ({ easyVersionLink, fullVersionLink }: Props) => { - const isEasyVersion = fullVersionLink != null; +const EasyReadCTA = ({ easyReadAssetId, originalAssetId }: Props) => { + const { pathname } = useContext(RequestContext); + const { translations } = useContext(ServiceContext); + + if (easyReadAssetId == null && originalAssetId == null) { + return null; + } + + const easyHref = createHrefRelativeToPage(pathname, easyReadAssetId); + const originalHref = createHrefRelativeToPage(pathname, originalAssetId); + + const isEasyActive = easyReadAssetId == null; - const { dir, translations } = useContext(ServiceContext); - const isRtl = dir === 'rtl'; const { easyReadSite = defaultTranslations } = translations; const { - easyOnboardingMessage, - standardOnboardingMessage, toStandardSite, toEasySite, - easySite, - standardSite, + format, aIDisclaimer, + learnMore, + learnMoreLink, } = easyReadSite; - const id = 'LiteSiteCta'; - const href = isEasyVersion ? fullVersionLink : easyVersionLink; - - if (href == null) return null; + const id = 'Format'; return ( -
- -
- - {isEasyVersion ? easyOnboardingMessage : standardOnboardingMessage} - - {isEasyVersion && ( - - {aIDisclaimer} - - )} - - - -
-
+ +
+ + + + +
+ {isEasyActive && ( + + {aIDisclaimer} . + + )} +
); }; diff --git a/src/app/components/EasyReadCTAVersion2/config.tsx b/src/app/components/EasyReadCTAVersion2/config.tsx deleted file mode 100644 index 27404ad76be..00000000000 --- a/src/app/components/EasyReadCTAVersion2/config.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable import/prefer-default-export */ -export const defaultTranslations = { - aIDisclaimer: `This easy read article has been checked by a journalist. It was created with AI (artificial intelligence) from the standard format.`, - toStandardSite: 'Standard', - toEasySite: 'Easy read', - learnMore: 'Learn more about easy read', - learnMoreLink: 'https://www.bbc.co.uk/', - format: 'Format', -}; diff --git a/src/app/components/EasyReadCTAVersion2/index.stories.tsx b/src/app/components/EasyReadCTAVersion2/index.stories.tsx deleted file mode 100644 index 64e4f21ee26..00000000000 --- a/src/app/components/EasyReadCTAVersion2/index.stories.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import EasyReadCTA from '.'; - -export const Component = () => ( - -); - -export const EasyComponent = () => ( - -); - -export default { - title: 'Components/EasyReadCTAVersion2', - Component, -}; diff --git a/src/app/components/EasyReadCTAVersion2/index.styles.tsx b/src/app/components/EasyReadCTAVersion2/index.styles.tsx deleted file mode 100644 index 5df2ac66995..00000000000 --- a/src/app/components/EasyReadCTAVersion2/index.styles.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { css, Theme } from '@emotion/react'; -import pixelsToRem from '../../utilities/pixelsToRem'; - -export default { - icon: ({ palette }: Theme) => - css({ - color: palette.GREY_10, - fill: 'currentColor', - verticalAlign: 'middle', - width: `${pixelsToRem(14)}rem`, - height: `${pixelsToRem(14)}rem`, - }), - linkContainer: ({ spacings }: Theme) => - css({ - textDecoration: 'none', - display: 'inline-block', - padding: `${spacings.FULL}rem 0 ${spacings.DOUBLE}rem 0`, - '&:first-of-type span': { - borderLeft: 'none', - }, - }), - linkText: () => - css({ - display: 'inline-block', - textDecoration: 'none', - 'a:visited &': { - color: '#141414', - borderBottom: `${pixelsToRem(1)}rem solid #141414`, - }, - 'a:focus &, a:hover &': { - borderBottom: `${pixelsToRem(2)}rem solid #141414`, - color: '#141414', - }, - }), - linkTextContainer: ({ spacings }: Theme) => - css({ - textDecoration: 'none', - display: 'inline-block', - borderLeft: `${pixelsToRem(1)}rem solid #AEAEB5`, - padding: `0 ${spacings.FULL}rem`, - }), - selected: () => - css({ - borderBottom: `${pixelsToRem(2)}rem solid #141414`, - }), - notSelected: () => - css({ - margin: `0 0 ${pixelsToRem(2)}rem 0`, - 'a:visited &': { - margin: `0 0 ${pixelsToRem(1)}rem 0`, - }, - 'a:focus &, a:hover &': { - margin: `0`, - }, - }), - disclaimer: ({ spacings }: Theme) => - css({ - padding: `0 0 ${spacings.TRIPLE}rem 0`, - color: '#545658', - display: 'block', - }), -}; diff --git a/src/app/components/EasyReadCTAVersion2/index.test.tsx b/src/app/components/EasyReadCTAVersion2/index.test.tsx deleted file mode 100644 index 53644234ea0..00000000000 --- a/src/app/components/EasyReadCTAVersion2/index.test.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import { render } from '../react-testing-library-with-providers'; -import EasyReadCTA from '.'; - -describe('LiteSiteCTA', () => { - it('Should have a hidden strong element with lite site identifier.', () => { - const { container } = render( - , - ); - const strongText = container.querySelector('strong'); - expect(strongText?.innerHTML).toBe('Format'); - expect(strongText).toHaveAttribute('hidden'); - }); - - it('Should have a CTA link to the easy site.', () => { - const { container } = render( - , - ); - const [ctaText] = container.querySelectorAll( - 'a[href="/news/articles/crkdy3r685jo"] span span', - ); - - expect(ctaText?.innerHTML).toBe('Easy read'); - }); -}); diff --git a/src/app/components/EasyReadCTAVersion2/index.tsx b/src/app/components/EasyReadCTAVersion2/index.tsx deleted file mode 100644 index e99e3d37f1a..00000000000 --- a/src/app/components/EasyReadCTAVersion2/index.tsx +++ /dev/null @@ -1,110 +0,0 @@ -/** @jsx jsx */ -import { useContext } from 'react'; -import { jsx } from '@emotion/react'; -import { GridItemMedium } from '#app/legacy/components/Grid'; -import { RequestContext } from '#app/contexts/RequestContext'; -import Text from '../Text'; -import { ServiceContext } from '../../contexts/ServiceContext'; -import styles from './index.styles'; -import { defaultTranslations } from './config'; -import InlineLink from '../InlineLink'; -import { FormatIcon } from '../icons'; - -type CtaLinkProps = { - href: string; - text: string; - ignoreLiteExtension?: boolean; - className?: string; - selected?: boolean; -}; - -export const createHrefRelativeToPage = (currentPath: string, id?: string) => { - const noExtenstionPath = currentPath.split('.')[0]; - const slugs = noExtenstionPath.split('/'); - const idToAppend = id ?? slugs[slugs.length - 1]; - slugs.splice(-1, 1, idToAppend); - - return slugs.join('/').replace(' ', ''); -}; - -const CtaLink = ({ href, text, className, selected = false }: CtaLinkProps) => { - return ( - - - - {text} - - - - ); -}; - -type Props = { - easyReadAssetId?: string; - originalAssetId?: string; -}; - -const EasyReadCTA = ({ easyReadAssetId, originalAssetId }: Props) => { - const { pathname } = useContext(RequestContext); - const { translations } = useContext(ServiceContext); - - if (easyReadAssetId == null && originalAssetId == null) { - return null; - } - - const easyHref = createHrefRelativeToPage(pathname, easyReadAssetId); - const originalHref = createHrefRelativeToPage(pathname, originalAssetId); - - const isEasyActive = easyReadAssetId == null; - - const { easyReadSite = defaultTranslations } = translations; - const { - toStandardSite, - toEasySite, - format, - aIDisclaimer, - learnMore, - learnMoreLink, - } = easyReadSite; - - const id = 'Format'; - - return ( - -
- - - - -
- {isEasyActive && ( - - {aIDisclaimer} . - - )} -
- ); -}; - -export default EasyReadCTA; diff --git a/src/app/pages/ArticlePage/ArticlePage.tsx b/src/app/pages/ArticlePage/ArticlePage.tsx index 68953e82064..3fffe859afc 100644 --- a/src/app/pages/ArticlePage/ArticlePage.tsx +++ b/src/app/pages/ArticlePage/ArticlePage.tsx @@ -47,7 +47,7 @@ import JumpTo, { JumpToProps } from '#app/components/JumpTo'; import useOptimizelyVariation from '#app/hooks/useOptimizelyVariation'; import OptimizelyArticleCompleteTracking from '#app/legacy/containers/OptimizelyArticleCompleteTracking'; import OptimizelyPageViewTracking from '#app/legacy/containers/OptimizelyPageViewTracking'; -import EasyReadCTAVersion2 from '#app/components/EasyReadCTAVersion2'; +import EasyReadCTAVersion2 from '#app/components/EasyReadCTA'; import ElectionBanner from './ElectionBanner'; import ImageWithCaption from '../../components/ImageWithCaption'; import AdContainer from '../../components/Ad'; @@ -76,31 +76,6 @@ import { ComponentToRenderProps, TimeStampProps } from './types'; const ArticlePage = ({ pageData }: { pageData: Article }) => { const { isApp, pageType, service } = useContext(RequestContext); - // SHOULD MOVE TO REQUEST CONTEXT - const easyMetaBlock = pageData.content.model.blocks.find( - block => block.type === 'easyReadMeta', - ); - const isEasyPage = easyMetaBlock != null; - - // MOVE TO BFF - if (!isEasyPage) { - const easyReadStandardBlockIndex = pageData.content.model.blocks.findIndex( - block => block.type === 'easyRead', - ); - if (easyReadStandardBlockIndex) { - const { blocks } = pageData.content.model; - const { - model: { blocks: standardMetaBlock }, - } = blocks[easyReadStandardBlockIndex] as EasyReadMetaBlock; - const metaBlock = standardMetaBlock.find( - block => block.type === 'easyReadMeta', - ); - if (metaBlock) { - blocks.splice(1, easyReadStandardBlockIndex, metaBlock); - } - } - } - const { articleAuthor, isTrustProjectParticipant, @@ -133,6 +108,44 @@ const ArticlePage = ({ pageData }: { pageData: Article }) => { block => block.type === 'byline', ) as OptimoBylineBlock; + // HACKATHON CHANGES + // SHOULD MOVE TO REQUEST CONTEXT + let targetBlock = null; + let removeIndex = null; + const easyMetaBlockIndex = blocks.findIndex( + block => block.type === 'easyReadMeta', + ); + const isEasyPage = easyMetaBlockIndex > -1; + + if (isEasyPage) { + targetBlock = blocks[easyMetaBlockIndex]; + removeIndex = easyMetaBlockIndex; + } + + // MOVE TO BFF + if (!isEasyPage) { + const easyReadStandardBlockIndex = blocks.findIndex( + block => block.type === 'easyRead', + ); + if (easyReadStandardBlockIndex) { + const { blocks: easyReadMetaBlocks } = pageData.content.model; + const { + model: { blocks: standardMetaBlock }, + } = easyReadMetaBlocks[easyReadStandardBlockIndex] as EasyReadMetaBlock; + const metaBlock = standardMetaBlock.find( + block => block.type === 'easyReadMeta', + ); + targetBlock = metaBlock; + removeIndex = easyReadStandardBlockIndex; + } + } + + if (targetBlock && removeIndex) { + // INSERT AFTER HEADING + blocks.splice(1, 0, targetBlock); + blocks.splice(removeIndex, 1); + } + const bylineContribBlocks = bylineBlock?.model?.blocks || []; const bylineLinkedData = bylineExtractor(bylineContribBlocks); From 973f48b7b12c3d3d604e017e2bd871d289ccdd6d Mon Sep 17 00:00:00 2001 From: Shayne Marc Enzo Ahchoon Date: Thu, 19 Dec 2024 10:05:01 +0000 Subject: [PATCH 10/14] WSTEAM1-HACK: Remove --- src/app/legacy/psammead/psammead-headings/src/index.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/legacy/psammead/psammead-headings/src/index.jsx b/src/app/legacy/psammead/psammead-headings/src/index.jsx index 5018db651ad..5f5b576fd87 100644 --- a/src/app/legacy/psammead/psammead-headings/src/index.jsx +++ b/src/app/legacy/psammead/psammead-headings/src/index.jsx @@ -23,11 +23,9 @@ export const Headline = styled.h1` theme.isDarkUi ? theme.palette.GREY_2 : theme.palette.GREY_10}; display: block; /* Explicitly set */ margin: 0; /* Reset */ - padding: ${GEL_SPACING_QUAD} 0 - ${slimPadding => (slimPadding ? GEL_SPACING_TRPL : GEL_SPACING_QUAD)} 0; + padding: ${GEL_SPACING_QUAD} 0; ${MEDIA_QUERY_TYPOGRAPHY.LAPTOP_AND_LARGER} { - padding: ${GEL_SPACING_QUIN} 0 - ${slimPadding => (slimPadding ? GEL_SPACING_QUAD : GEL_SPACING_QUIN)} 0; + padding: ${GEL_SPACING_QUIN} 0; } `; From 2cf92506920a6c372651c7d9b064c20f7e415a85 Mon Sep 17 00:00:00 2001 From: Shayne Marc Enzo Ahchoon Date: Thu, 19 Dec 2024 10:34:43 +0000 Subject: [PATCH 11/14] WSTEAM1-HACK: Update: --- src/app/pages/ArticlePage/ArticlePage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/pages/ArticlePage/ArticlePage.tsx b/src/app/pages/ArticlePage/ArticlePage.tsx index 3fffe859afc..6dd2d31a53c 100644 --- a/src/app/pages/ArticlePage/ArticlePage.tsx +++ b/src/app/pages/ArticlePage/ArticlePage.tsx @@ -127,7 +127,8 @@ const ArticlePage = ({ pageData }: { pageData: Article }) => { const easyReadStandardBlockIndex = blocks.findIndex( block => block.type === 'easyRead', ); - if (easyReadStandardBlockIndex) { + + if (easyReadStandardBlockIndex > -1) { const { blocks: easyReadMetaBlocks } = pageData.content.model; const { model: { blocks: standardMetaBlock }, From 2f69cc4f68b01aed9562cb6550fde2f1a3680541 Mon Sep 17 00:00:00 2001 From: Shayne Marc Enzo Ahchoon Date: Thu, 19 Dec 2024 11:28:56 +0000 Subject: [PATCH 12/14] WSTEAM1-HACK: Update --- .../components/EasyReadCTA/index.stories.tsx | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/app/components/EasyReadCTA/index.stories.tsx b/src/app/components/EasyReadCTA/index.stories.tsx index 64e4f21ee26..a5853a7bab0 100644 --- a/src/app/components/EasyReadCTA/index.stories.tsx +++ b/src/app/components/EasyReadCTA/index.stories.tsx @@ -1,12 +1,28 @@ import React from 'react'; +import { RequestContextProvider } from '#app/contexts/RequestContext'; import EasyReadCTA from '.'; export const Component = () => ( - + + + ); export const EasyComponent = () => ( - + + {' '} + ); export default { From 3a7ab239efd70e1786c40d86b8c1ae9e9cd770b0 Mon Sep 17 00:00:00 2001 From: Shayne Marc Enzo Ahchoon Date: Thu, 19 Dec 2024 11:52:20 +0000 Subject: [PATCH 13/14] WSTEAM1-HACK: NPM NEXT AUDIT ONLY --- ws-nextjs-app/package.json | 2 +- yarn.lock | 120 ++++++++++++++++++------------------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/ws-nextjs-app/package.json b/ws-nextjs-app/package.json index 1ee89e5a4ab..0bbe46c4f16 100644 --- a/ws-nextjs-app/package.json +++ b/ws-nextjs-app/package.json @@ -45,6 +45,6 @@ "ts-node": "^10.9.2" }, "dependencies": { - "next": "14.2.10" + "next": "14.2.15" } } diff --git a/yarn.lock b/yarn.lock index dc7f8457aab..1b899374606 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5409,17 +5409,10 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:14.2.10": - version: 14.2.10 - resolution: "@next/env@npm:14.2.10" - checksum: 10/52754033a280e2ea804bcf15df5f13fe24db6d7b9b571676e8ba79735675d66716c2d9e51a2f5b2ba6c6492178f4c82c572b3f4097efd890dfda38fd8a4328c4 - languageName: node - linkType: hard - -"@next/swc-darwin-arm64@npm:14.2.10": - version: 14.2.10 - resolution: "@next/swc-darwin-arm64@npm:14.2.10" - conditions: os=darwin & cpu=arm64 +"@next/env@npm:14.2.15": + version: 14.2.15 + resolution: "@next/env@npm:14.2.15" + checksum: 10/76257d838aa8d6ede9240e4e8fd21847304b4d593fb758ea91c96e38818784e4f059d3b4c154e83b21983ea452fc7f4d1dc257d607ebba97c80db06ca4f9148a languageName: node linkType: hard @@ -5431,9 +5424,16 @@ __metadata: languageName: node linkType: hard -"@next/swc-darwin-x64@npm:14.2.10": - version: 14.2.10 - resolution: "@next/swc-darwin-x64@npm:14.2.10" +"@next/swc-darwin-arm64@npm:14.2.15": + version: 14.2.15 + resolution: "@next/swc-darwin-arm64@npm:14.2.15" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@next/swc-darwin-x64@npm:14.2.15": + version: 14.2.15 + resolution: "@next/swc-darwin-x64@npm:14.2.15" conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -5446,13 +5446,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:14.2.10": - version: 14.2.10 - resolution: "@next/swc-linux-arm64-gnu@npm:14.2.10" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - "@next/swc-linux-arm64-gnu@npm:14.2.14": version: 14.2.14 resolution: "@next/swc-linux-arm64-gnu@npm:14.2.14" @@ -5461,17 +5454,17 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:14.2.10": - version: 14.2.10 - resolution: "@next/swc-linux-arm64-musl@npm:14.2.10" - conditions: os=linux & cpu=arm64 & libc=musl +"@next/swc-linux-arm64-gnu@npm:14.2.15": + version: 14.2.15 + resolution: "@next/swc-linux-arm64-gnu@npm:14.2.15" + conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:14.2.10": - version: 14.2.10 - resolution: "@next/swc-linux-x64-gnu@npm:14.2.10" - conditions: os=linux & cpu=x64 & libc=glibc +"@next/swc-linux-arm64-musl@npm:14.2.15": + version: 14.2.15 + resolution: "@next/swc-linux-arm64-musl@npm:14.2.15" + conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -5483,17 +5476,17 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:14.2.10": - version: 14.2.10 - resolution: "@next/swc-linux-x64-musl@npm:14.2.10" - conditions: os=linux & cpu=x64 & libc=musl +"@next/swc-linux-x64-gnu@npm:14.2.15": + version: 14.2.15 + resolution: "@next/swc-linux-x64-gnu@npm:14.2.15" + conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:14.2.10": - version: 14.2.10 - resolution: "@next/swc-win32-arm64-msvc@npm:14.2.10" - conditions: os=win32 & cpu=arm64 +"@next/swc-linux-x64-musl@npm:14.2.15": + version: 14.2.15 + resolution: "@next/swc-linux-x64-musl@npm:14.2.15" + conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -5505,17 +5498,17 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:14.2.10": - version: 14.2.10 - resolution: "@next/swc-win32-ia32-msvc@npm:14.2.10" - conditions: os=win32 & cpu=ia32 +"@next/swc-win32-arm64-msvc@npm:14.2.15": + version: 14.2.15 + resolution: "@next/swc-win32-arm64-msvc@npm:14.2.15" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:14.2.10": - version: 14.2.10 - resolution: "@next/swc-win32-x64-msvc@npm:14.2.10" - conditions: os=win32 & cpu=x64 +"@next/swc-win32-ia32-msvc@npm:14.2.15": + version: 14.2.15 + resolution: "@next/swc-win32-ia32-msvc@npm:14.2.15" + conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -5527,6 +5520,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-win32-x64-msvc@npm:14.2.15": + version: 14.2.15 + resolution: "@next/swc-win32-x64-msvc@npm:14.2.15" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@nicolo-ribaudo/chokidar-2@npm:2.1.8-no-fsevents.2": version: 2.1.8-no-fsevents.2 resolution: "@nicolo-ribaudo/chokidar-2@npm:2.1.8-no-fsevents.2" @@ -16114,20 +16114,20 @@ __metadata: languageName: node linkType: hard -"next@npm:14.2.10": - version: 14.2.10 - resolution: "next@npm:14.2.10" +"next@npm:14.2.15": + version: 14.2.15 + resolution: "next@npm:14.2.15" dependencies: - "@next/env": "npm:14.2.10" - "@next/swc-darwin-arm64": "npm:14.2.10" - "@next/swc-darwin-x64": "npm:14.2.10" - "@next/swc-linux-arm64-gnu": "npm:14.2.10" - "@next/swc-linux-arm64-musl": "npm:14.2.10" - "@next/swc-linux-x64-gnu": "npm:14.2.10" - "@next/swc-linux-x64-musl": "npm:14.2.10" - "@next/swc-win32-arm64-msvc": "npm:14.2.10" - "@next/swc-win32-ia32-msvc": "npm:14.2.10" - "@next/swc-win32-x64-msvc": "npm:14.2.10" + "@next/env": "npm:14.2.15" + "@next/swc-darwin-arm64": "npm:14.2.15" + "@next/swc-darwin-x64": "npm:14.2.15" + "@next/swc-linux-arm64-gnu": "npm:14.2.15" + "@next/swc-linux-arm64-musl": "npm:14.2.15" + "@next/swc-linux-x64-gnu": "npm:14.2.15" + "@next/swc-linux-x64-musl": "npm:14.2.15" + "@next/swc-win32-arm64-msvc": "npm:14.2.15" + "@next/swc-win32-ia32-msvc": "npm:14.2.15" + "@next/swc-win32-x64-msvc": "npm:14.2.15" "@swc/helpers": "npm:0.5.5" busboy: "npm:1.6.0" caniuse-lite: "npm:^1.0.30001579" @@ -16168,7 +16168,7 @@ __metadata: optional: true bin: next: dist/bin/next - checksum: 10/73b254332a04d41885aa63b23d692d8e1c665de4db383b29363292729b128c22ade07cae1fd1e088a9cbb595106047397bbf92bc769b124f4069844833c0a06c + checksum: 10/5c5ed27888540f3ace732c2645a84b60d9e9c572cb335c5e9ff2a78a2eba704705e92e3c3d22586fd18d1621c70a5fb7ca8c8499550734d243fdec5d2a9c8a93 languageName: node linkType: hard @@ -18770,7 +18770,7 @@ __metadata: cypress-terminal-report: "npm:7.0.4" jest: "npm:^29.7.0" jest-environment-jsdom: "npm:^29.7.0" - next: "npm:14.2.10" + next: "npm:14.2.15" next-test-api-route-handler: "npm:^4.0.8" npm-run-all2: "npm:7.0.1" ts-node: "npm:^10.9.2" From afef94386175edd6664df97feb3477b7a3d18a24 Mon Sep 17 00:00:00 2001 From: Shayne Marc Enzo Ahchoon Date: Thu, 19 Dec 2024 12:12:35 +0000 Subject: [PATCH 14/14] WSTEAM1-HACK: Update --- src/app/pages/ArticlePage/ArticlePage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/ArticlePage/ArticlePage.tsx b/src/app/pages/ArticlePage/ArticlePage.tsx index 6dd2d31a53c..fdd1d567a82 100644 --- a/src/app/pages/ArticlePage/ArticlePage.tsx +++ b/src/app/pages/ArticlePage/ArticlePage.tsx @@ -143,8 +143,8 @@ const ArticlePage = ({ pageData }: { pageData: Article }) => { if (targetBlock && removeIndex) { // INSERT AFTER HEADING - blocks.splice(1, 0, targetBlock); blocks.splice(removeIndex, 1); + blocks.splice(1, 0, targetBlock); } const bylineContribBlocks = bylineBlock?.model?.blocks || [];