Home: Remove extra padding for dashboard home (#89432)

This commit is contained in:
Ivan Ortega Alba 2024-06-21 13:16:16 +02:00 committed by GitHub
parent 06a1e8e22b
commit aea894191b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,6 @@ export function DashboardSceneRenderer({ model }: SceneComponentProps<DashboardS
const pageNav = model.getPageNav(location, navIndex); const pageNav = model.getPageNav(location, navIndex);
const bodyToRender = model.getBodyToRender(); const bodyToRender = model.getBodyToRender();
const navModel = getNavModel(navIndex, 'dashboards/browse'); const navModel = getNavModel(navIndex, 'dashboards/browse');
const isHomePage = !meta.url && !meta.slug && !meta.isNew && !meta.isSnapshot;
const hasControls = controls?.hasControls(); const hasControls = controls?.hasControls();
if (editview) { if (editview) {
@ -84,7 +83,7 @@ export function DashboardSceneRenderer({ model }: SceneComponentProps<DashboardS
className={styles.scrollbarContainer} className={styles.scrollbarContainer}
testId={selectors.pages.Dashboard.DashNav.scrollContainer} testId={selectors.pages.Dashboard.DashNav.scrollContainer}
> >
<div className={cx(styles.canvasContent, isHomePage && styles.homePagePadding)}>{body}</div> <div className={cx(styles.canvasContent)}>{body}</div>
</CustomScrollbar> </CustomScrollbar>
</div> </div>
)} )}
@ -137,9 +136,6 @@ function getStyles(theme: GrafanaTheme2) {
controlsWrapperWithScopes: css({ controlsWrapperWithScopes: css({
padding: theme.spacing(2, 2, 2, 0), padding: theme.spacing(2, 2, 2, 0),
}), }),
homePagePadding: css({
padding: theme.spacing(2, 2),
}),
canvasContent: css({ canvasContent: css({
label: 'canvas-content', label: 'canvas-content',
display: 'flex', display: 'flex',