Skip to content

Create HostedContentHeader component#15259

Merged
deedeeh merged 11 commits intomainfrom
dina/top-bar-component-hosted-content
Feb 2, 2026
Merged

Create HostedContentHeader component#15259
deedeeh merged 11 commits intomainfrom
dina/top-bar-component-hosted-content

Conversation

@deedeeh
Copy link
Contributor

@deedeeh deedeeh commented Jan 30, 2026

What does this change?

This PR creates the HostedContentHeader component to be used by the Hosted Content different layouts.

The changes:

  • A new component HostedContentHeader
  • Updated HostedArticleLayout and HostedGalleryLayout to include the new component.
  • Added a new HostedContentHeader story for storybook.

Tested locally and the UI is almost identical as there are still few things to update after we have design confirmation. There will be other PRs later to complete the HostedContentHeader work when we have the data.

Why?

This is part of the work for Hosted Content migration to DCAR.

Screenshots

Frontend DCAR
before after
before2 after2
before3 after3
before4 after4
before5 after5

@deedeeh deedeeh added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Jan 30, 2026
@github-actions
Copy link

github-actions bot commented Jan 30, 2026

@deedeeh deedeeh changed the title Dina/top bar component hosted content Create HostedContentHeader component Jan 30, 2026
@deedeeh deedeeh force-pushed the dina/top-bar-component-hosted-content branch from 45dd067 to 6ae15a9 Compare February 2, 2026 09:40
>
The Guardian - Back to home
</span>
<p css={hostedByStyles}>Hosted by</p>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Frontend contains the "hosted by" label as part of the logo anchor tag so I've done the same in here.

</span>
<p css={hostedByStyles}>Hosted by</p>

<SvgGuardianLogo textColor={`${sourcePalette.neutral[100]}`} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When we create the correct palette for this logo then we might update the Logo.tsx to accept params like the textColor and an optional children which is the <p> and export it to be used in HostedContentHeader.tsx. That might be an option to unnecessary duplication.

padding: ${space[1]}px 10px;

@media (min-width: 330px) {
margin-right: 0.625rem;
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 hosted by label got stacked when the breakpoint is less than 330px but in Frontend the spacing between the right margin and the logo is less compared to when it's from 330px and above so that's why I added this @media even though I know we use breakpoints from Source.

I added a margin-right as it's the same spacing in the left side but in Frontend the spacing on the right is a bit less which doesn't seem correct to me unless that was intentional from a design view. That could be confirmed when we have a catchup with the designer as definitely there will be a review after we finish the development work.

@deedeeh deedeeh marked this pull request as ready for review February 2, 2026 12:44
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

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.

@deedeeh deedeeh force-pushed the dina/top-bar-component-hosted-content branch from 26b8f93 to b5d2704 Compare February 2, 2026 14:01
Copy link
Contributor

@i-hardy i-hardy 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! And the comments are helpful for where we'll need to tweak and expand things once we're further along with design 👍

@deedeeh deedeeh added the run_chromatic Runs chromatic when label is applied label Feb 2, 2026
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Feb 2, 2026
@deedeeh
Copy link
Contributor Author

deedeeh commented Feb 2, 2026

This looks great! And the comments are helpful for where we'll need to tweak and expand things once we're further along with design 👍

Thank you Imogen! Yes I've tried to make our lives easier when we have the data. There might be few tweaks in the new PR with the data, such as not overriding the line-height as we are expected to follow the Source text guidelines and avoid overriding but that could be discussed as a sub-team.

@deedeeh deedeeh merged commit a39ace3 into main Feb 2, 2026
26 checks passed
@deedeeh deedeeh deleted the dina/top-bar-component-hosted-content branch February 2, 2026 15:14
@gu-prout
Copy link

gu-prout bot commented Feb 2, 2026

Seen on PROD (merged by @deedeeh 10 minutes and 17 seconds ago) Please check your changes!

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

Labels

Commercial 💰 maintenance Departmental tracking: maintenance work, not a fix or a feature Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants