Skip to content

Conversation

@louisearchibald
Copy link
Contributor

@louisearchibald louisearchibald commented Dec 17, 2025

Resolves JIRA: WS-1883

Summary

Bringing the ScrollablePromo component out of legacy and in line with our modern component standards. We have renamed the component to ArticleLinksBlock as we will also be replacing the existing scrollable cards styling entirely and replacing with a links block styling instead as part of some future work.

Code changes

  • Moved and renamed the component from ScrollablePromo to ArticleLinksBlock.
  • Removed leftover experiment code from a previous experiment that ran on this component.
  • Updated imports and references to reflect new component name change.
  • Implemented Typescript to relevant files.

Developer Checklist

  • UX
    • UX Criteria met (visual UX & screenreader UX)
  • Accessibility
    • Accessibility Acceptance Criteria met
    • Accessibility swarm completed
    • Component Health updated
    • P1 accessibility bugs resolved
    • P2/P3 accessibility bugs planned (if not resolved)
  • Security
    • Security issues addressed
    • Threat Model updated
  • Documentation
    • Docs updated (runbook, READMEs)
  • Testing
    • Feature tested on relevant environments
  • Comms
    • Relevant parties notified of changes

Testing

  • Manual Testing required?
    • Local (Ready-For-Test, Local)
    • Test (Ready-For-Test, Test)
    • Preview (Ready-For-Test, Preview)
    • Live (Ready-For-Test, Live)
  • Manual Testing complete?
    • Local
    • Test
    • Preview
    • Live

Additional Testing Steps

  1. List the steps required to test this PR.

Useful Links

@louisearchibald louisearchibald self-assigned this Dec 17, 2025
const title =
textBlock?.model?.blocks?.[0]?.model?.blocks?.[0]?.model?.text ?? '';

const isOperaMini = useOperaMiniDetection();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't rely on the useOperaMiniDetection hook anymore unfortunately. Instead, we have a special Opera Mini CSS class name that can be used directly in the stylesheet to change the display if its Opera Mini, e.g:

[`.${OPERA_MINI_CLASSNAME} &`]: {
display: 'none',
},

)}
{isSingleItem ? (
<div css={styles.promoContainer} dir={dir} {...viewTracker}>
<Promo block={blocksWithoutTitle[0]} {...clickTracker} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the clickTracker props being used here and in PromoList? I can only see ({ blocks, eventTrackingData }) as the props for both of those components. May be a cause for the multiple clicks? I can see the clickTracker being defined again at https://github.com/bbc/simorgh/pull/13560/files#diff-c107cd281b9228bf828ec21a61ff874354a2bcd795f71f324d56206190fc14eaR18 inside Promo, so I think we should keep it there and remove it from here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So just to be clear, we are wanting to remove the clickTracker props for both Promo and PromoList within src/app/components/ArticleLinksBlock/index.tsx, but keep it within the promo file?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea I think it should be removed from ArticleLinksBlock. I can't see it actually being used as a prop in Promo or PromoList.

) : (
<PromoList
blocks={blocksWithoutTitle}
{...viewTracker}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar here, is viewTracker used? I can't see it as a prop in PromoList.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, I only see blocks, eventTrackingData as props so perhaps can be removed? Maybe one for @louisearchibald?

Comment on lines 81 to 82
clickTracker={clickTracker}
a11yAttributes={a11yAttributes}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with these, can't see them used in PromoList itself

};

return (
<GridItemMediumNoMargin {...a11yAttributes} data-e2e="article-links-block">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We tend to avoid using the old 'grid' components in new components. Can we achieve the desired layout without using this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants