Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

RFC: <Header /> component API #1428

Merged
merged 8 commits into from
May 27, 2022
Merged

RFC: <Header /> component API #1428

merged 8 commits into from
May 27, 2022

Conversation

SiAdcock
Copy link
Contributor

@SiAdcock SiAdcock commented May 13, 2022

What is the purpose of this change?

There is a plan to standardise headers across the Guardian's web products.

This proposal outlines an API that tries to capture the areas of standardisation while being as flexible as possible for end users.

See the visual designs for more context.

What does this change?

  • Add RFC for the Header component API

Risks and uncertainty

  • The support buttons / thank you message is delivered by Automat
    • What is the state of Automat? Will it continue to be maintained, or should we take the opportunity to simplify?
    • Currently in support-dotcom-components. Should the component code live in Source?
  • Client side rendered consumers will have to ship multiple logos, or they would have to lazy load the correct SVG
  • How much can we hardcode?
    • Logos
    • Editions switch
    • Support messaging
    • Masthead links
      • Do we hardcode the URLs or should platforms control the actual links?
  • Should Source be aware of / managing Islands?
    • We need to avoid re-rendering the entire header on the client because Nav is pretty huge, and doesn’t need to be dynamic
    • Should we be imposing the Island architecture on all platforms?
    • Could we allow consumers to compose their own header
      • Via props
      • <EditorialHeader masthead={<Island><Masthead /></Island>} />

@changeset-bot
Copy link

changeset-bot bot commented May 13, 2022

⚠️ No Changeset found

Latest commit: 20a2b80

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@SiAdcock SiAdcock marked this pull request as ready for review May 13, 2022 12:03
@SiAdcock SiAdcock requested a review from a team as a code owner May 13, 2022 12:03
@SiAdcock SiAdcock requested a review from oliverlloyd May 13, 2022 12:03
@SiAdcock SiAdcock force-pushed the sa-header-api-rfc branch 2 times, most recently from 6b1f9a1 to cb51d56 Compare May 13, 2022 14:34
@SiAdcock SiAdcock force-pushed the sa-header-api-rfc branch from cb51d56 to f33c6cf Compare May 13, 2022 14:42
@SiAdcock SiAdcock changed the title RFC: <Header> component API RFC: <Header /> component API May 13, 2022
@SiAdcock SiAdcock force-pushed the sa-header-api-rfc branch 2 times, most recently from a7888ac to ebe9e6d Compare May 20, 2022 13:14
@SiAdcock SiAdcock force-pushed the sa-header-api-rfc branch from ebe9e6d to 6d1a2c6 Compare May 20, 2022 13:53
@SiAdcock SiAdcock force-pushed the sa-header-api-rfc branch from 6d1a2c6 to f43b6ee Compare May 20, 2022 14:01
@SiAdcock SiAdcock merged commit 4fb7331 into main May 27, 2022
@SiAdcock SiAdcock deleted the sa-header-api-rfc branch May 27, 2022 06:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants