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
Changes from 1 commit
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
some top stories do not have same headline structure
LilyL0u committed Dec 30, 2024
commit 37004c59b12359fc7382807752d1d1865148fcf0
31 changes: 16 additions & 15 deletions src/app/legacy/components/ScrollablePromo/Promo/index.jsx
Original file line number Diff line number Diff line change
@@ -90,21 +90,22 @@
let timestamp;
switch (variant) {
case 'A':
title = pathOr(
'',
[
'headlines',
'promoHeadline',
'blocks',
'0',
'model',
'blocks',
'0',
'model',
'text',
],
block,
);
title =
pathOr(
'',
[
'headlines',
'promoHeadline',
'blocks',
'0',
'model',
'blocks',
'0',
'model',
'text',
],
block,
) || block.headline;
href = pathOr('', ['locators', 'canonicalUrl'], block);
break;
case 'B':
@@ -136,7 +137,7 @@
);
break;
}
console.log('title', title, 'href', href, 'timestamp', timestamp);

Check warning on line 140 in src/app/legacy/components/ScrollablePromo/Promo/index.jsx

GitHub Actions / build (18.x)

Unexpected console statement

const isOperaMini = useOperaMiniDetection();


Unchanged files with check annotations Beta

`;
const PromoList = ({ blocks, variant, viewTracker, onClick }) => {
console.log('in promo list', blocks, variant);

Check warning on line 83 in src/app/legacy/components/ScrollablePromo/PromoList/index.jsx

GitHub Actions / build (18.x)

Unexpected console statement
const { dir } = useContext(ServiceContext);
const isOperaMini = useOperaMiniDetection();
const listBlocks = variant === 'B' ? blocks.slice(0, 5) : blocks.slice(0, 3);
}) => {
const { script, service, dir, translations, mostRead } =
useContext(ServiceContext);
console.log('Blocks in scrollable promo:', blocks, blocks.type);

Check warning on line 67 in src/app/legacy/components/ScrollablePromo/index.jsx

GitHub Actions / build (18.x)

Unexpected console statement
const eventTrackingData = {
componentName: `edoj${blockGroupIndex}`,
format: 'CHD=edoj',
if (variant === 'B') {
title = mostRead.header || 'Most Read';
}
console.log('blocks', blocks, 'titlexx', title, 'variant', variant);

Check warning on line 92 in src/app/legacy/components/ScrollablePromo/index.jsx

GitHub Actions / build (18.x)

Unexpected console statement
const blocksWithoutTitle = blocks[0].type === 'title' ? tail(blocks) : blocks;
const isSingleItem = blocksWithoutTitle.length === 1;
embedUploader: Uploader,
group: gist,
links: (props: ComponentToRenderProps) => {
console.log('props', props);

Check warning on line 188 in src/app/pages/ArticlePage/ArticlePage.tsx

GitHub Actions / build (18.x)

Unexpected console statement
return <ScrollablePromo {...props} />;
},