Navigation: Fix browse dashboards/scenes dashboards when bodyScrolling is enabled (#91479)

set explicit height (not min-height) so everything works in safari
This commit is contained in:
Ashley Harrison 2024-08-06 10:51:31 +02:00 committed by GitHub
parent 9300c1bbea
commit 2e3f48a49d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 12 deletions

View File

@ -12,7 +12,7 @@ export function getPageStyles(theme: GrafanaTheme2) {
? {
display: 'flex',
flexDirection: 'column',
minHeight: '100vh',
height: '100vh',
}
: {
display: 'flex',

View File

@ -4,6 +4,7 @@ import { useMedia } from 'react-use';
import { GrafanaTheme2, PageLayoutType } from '@grafana/data';
import { selectors } from '@grafana/e2e-selectors';
import { config } from '@grafana/runtime';
import { SceneComponentProps } from '@grafana/scenes';
import { CustomScrollbar, useStyles2, useTheme2 } from '@grafana/ui';
import { Page } from 'app/core/components/Page/Page';
@ -93,18 +94,24 @@ export function DashboardSceneRenderer({ model }: SceneComponentProps<DashboardS
function getStyles(theme: GrafanaTheme2) {
return {
pageContainer: css({
display: 'grid',
gridTemplateAreas: `
"panels"`,
gridTemplateColumns: `1fr`,
gridTemplateRows: '1fr',
height: '100%',
[theme.breakpoints.down('sm')]: {
display: 'flex',
flexDirection: 'column',
pageContainer: css(
{
display: 'grid',
gridTemplateAreas: `
"panels"`,
gridTemplateColumns: `1fr`,
gridTemplateRows: '1fr',
height: '100%',
[theme.breakpoints.down('sm')]: {
display: 'flex',
flexDirection: 'column',
},
},
}),
config.featureToggles.bodyScrolling && {
position: 'absolute',
width: '100%',
}
),
pageContainerWithControls: css({
gridTemplateAreas: `
"controls"