Skip to content

CULT-747: Opinion teaser improvements#2356

Merged
fenglish merged 6 commits intomainfrom
CULT-747
Feb 19, 2026
Merged

CULT-747: Opinion teaser improvements#2356
fenglish merged 6 commits intomainfrom
CULT-747

Conversation

@fenglish
Copy link
Copy Markdown
Contributor

@fenglish fenglish commented Jan 28, 2026

Customer Product Curation & Loyalty team is working on Opinion teaser improvements.

To achieve the improvement, x-teaser & o-teaser need to handle new teaser properties.

  • byline
  • metaLinks
  • titlePrefix

These properties are used to control and display the components below.

opinion-teaser-improvements

Title Indicator for Opinion

The styling is applied using a combination of o-teaser--opinion and o-teaser--heading.

TitlePrefix

Property name Type Note
showTitlePrefix Boolean default: true
titlePrefix String
  • It is displayed when both showTitle and showTitlePrefix are true, and the titlePrefix property is set.

Byline

Caution

Breaking change!!
The Byline component is enabled by default, as showByline is set to true.
This means the Byline will be rendered instead of the legacy Headshot component when byline data is available.
If your application is not ready to adopt the Byline component yet, it can opt out by explicitly setting showByline to false.
In that case, the existing Headshot behaviour will remain unchanged.

Property name Type Note
showByline Boolean default: true
byline Array of [String, String?, String?] Array of [authorName, linkUrl, headshot]
  • The Byline component is displayed when showByline is true and the byline property is set.
  • The headshot in the Byline is displayed only when both showByline and showBylineHeadshot are true, and the byline entry includes a headshot value (index 2).
  • The Byline component supports displaying multiple authors, for example:
byline: [['author-1'], [' & '], ['author-2']]
  • showByline takes precedence over showHeadshot, so it will NOT fall back to a headshot even if old (without byline) and new content (with byline) models exist on the same page.

@fenglish fenglish force-pushed the CULT-747 branch 2 times, most recently from d7cdec1 to 39f7fbb Compare January 28, 2026 10:19
Comment thread components/o-teaser/src/scss/elements/_default.scss
Comment thread components/o-teaser/src/tsx/stream-link.tsx Outdated
@fenglish fenglish force-pushed the CULT-747 branch 2 times, most recently from 95bd28d to f2ec30f Compare January 28, 2026 17:09
Comment thread components/o-teaser/src/scss/themes/_hero.scss Outdated
Comment thread components/o-teaser/src/scss/themes/_hero.scss
Comment thread components/o-teaser/src/tsx/title.tsx Outdated
@fenglish fenglish force-pushed the CULT-747 branch 2 times, most recently from 9fd4891 to 2f35866 Compare January 29, 2026 09:52
Comment thread components/o-teaser/src/tsx/Props.ts Outdated
Comment thread components/o-teaser/src/tsx/teaser.tsx Outdated
Comment thread components/o-teaser/src/tsx/title.tsx Outdated
Comment thread components/o-teaser/src/tsx/byline.tsx Outdated
Comment thread components/o-teaser/src/tsx/byline.tsx Outdated
Comment thread components/o-teaser/src/tsx/byline.tsx Outdated
Comment thread components/o-teaser/src/tsx/title.tsx
Comment thread components/o-teaser/src/scss/elements/_images.scss Outdated
Comment thread components/o-teaser/src/scss/elements/_default.scss Outdated
@fenglish fenglish force-pushed the CULT-747 branch 18 times, most recently from 19a6d49 to 9755cc1 Compare February 5, 2026 09:53
Copy link
Copy Markdown
Member

@metart43 metart43 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 good Asuka. I am just commenting on the code, there are a few non-blocking comments/question.

I haven't ran the storybook and see the component yet.

Comment thread components/o-teaser/src/scss/elements/_default.scss
Comment thread components/o-teaser/src/scss/elements/_default.scss
Comment thread components/o-teaser/src/tsx/byline.tsx Outdated
Comment thread components/o-teaser/src/tsx/byline.tsx Outdated
Comment thread components/o-teaser/src/tsx/byline.tsx Outdated
Comment thread components/o-teaser/src/tsx/byline.tsx Outdated
Comment thread components/o-teaser/src/tsx/title.tsx Outdated
@fenglish fenglish force-pushed the CULT-747 branch 2 times, most recently from 80c1ed7 to b00df03 Compare February 10, 2026 12:36
@metart43 metart43 self-requested a review February 10, 2026 13:55
Comment thread components/o-teaser/src/scss/elements/_default.scss Outdated
Comment thread components/o-teaser/src/scss/elements/_default.scss Outdated
Comment thread components/o-teaser/src/tsx/byline.tsx Outdated
Comment thread components/o-teaser/src/scss/themes/_standard.scss
Comment thread components/o-teaser/src/tsx/byline.tsx
Comment thread components/o-teaser/src/tsx/byline.tsx Outdated
The author headshot has been moved into a new Byline component. The latest design no longer displays the headshot on the right side.

The legacy headshot component is still kept for consumers that need it. By default, showByline is set to true in presets, so the new component is applied automatically. Consumers can set showByline to false to continue using the legacy headshot behaviour.

To migrate to the new Byline component, teaser data must include a byline property in the following format:
`byline: [[ AuthorNameString, LinkUrlString?, HeadshotString?]]`
@fenglish fenglish marked this pull request as ready for review February 17, 2026 12:30
Copy link
Copy Markdown
Member

@kavanagh kavanagh left a comment

Choose a reason for hiding this comment

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

This is looking great to me. It's hard to add changes like this elegantly while keeping as much back compatibility as possible. So well done.

Copy link
Copy Markdown
Member

@j-mes j-mes left a comment

Choose a reason for hiding this comment

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

Firstly, I can see this PR has been thoroughly reviewed by @kavanagh and @metart43 so thank you for that.

Secondly, your PR description is a great piece of work. That provided me with enough context to look at this PR. I like the use of caution and so on!

Thirdly, having gone through every file you've edited there, I don't see any issues with this PR being merged. Do you have any concerns @joelcarr?

Copy link
Copy Markdown
Member

@joelcarr joelcarr left a comment

Choose a reason for hiding this comment

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

+1 to everything @j-mes said! Exceptional PR 👏🏻 Please could you add the steps to handle the breaking change in https://github.com/Financial-Times/origami/blob/main/components/o-teaser/MIGRATION.md

Copy link
Copy Markdown
Member

@joelcarr joelcarr left a comment

Choose a reason for hiding this comment

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

Wonderful! Happy for this CULT-747 to take off ✈️

@fenglish fenglish merged commit 1e129aa into main Feb 19, 2026
8 checks passed
@fenglish fenglish deleted the CULT-747 branch February 19, 2026 11:02
fenglish added a commit that referenced this pull request Mar 11, 2026
A change in #2356 added a teaser title indicator icon for opinion teasers.
However, live blog posts already had an existing opinion indicator icon.
The new styling unintentionally overrode the old styling and caused the icon to display incorrectly.

The old styling specific to live blog posts is no longer needed, as the new styling now provides the opinion indicator consistently across all teaser types.
fenglish added a commit that referenced this pull request Mar 11, 2026
A change in #2356 added a teaser title indicator icon for opinion teasers.
However, live blog posts already had an existing opinion indicator icon.
The new styling unintentionally overrode the old styling and caused the icon to display incorrectly.

The old styling specific to live blog posts is no longer needed, as the new styling now provides the opinion indicator consistently across all teaser types.
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.

5 participants