Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wsteama 1522 header investigation incorporating ojs into nav #12282

Draft
wants to merge 51 commits into
base: latest
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
ac13f6c
top stories showing on page
LilyL0u Dec 28, 2024
184d4e8
most read data in component and OJ is complementary aside
LilyL0u Dec 28, 2024
63035bc
fix broken other scrollable promo
LilyL0u Dec 28, 2024
f6ae1e3
use switch case
LilyL0u Dec 28, 2024
212bb01
do not show on PGLs or TC2s
LilyL0u Dec 28, 2024
6a1fcd5
do not show component over 1007px
LilyL0u Dec 28, 2024
613642b
storybook components and fixture data for storybook
LilyL0u Dec 28, 2024
f7df9cd
ariaLabelledBy must be different from other most read or top stories …
LilyL0u Dec 29, 2024
5bac80c
snapshots and check for presence of most read data before trying to a…
LilyL0u Dec 29, 2024
c1260da
translations for titles
LilyL0u Dec 29, 2024
c51eb0b
add fallback title for if no translations
LilyL0u Dec 29, 2024
81e5bc6
scrollable promo tests
LilyL0u Dec 29, 2024
102c169
snapshots with translation
LilyL0u Dec 29, 2024
37004c5
some top stories do not have same headline structure
LilyL0u Dec 30, 2024
79ba241
comments on getting variant from optimizely
LilyL0u Dec 30, 2024
c602b5c
renames, refactors
LilyL0u Dec 30, 2024
f0dfaea
else if needed or title fall through
LilyL0u Dec 30, 2024
7a287c7
default value for pathOr in proper place
LilyL0u Dec 30, 2024
f525490
add hyphen to title so it isn't the same as other oj component
LilyL0u Dec 30, 2024
4d01e13
check for presence of any oj data needed before rendering
LilyL0u Dec 31, 2024
42f60b8
check nothing has broken with control variant none
LilyL0u Dec 31, 2024
00bc7de
WSTEAMA-1531-oj-top-bar-in-nav-list-spike
LilyL0u Jan 15, 2025
9cf6dbb
move oj into nav and background colour
LilyL0u Feb 5, 2025
c406ef6
merge conflict solution pageLayoutWrapper
LilyL0u Feb 6, 2025
1574a94
adds media query for oj top bar
holchris Feb 6, 2025
43db541
remove border styling
holchris Feb 6, 2025
d7b663a
adds margin override
holchris Feb 6, 2025
3fb1c23
adds scroll
holchris Feb 6, 2025
fb26380
Merge branch 'latest' into WSTEAMA-1522-header-investigation-incorpor…
LilyL0u Feb 7, 2025
024ade9
original scrollable promo must show on desktop
LilyL0u Feb 7, 2025
7901c9c
move border above scrollable promo
LilyL0u Feb 7, 2025
ebc0469
Use overflow-x and set to auto
mattbbc Feb 7, 2025
73b0dc1
height of cards to fit longest title
LilyL0u Feb 7, 2025
7268704
add liveLabel to top stories if item is live
LilyL0u Feb 7, 2025
ec4208b
make container full width so no white space either side
LilyL0u Feb 7, 2025
469e3d3
formatting of code line
LilyL0u Feb 7, 2025
065ecf7
fix error in merge conflict solution 1
LilyL0u Feb 7, 2025
070b0e9
solving merge conflict did not seem to end in latest of articlepage, …
LilyL0u Feb 7, 2025
8edacb7
Responsive widths per Figma
mattbbc Feb 7, 2025
7e5260e
fix experiment variant unit tests by correcting variable name
LilyL0u Feb 7, 2025
f37e4fa
decapitalise
LilyL0u Feb 7, 2025
8f7265d
Merge branches 'WSTEAMA-1522-header-investigation-incorporating-ojs-i…
LilyL0u Feb 10, 2025
930cc79
add test ids to pulse parts
LilyL0u Feb 10, 2025
ffae0aa
add fixture data for top story with live item
LilyL0u Feb 10, 2025
5ee2291
Merge branch 'latest' into WSTEAMA-1522-header-investigation-incorpor…
mattbbc Feb 10, 2025
54c198e
Merge branch 'latest' into WSTEAMA-1522-header-investigation-incorpor…
mattbbc Feb 10, 2025
b7b5bb1
trying to fix yarn nonsense
LilyL0u Feb 10, 2025
63e3d8b
FIX: down with this sort of thing
eagerterrier Feb 10, 2025
6e17968
Merge branch 'latest' into WSTEAMA-1522-header-investigation-incorpor…
LilyL0u Feb 10, 2025
1556c7b
Merge branch 'latest' into WSTEAMA-1522-header-investigation-incorpor…
eagerterrier Feb 10, 2025
3040543
FIX: bad merge
eagerterrier Feb 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 0 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@ module.exports = {
'linebreak-style': process.platform === 'win32' ? 'off' : ['error', 'unix'],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'import/no-import-module-exports': [
'error',
{
exceptions: ['**/*/startServer.js'],
},
],
'import/no-extraneous-dependencies': [
'off',
{
Expand Down Expand Up @@ -100,14 +94,6 @@ module.exports = {
// adds support for type, interface and enum declarations https://typescript-eslint.io/rules/no-use-before-define/#how-to-use
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'react/require-default-props': 'off',
'react/no-unused-prop-types': 'off',
},
Expand Down
24 changes: 8 additions & 16 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ updates:
- dependency-name: 'webpack'
update-types: ['version-update:semver-major']
- dependency-name: 'winston'
# https://jira.dev.bbc.co.uk/browse/NEWSWORLDSERVICE-2185: Latest version of eslint has breaking changes
- dependency-name: eslint
update-types: ['version-update:semver-major']
- dependency-name: '@typescript-eslint/eslint-plugin'
update-types: ['version-update:semver-major']
# Latest version of Emotion contains a memory leak that needs resolved: https://github.com/emotion-js/emotion/issues/3221
- dependency-name: '@emotion/*'
# Opera Mini unsupported packages
- dependency-name: 'uuid' # https://github.com/bbc/simorgh/pull/11840
- dependency-name: '@types/uuid' # https://github.com/bbc/simorgh/pull/11840
Expand All @@ -30,9 +29,6 @@ updates:
patterns:
- '@babel/*'
- 'babel-*'
bbc:
patterns:
- '@bbc/*'
emotion:
patterns:
- '@emotion/*'
Expand All @@ -41,21 +37,17 @@ updates:
- '@next/*'
- 'next'
- 'next-*'
- '@img-sharp-*'
loadable-minor-patch:
patterns:
- '@loadable/*'
react:
patterns:
- 'react'
- 'react-dom'
- '@types/react'
- '@types/react-dom'
storybook:
patterns:
- '@storybook/*'
- 'storybook'
- '@esbuild/*'
bbc:
patterns:
- '@bbc/*'
loadable-minor-patch:
patterns:
- '@loadable/*'
webpack-minor-patch:
patterns:
- 'webpack'
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-6b67494872-10.zip
Binary file not shown.
2 changes: 0 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ yarnPath: .yarn/releases/yarn-4.1.1.cjs
npmAuditExcludePackages: []

npmAuditIgnoreAdvisories: []

defaultSemverRangePrefix: ""
4 changes: 3 additions & 1 deletion cypress/e2e/pages/topicPage/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import idSanitiser from '../../../../src/app/lib/utilities/idSanitiser';

export default ({ service, pageType, variant, currentPath }) => {
let topicId;
let variantTopicId;
let topicTitle;
let firstItemHeadline;
let pageCount;
Expand Down Expand Up @@ -34,6 +35,7 @@ export default ({ service, pageType, variant, currentPath }) => {
cy.getPageDataFromWindow().then(data => {
const { pageData } = data;
topicTitle = pageData.title;
variantTopicId = pageData.scriptSwitchId;
pageCount = pageData.pageCount;
numberOfItems = pageData.curations?.[0]?.summaries.length;
firstItemHeadline = pageData.curations?.[0]?.summaries?.[0]?.title;
Expand Down Expand Up @@ -269,7 +271,7 @@ export default ({ service, pageType, variant, currentPath }) => {
// URL contains correct variant after click
cy.url().should('contain', otherVariant);
// URL contains the correct topic ID
cy.url().should('contain', topicId);
cy.url().should('contain', variantTopicId);
// clicks script switch
cy.get(`[data-variant="${variant}"]`).click();
// URL contains correct variant after click
Expand Down
52 changes: 37 additions & 15 deletions cypress/support/config/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ module.exports = () => ({
test: {
paths: [
'/afrique/region-23278969', // CPS MAP
'/afrique/nos_emissions/2016/06/160622_tc2_testmap1?renderer_env=test', // TC2 MAP
'/afrique/nos_emissions/2016/06/160622_tc2_testmap1', // TC2 MAP
],
enabled: true,
},
Expand Down Expand Up @@ -663,7 +663,7 @@ module.exports = () => ({
test: {
paths: [
'/arabic/world-23278971', // CPS audio
'/arabic/worldnews/2015/11/151120_t_arabic_av?renderer_env=test', // TC2 video
'/arabic/worldnews/2015/11/151120_t_arabic_av', // TC2 video
],
enabled: true,
},
Expand Down Expand Up @@ -1831,7 +1831,7 @@ module.exports = () => ({
test: {
paths: [
'/hausa/23269030', // CPS MAP with video clip
'/hausa/multimedia/2016/07/160714_tc2_audiomap?renderer_env=test', // TC2 MAP with audio clip
'/hausa/multimedia/2016/07/160714_tc2_audiomap', // TC2 MAP with audio clip
],
enabled: true,
},
Expand Down Expand Up @@ -2042,7 +2042,7 @@ module.exports = () => ({
test: {
paths: [
'/hindi/23201477', // CPS video
'/hindi/sport/2016/08/160822_tc2_testmap1?renderer_env=test', // TC2 video
'/hindi/sport/2016/08/160822_tc2_testmap1', // TC2 video
],
enabled: true,
},
Expand Down Expand Up @@ -3845,7 +3845,7 @@ module.exports = () => ({
test: {
paths: [
'/pashto/media-23257523', // CPS MAP with video clip
'/pashto/world/2016/09/160921_tc2_testmap1?renderer_env=test', // TC2 MAP with video clip
'/pashto/world/2016/09/160921_tc2_testmap1', // TC2 MAP with video clip
],
enabled: false,
},
Expand Down Expand Up @@ -3953,7 +3953,7 @@ module.exports = () => ({
// '/pashto', // Front Page
'/pashto/bbc_pashto_radio/liveradio', // Live Radio
// '/pashto/media-23257523', // CPS MAP
'/pashto/world/2016/09/160921_tc2_testmap1?renderer_env=test', // TC2 MAP
'/pashto/world/2016/09/160921_tc2_testmap1', // TC2 MAP
'/pashto/23289748', // CPS STY
'/pashto/23092924', // CPS PGL
'/pashto/bbc_pashto_radio/programmes/p0340yr4', // On Demand Radio Brand
Expand Down Expand Up @@ -4013,15 +4013,24 @@ module.exports = () => ({
liveRadio: {
environments: {
live: {
paths: ['/persian/bbc_dari_radio/liveradio'],
paths: [
'/persian/bbc_persian_radio/liveradio',
'/persian/bbc_dari_radio/liveradio',
],
enabled: true,
},
test: {
paths: ['/persian/bbc_dari_radio/liveradio?renderer_env=live'],
paths: [
'/persian/bbc_persian_radio/liveradio?renderer_env=live',
'/persian/bbc_dari_radio/liveradio?renderer_env=live',
],
enabled: true,
},
local: {
paths: ['/persian/bbc_dari_radio/liveradio'],
paths: [
'/persian/bbc_persian_radio/liveradio',
'/persian/bbc_dari_radio/liveradio',
],
enabled: true,
},
},
Expand All @@ -4032,7 +4041,9 @@ module.exports = () => ({
live: {
paths: [
'/persian/bbc_dari_radio/programmes/p0340v0s', // On Demand Brand Dari
'/persian/bbc_persian_radio/programmes/p0340vyx', // On Demand Brand Persian
'/persian/bbc_dari_radio/w172y2n5p9pfj6x', // On Demand Episode Dari
'/persian/bbc_persian_radio/w3ct2cv6', // On Demand Episode Persian
'/persian/podcasts/p02pc9wf', // Podcast Brand
'/persian/podcasts/p02pc9wf/p09knl1v', // Podcast Episode
],
Expand All @@ -4041,14 +4052,17 @@ module.exports = () => ({
test: {
paths: [
'/persian/bbc_dari_radio/programmes/p0364sj5', // On Demand Brand Dari
'/persian/bbc_persian_radio/programmes/p0340vyw', // On Demand Brand Persian
'/persian/bbc_dari_radio/w172y2n5p9pfj6x', // On Demand Episode Dari
'/persian/bbc_persian_radio/w3ct2cv6', // On Demand Episode Persian
'/persian/podcasts/p02pc9wf', // Podcast Brand
'/persian/podcasts/p02pc9wf/p09knl1v', // Podcast Episode
],
enabled: false,
},
local: {
paths: [
'/persian/bbc_persian_radio/w172x32355t5635',
'/persian/bbc_dari_radio/w3csz7mf',
'/persian/podcasts/p02pc9wf', // Podcast Brand
'/persian/podcasts/p02pc9wf/p095lyj1', // Podcast Episode
Expand Down Expand Up @@ -4097,7 +4111,7 @@ module.exports = () => ({
test: {
paths: [
'/persian/iran-23231114', // CPS MAP with audio clip
'/persian/iran/2016/09/160907_tc2_testmap1?renderer_env=test', // TC2 MAP with video clip
'/persian/iran/2016/09/160907_tc2_testmap1', // TC2 MAP with video clip
],
enabled: true,
},
Expand Down Expand Up @@ -4192,9 +4206,12 @@ module.exports = () => ({
// '/persian/world-51497110', // CPS MAP
// '/persian/media-49522521', // CPS MAP with live stream
// '/persian/world/2016/06/160613_om_naked_dining', // TC2 MAP
// '/persian/bbc_persian_radio/liveradio', // Live Radio
// '/persian/bbc_dari_radio/liveradio', // Live Radio
// '/persian/bbc_dari_radio/programmes/p0340v0s', // On Demand Radio Brand
// '/persian/bbc_persian_radio/programmes/p0340vyx', // On Demand Radio Brand
// '/persian/bbc_dari_radio/w3ct0bst', // On Demand Radio Episode
// '/persian/bbc_persian_radio/w3ct0s49', // On Demand Radio Episode
],
enabled: false,
},
Expand All @@ -4204,11 +4221,14 @@ module.exports = () => ({
// '/persian', // Front Page
// '/persian/popular/read', // Most Read
// '/persian/iran-23231114', // CPS MAP
// '/persian/iran/2016/09/160907_tc2_testmap1?renderer_env=test', // TC2 MAP
// '/persian/iran/2016/09/160907_tc2_testmap1', // TC2 MAP
// '/persian/23104784', // CPS PGL
// '/persian/bbc_persian_radio/liveradio', // Live Radio
// '/persian/bbc_dari_radio/liveradio', // Live Radio
// '/persian/bbc_dari_radio/programmes/p0340v0s', // On Demand Radio Brand
// '/persian/bbc_persian_radio/programmes/p0340vyx', // On Demand Radio Brand
// '/persian/bbc_dari_radio/w3ct0bst', // On Demand Radio Episode
// '/persian/bbc_persian_radio/w3ct0s49', // On Demand Radio Episode
],
enabled: false,
},
Expand All @@ -4221,9 +4241,11 @@ module.exports = () => ({
// '/persian/iran/2016/09/160907_tc2_testmap1', // TC2 MAP
// '/persian/magazine-49281981', // CPS PGL
// '/persian/arts-52166891', // CPS STY
// '/persian/bbc_persian_radio/liveradio', // Live Radio
// '/persian/bbc_dari_radio/liveradio', // Live Radio
// // '', // On Demand Radio Brand
// // '', // On Demand Radio Brand
// '/persian/bbc_persian_radio/w172x32355t5635', // On Demand Radio Episode
// '/persian/bbc_dari_radio/w3csz7mf', // On Demand Radio Episode
],
enabled: false,
Expand Down Expand Up @@ -4756,7 +4778,7 @@ module.exports = () => ({
test: {
paths: [
'/russian/av/media-23320267', // CPS video with redirect
'/russian/news/2016/05/160510_tc2_testmap3?renderer_env=test', // TC2 video
'/russian/news/2016/05/160510_tc2_testmap3', // TC2 video
],
enabled: true,
},
Expand Down Expand Up @@ -5718,7 +5740,7 @@ module.exports = () => ({
test: {
paths: [
'/swahili/media-23268999', // CPS MAP with live stream
'/swahili/michezo/2016/07/160713_tc2_testmap2?renderer_env=test', // TC2 MAP with audio clip
'/swahili/michezo/2016/07/160713_tc2_testmap2', // TC2 MAP with audio clip
],
enabled: true,
},
Expand Down Expand Up @@ -7996,7 +8018,7 @@ module.exports = () => ({
test: {
paths: [
'/zhongwen/simp/uk-23283128', // CPS Audio
'/zhongwen/simp/multimedia/2016/11/161107_tc2_testmap1?renderer_env=test', // TC2 Video
'/zhongwen/simp/multimedia/2016/11/161107_tc2_testmap1', // TC2 Video
],
enabled: true,
},
Expand Down Expand Up @@ -8173,7 +8195,7 @@ module.exports = () => ({
test: {
paths: [
'/zhongwen/trad/uk-23283128', // CPS Audio
'/zhongwen/trad/multimedia/2016/11/161107_tc2_testmap1?renderer_env=test', // TC2 Video
'/zhongwen/trad/multimedia/2016/11/161107_tc2_testmap1', // TC2 Video
],
enabled: true,
},
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/helpers/ampOnlyServices.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
const ampOnlyServices = ['news', 'sport', 'newsround'];
export default ampOnlyServices;
export { ampOnlyServices as default };
2 changes: 1 addition & 1 deletion data/arabic/live/67574192.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"sportDataEvent": { "id": null },
"eavisEvent": { "id": null },
"article": { "id": null },
"mediaCollections": null,
"mediaCollections": [],
"keyHighlight": { "id": null },
"electionBanner": { "id": null },
"supportingLinks": { "id": null },
Expand Down
Loading
Loading