Skip to content

fix(ui): adjust plugin header spacing - #34103

Merged
cdedreuille merged 7 commits into
masterfrom
cd/plugin-header-spacing
May 4, 2026
Merged

cdedreuille merged 7 commits into
masterfrom
cd/plugin-header-spacing

Conversation

@cdedreuille

@cdedreuille cdedreuille commented Apr 29, 2026 •

Copy link
Copy Markdown
Collaborator

Hey, I just made a Pull Request!

Adjusted PluginHeader spacing so tabbed and non-tabbed variants align consistently with surrounding page content. This also updates the Spotify Storybook theme override and adds a tabbed no-header recipe for visual coverage.

Before

CleanShot 2026-04-29 at 15 45 09@2x

After

CleanShot 2026-04-29 at 15 23 42@2x

With Header from core-components

CleanShot 2026-05-04 at 08 50 11@2x

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

Test plan

  • yarn prettier --write .storybook/themes/spotify.css packages/ui/src/components/Header/Header.module.css packages/ui/src/components/PluginHeader/PluginHeader.module.css packages/ui/src/components/PluginHeader/PluginHeader.tsx packages/ui/src/recipes/PluginHeaderAndHeader.stories.tsx .changeset/plugin-header-spacing.md
  • yarn build:api-reports

@cdedreuille
cdedreuille requested a review from a team as a code owner April 29, 2026 14:28
Copilot AI review requested due to automatic review settings April 29, 2026 14:28
@backstage-goalie

backstage-goalie Bot commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/core-components packages/core-components patch v0.18.10-next.0
@backstage/ui packages/ui patch v0.15.0-next.1

@backstage-goalie backstage-goalie Bot added size:medium Medium-sized pull requests receive no change in priority for reviews. waiting-for:review The PR needs a review and will be visible in the review queue unless already assigned an owner. labels Apr 29, 2026
@github-actions

github-actions Bot commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Visual Testing with Chromatic

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adjusts PluginHeader spacing so tabbed and non-tabbed variants align more consistently with surrounding page content, with accompanying Storybook/theme updates to visually validate the layout.

Changes:

  • Tweaks PluginHeader structure + CSS to standardize horizontal padding and vertical spacing.
  • Removes HeaderTop top padding and updates the Spotify Storybook theme overrides to match the new layout.
  • Adds a “no header + tabs” recipe story for visual coverage.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/ui/src/recipes/PluginHeaderAndHeader.stories.tsx Updates page content spacing and adds a tabbed “no header” recipe story.
packages/ui/src/components/PluginHeader/PluginHeader.tsx Refactors PluginHeader DOM structure and height measurement ref target.
packages/ui/src/components/PluginHeader/PluginHeader.module.css Moves padding to the root and adjusts borders based on tab presence.
packages/ui/src/components/Header/Header.module.css Removes top padding from the Header top region.
.storybook/themes/spotify.css Updates Spotify theme overrides for the new PluginHeader spacing.
.changeset/plugin-header-spacing.md Patch changeset describing the spacing adjustment.

@cdedreuille
cdedreuille force-pushed the cd/plugin-header-spacing branch from e1d056b to 439e1bf Compare April 29, 2026 14:53
Copilot AI review requested due to automatic review settings April 29, 2026 15:01
@cdedreuille
cdedreuille requested review from a team and backstage-service as code owners April 29, 2026 15:01
@cdedreuille
cdedreuille force-pushed the cd/plugin-header-spacing branch from f93cf67 to 5e5f52a Compare April 29, 2026 15:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Align PluginHeader spacing across tabbed and non-tabbed variants so the component owns the surrounding page spacing more consistently.

Signed-off-by: Charles de Dreuille <[email protected]>
Signed-off-by: Charles de Dreuille <[email protected]>
Signed-off-by: Charles de Dreuille <[email protected]>
@cdedreuille
cdedreuille force-pushed the cd/plugin-header-spacing branch from 5e5f52a to a9f3d71 Compare April 29, 2026 18:08
@cdedreuille
cdedreuille removed request for a team and backstage-service April 29, 2026 18:43

@Rugvip Rugvip left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm, thinking this needs some work to look alright when stacked with the old header? 🤔

Image

@backstage-goalie backstage-goalie Bot added waiting-for:author Changes have been requested and the PR will not receive a review until the changes are made. and removed waiting-for:review The PR needs a review and will be visible in the review queue unless already assigned an owner. labels Apr 29, 2026
Copilot AI review requested due to automatic review settings April 30, 2026 08:33
@cdedreuille
cdedreuille requested a review from a team as a code owner April 30, 2026 08:33
@backstage-goalie backstage-goalie Bot added waiting-for:review The PR needs a review and will be visible in the review queue unless already assigned an owner. and removed waiting-for:author Changes have been requested and the PR will not receive a review until the changes are made. labels Apr 30, 2026
@cdedreuille

Copy link
Copy Markdown
Collaborator Author

Thanks @Rugvip. I managed to introduce custom styles only when the header from core-component is on the page. This is very much a temporary solution to make sure it work while doing our migration. It is definitely not something we are recommending as a pattern.

CleanShot 2026-04-30 at 09 34 22@2x

This comment was marked as resolved.

Copilot AI review requested due to automatic review settings April 30, 2026 14:01

This comment was marked as outdated.

@Rugvip Rugvip left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm, still feeling this makes the stacking with the old header be quite a bit worse? 🤔

Before:

Image

With this change:

Image

Since we have the ability to have custom styling when it's used with the old header, I'm thinking we might as well keep it the same/similar?

@backstage-goalie backstage-goalie Bot added waiting-for:author Changes have been requested and the PR will not receive a review until the changes are made. and removed waiting-for:review The PR needs a review and will be visible in the review queue unless already assigned an owner. labels Apr 30, 2026
Signed-off-by: Charles de Dreuille <[email protected]>
@backstage-goalie backstage-goalie Bot added waiting-for:review The PR needs a review and will be visible in the review queue unless already assigned an owner. and removed waiting-for:author Changes have been requested and the PR will not receive a review until the changes are made. labels May 4, 2026
@cdedreuille

Copy link
Copy Markdown
Collaborator Author

@Rugvip I did a new pass to bring the header as it was before when the one from core-components is present. This is not our design recommendation as it will create inconsistencies between pages but since this is only for old versions I'm ok to keep it as it is for now.

586991149-ba3ca90d-afef-4397-b91a-59e7e512348b

@Rugvip Rugvip left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! 👍

Let's :shipit:

@cdedreuille
cdedreuille merged commit 77082dd into master May 4, 2026
33 checks passed
@cdedreuille
cdedreuille deleted the cd/plugin-header-spacing branch May 4, 2026 08:36
@backstage-goalie backstage-goalie Bot added waiting-for:merge The PR has been approved and is awaiting merge. and removed waiting-for:review The PR needs a review and will be visible in the review queue unless already assigned an owner. labels May 4, 2026
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

Thank you for contributing to Backstage! The changes in this pull request will be part of the 1.51.0 release, scheduled for Tue, 19 May 2026.

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

Labels

size:medium Medium-sized pull requests receive no change in priority for reviews. waiting-for:merge The PR has been approved and is awaiting merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants