diff --git a/.changeset/poor-jars-sniff.md b/.changeset/poor-jars-sniff.md new file mode 100644 index 0000000000..c45cd174a0 --- /dev/null +++ b/.changeset/poor-jars-sniff.md @@ -0,0 +1,10 @@ +--- +'example-app': patch +'@backstage/core-components': patch +'@backstage/create-app': patch +'@backstage/plugin-api-docs': patch +'@backstage/plugin-catalog': patch +'@backstage/plugin-techdocs': patch +--- + +Improve the responsiveness of the EntityPage UI. With this the Header component should scale with the screen size & wrapping should not cause overflowing/blocking of links. Additionally enforce the Pages using the Grid Layout to use it across all screen sizes & to wrap as intended. diff --git a/packages/core-components/src/layout/HeaderLabel/HeaderLabel.tsx b/packages/core-components/src/layout/HeaderLabel/HeaderLabel.tsx index f9d8b4d345..8557ceddf7 100644 --- a/packages/core-components/src/layout/HeaderLabel/HeaderLabel.tsx +++ b/packages/core-components/src/layout/HeaderLabel/HeaderLabel.tsx @@ -20,18 +20,19 @@ import React from 'react'; const useStyles = makeStyles(theme => ({ root: { textAlign: 'left', - display: 'inline-block', }, label: { color: theme.palette.common.white, fontWeight: 'bold', letterSpacing: 0, fontSize: theme.typography.fontSize, - marginBottom: theme.spacing(1), + marginBottom: theme.spacing(1) / 2, + lineHeight: 1, }, value: { color: 'rgba(255, 255, 255, 0.8)', fontSize: theme.typography.fontSize, + lineHeight: 1, }, })); @@ -61,16 +62,8 @@ export const HeaderLabel = ({ label, value, url }: HeaderLabelProps) => { return ( - - {label} - - {url ? ( - - {content} - - ) : ( - content - )} + {label} + {url ? {content} : content} ); diff --git a/packages/create-app/templates/default-app/packages/app/src/components/catalog/EntityPage.tsx b/packages/create-app/templates/default-app/packages/app/src/components/catalog/EntityPage.tsx index e3dd5be3c7..f7eb7c6349 100644 --- a/packages/create-app/templates/default-app/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/create-app/templates/default-app/packages/app/src/components/catalog/EntityPage.tsx @@ -157,6 +157,13 @@ const websiteEntityPage = ( ); +/** + * TODO: For the MUI Grid to work there have to be "xs" set on every GridItem, + * such that the seperation of space is clear from the smalles screen size upwards + * https://material-ui.com/components/grid/#basic-grid. + */ + + const defaultEntityPage = (