Skip to content

Conversation

@abeddow91
Copy link
Contributor

@abeddow91 abeddow91 commented Dec 18, 2025

What does this change?

Introduces the redesigned star rating component behind a 0% opt in test.

As part of the redesign the component has been refactored.
It now features

  • a medium size of stars (along side small and large)
  • padding param of small, medium or large padding size for the rating component
  • a dark (perhaps overloaded - suggestions welcome!) theme param. This allows the star rating to support 2 colour variations. The dark theme is required when the ratings component is places on cards with variable background colour (such as feature cards) to ensure we meet AA accessibility standards.

Why?

The star rating component is used site wide. By using a 0% opt in test, we can ensure design and engineering are given ample time to QA this change, especially given we are approaching the festive period.

To allow for the opt in test, the legacy star rating component has been deprecated and a new component has been added. This should make clean up easier once the the designs are fully approved and ready to roll out site wide.

Screenshots

Before After
10before 10after
3before 3after
4before 4after
5before 5after
6before 6after
7before 7after
8before 8after
9before 9after
0before 0after
1before 1after
2before 2after

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

@abeddow91 abeddow91 mentioned this pull request Dec 18, 2025
…r accessibility requirments. These are needed for cards such as feature cards which have lighter / variable backgrounds
@abeddow91 abeddow91 marked this pull request as ready for review December 18, 2025 14:36
@github-actions
Copy link

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@SiAdcock
Copy link
Contributor

Looks good @abeddow91 ❤️

Since the new Star Rating design forms part of Source core components, would it make sense to build this component into the Source React component library? This would help align the design-developer handoff for future changes and ensure the component is not tightly coupled to dotcom-rendering

isInStarRatingVariant={
isInStarRatingVariant
}
starRating={article.starRating}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does the StarRating component now get called from within the ArticleHeadline component?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The designs now co-locate the headline with the star ratings before headline bottom padding is applied.

Currently, the headline bottom-padding is applied in a wrapper within ArticleHeadline so the star ratings is rendered within this wrapper, following the same pattern as byline, the design tag and age warning.

It would be possible to lift this wrapper up outside of the ArticleHeadline component to decouple star ratings from the headline component but I'm not sure if that would be preferable.

Copy link
Contributor

@domlander domlander left a comment

Choose a reason for hiding this comment

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

This looks great Anna, thanks for writing all this code!

There's a few comments that need to be deleted as SImon pointed out and it would be great if a few more stories could be added in places we have the new star ratings.

This update uses a ratings map to reduce boiler plate code.
…or star ratings.

This is to prevent overloading the term dark which is more commonly used in the code base to refer to dark mode
@abeddow91 abeddow91 force-pushed the ab/star-rating-update branch from 0ba2cdc to 3c8aca0 Compare January 5, 2026 10:07
@abeddow91 abeddow91 requested a review from domlander January 5, 2026 16:33
@domlander domlander added the run_chromatic Runs chromatic when label is applied label Jan 6, 2026
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Jan 6, 2026
@abeddow91 abeddow91 force-pushed the ab/star-rating-update branch from 9624256 to af64c48 Compare January 7, 2026 15:46
@abeddow91 abeddow91 added run_chromatic Runs chromatic when label is applied feature Departmental tracking: work on a new feature labels Jan 7, 2026
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature fronts + curation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants