core-components: BUI migration utils

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-12 13:10:23 +01:00
parent 133dff7320
commit 03c9d1941c
4 changed files with 15 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Added `noHeader` prop to `PageWithHeader` that prevents rendering of the header. This is intended to simplify migration to the new `@backstage/ui` page layout and recommended when rendering a page in the new frontend system.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': minor
---
The `Page` component now limits the height of the content to `100%` of the available space. This ensures that adding additional vertical elements doesn't cause scrollbars due to the default `100vh` height.
@@ -30,12 +30,14 @@ const useStyles = makeStyles(
gridTemplateColumns: 'auto 1fr auto',
overflowY: 'auto',
height: '100vh',
maxHeight: '100%',
[theme.breakpoints.down('xs')]: {
height: '100%',
},
'@media print': {
display: 'block',
height: 'auto',
maxHeight: 'none',
overflowY: 'inherit',
},
},
@@ -21,13 +21,14 @@ import { Page } from './Page';
type PageWithHeaderProps = ComponentProps<typeof Header> & {
themeId: string;
noHeader?: boolean;
};
export function PageWithHeader(props: PropsWithChildren<PageWithHeaderProps>) {
const { themeId, children, ...restProps } = props;
const { themeId, children, noHeader, ...restProps } = props;
return (
<Page themeId={themeId}>
<Header {...restProps} />
{noHeader ? <div /> : <Header {...restProps} />}
{children}
</Page>
);