Skip to content

WS-1985: Add a byline Live Page posts#13803

Open
alex-magana wants to merge 55 commits intolatestfrom
WS-1985-render-byline-live-page-post
Open

WS-1985: Add a byline Live Page posts#13803
alex-magana wants to merge 55 commits intolatestfrom
WS-1985-render-byline-live-page-post

Conversation

@alex-magana
Copy link
Contributor

@alex-magana alex-magana commented Mar 17, 2026

Resolves JIRA: WS-1985

Summary

Add a byline to Live Page posts

Code changes

  • Introduces separate contributor components for the Live Page, Article Page and Media Article Page.
  • Add logic to extract byline data from the Live Page post header block.
  • Add a byline to a Live Page post where provided.

NOTES

  • yarn test:dependencies fails when the import format below is used hence the need for the
    // eslint-disable-next-line import/no-relative-packages exclusions.
simorgh-nextjs/pages/[service]/live/[id]/Post/types
simorgh-nextjs/pages/[service]/live/[id]/Post/fixture

Testing

  1. Visit http://localhost.bbc.com:7081/afrique/live/c7gk1vjglxn1t?renderer_env=test
  2. The Live Page should render byline on posts.

Useful Links

Comment on lines +19 to +28
case ARTICLE_PAGE:
return (
<ArticleContributors
contributorValues={contributorValues}
isSingleContributor={isSingleContributor}
/>
);
case MEDIA_ARTICLE_PAGE:
return (
<ArticleContributors
Copy link
Contributor

Choose a reason for hiding this comment

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

As they are returning the same thing, should we combine the Article and Media Article cases here? Or have the response as the default?

@alex-magana alex-magana marked this pull request as ready for review March 24, 2026 08:28
Comment on lines +27 to +41
imageLtr: () =>
css([
{
float: 'left',
marginRight: `${pixelsToRem(8)}rem`,
},
]),

imageRtl: () =>
css([
{
float: 'right',
marginLeft: `${pixelsToRem(8)}rem`,
},
]),
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on lines +50 to +59
displayBlock: () =>
css({
display: `block`,
}),

displayFlex: () =>
css({
display: `flex`,
alignItems: 'center',
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting pattern, we should probably stick to what we normally do, and name these according to the elements they're going to be used on, like unorderedList and listSpan

jobRole: ({ palette, isDarkUi }: Theme) =>
css({ color: isDarkUi ? palette.GREY_2 : palette.GREY_6 }),

ImageWrapper: ({ palette }: Theme) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ImageWrapper: ({ palette }: Theme) =>
imageWrapper: ({ palette }: Theme) =>

</li>
)}
<li css={hasMultipleContributors && BylineCss.displayInline}>
{authorTopicUrl ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

This whole component is getting quite hard to read at first glance.

Maybe we extract ternary parts of the components into subcomponents outside of the return function, and in the main body of the component, so for example we move this to something like AuthorTopicLink, and use the same pattern for other ternary parts of the component. What do you think?

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.

3 participants