Repository navigation
ui: rename Header to PluginHeader - #32875
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
🎨 Visual Testing with Chromatic
|
Renamed the Header component to PluginHeader for clarity, along with all associated exports (HeaderProps, HeaderDefinition) and CSS class names. Updated docs-ui documentation to match. Signed-off-by: Patrik Oldsberg <[email protected]>
9f263b7 to
0ec3c0e
Compare
There was a problem hiding this comment.
Pull request overview
This PR renames the Header component to PluginHeader in the @backstage/ui package as part of a broader refactoring strategy to better distinguish plugin-level headers from page-level headers. The change is introduced alongside PR #32812 which adds a new page extension system, with plans to eventually rename HeaderPage to Header in a future change.
Changes:
- Renamed component exports and types:
Header→PluginHeader,HeaderProps→PluginHeaderProps,HeaderDefinition→PluginHeaderDefinition - Updated all CSS class names from
bui-Header*tobui-PluginHeader* - Updated documentation site, examples, stories, and changelogs to reflect the new naming
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui/src/index.ts | Updated export from ./components/Header to ./components/PluginHeader |
| packages/ui/src/definitions.ts | Updated export from HeaderDefinition to PluginHeaderDefinition |
| packages/ui/src/components/PluginHeader/*.ts(x) | Renamed component, types, and definition files with all internal references updated |
| packages/ui/src/components/PluginHeader/PluginHeader.module.css | Updated CSS class names from bui-Header* to bui-PluginHeader* |
| packages/ui/src/components/HeaderPage/types.ts | Updated import path to reference PluginHeader directory |
| packages/ui/src/components/SearchField/SearchField.stories.tsx | Updated component usage from Header to PluginHeader |
| packages/ui/src/components/FullPage/FullPage.stories.tsx | Updated component usage and imports |
| packages/ui/report.api.md | Removed old exports and added new PluginHeader exports, preserving shared HeaderTab type |
| docs-ui/src/utils/types.ts | Updated component slug from 'header' to 'plugin-header' |
| docs-ui/src/utils/data.ts | Updated component title and slug in navigation data |
| docs-ui/src/utils/changelogs/v0.9.0.ts | Updated component references in changelog entries |
| docs-ui/src/app/components/plugin-header/* | Updated all documentation files including snippets, examples, and MDX content |
| .changeset/rename-header-to-plugin-header.md | Added well-formatted changeset with breaking change notice and migration guide |
emmaindal
left a comment
There was a problem hiding this comment.
It looks good to me! I'm sure you explored alternatives here but just curious to know if you ever discussed PageHeader instead? Or are their certain circumstances where the recommendation is to not use this component?
|
@emmaindal yep the intention is for this header to be at the scope of the plugin rather than individual pages. In general we want to reduce the conflict with that's currently the |
|
Thank you for contributing to Backstage! The changes in this pull request will be part of the |
Hey, I just made a Pull Request!
Had a discussion with @cdedreuille about this one, the overall plan is to rename the current
HeadertoPluginHeadand the currentHeaderPageto justHeader. We can't do that all at once since it'd be confusing, so instead we start with an immediate breaking rename ofHeadertoPluginHeader. This is a component that didn't really have any existing use in Backstage apps just yet, so the impact of the immediate breaking change should be minimal. It is being introduced through #32812 alongside this change though.This renames the
Headercomponent in@backstage/uitoPluginHeader. The following public exports have been renamed:Header→PluginHeaderHeaderProps→PluginHeaderPropsHeaderDefinition→PluginHeaderDefinitionCSS class names updated from
bui-Header*tobui-PluginHeader*to match. TheHeaderTabtype is unchanged since it's shared withHeaderPage.The docs-ui site has been updated as well — the component page moved from
/components/headerto/components/plugin-header, and all snippets, examples, and changelog references have been updated.✔️ Checklist
Signed-off-byline in the message. (more info)