Conversation
d7cdec1 to
39f7fbb
Compare
95bd28d to
f2ec30f
Compare
9fd4891 to
2f35866
Compare
19a6d49 to
9755cc1
Compare
metart43
left a comment
There was a problem hiding this comment.
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.
80c1ed7 to
b00df03
Compare
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?]]`
kavanagh
left a comment
There was a problem hiding this comment.
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.
j-mes
left a comment
There was a problem hiding this comment.
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?
joelcarr
left a comment
There was a problem hiding this comment.
+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
joelcarr
left a comment
There was a problem hiding this comment.
Wonderful! Happy for this CULT-747 to take off
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.
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.
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.
bylinemetaLinkstitlePrefixThese properties are used to control and display the components below.
Title Indicator for Opinion
The styling is applied using a combination of
o-teaser--opinionando-teaser--heading.TitlePrefix
showTitlePrefixtruetitlePrefixshowTitleandshowTitlePrefixaretrue, and thetitlePrefixproperty is set.Byline
Caution
Breaking change!!
The Byline component is enabled by default, as
showBylineis set totrue.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
showBylinetofalse.In that case, the existing Headshot behaviour will remain unchanged.
showBylinetruebyline[authorName, linkUrl, headshot]showBylineistrueand thebylineproperty is set.showBylineandshowBylineHeadshotaretrue, and thebylineentry includes a headshot value (index 2).showBylinetakes precedence overshowHeadshot, so it will NOT fall back to a headshot even if old (withoutbyline) and new content (withbyline) models exist on the same page.