Accessibility: enable responsive reflow of variables in dashboard edit (#110967)

enable responsive reflow of variables in dashboard edit
This commit is contained in:
Luminessa Starlight
2025-09-12 10:44:40 -04:00
committed by GitHub
parent fc2de49b88
commit a27ace5cfb
@@ -152,10 +152,10 @@ function DashboardControlsRenderer({ model }: SceneComponentProps<DashboardContr
{editPanel && <PanelEditControls panelEditor={editPanel} />}
</Stack>
{!hideTimeControls && (
<Stack justifyContent="flex-end">
<div className={cx(styles.timeControls, editPanel && styles.timeControlsWrap)}>
<timePicker.Component model={timePicker} />
<refreshPicker.Component model={refreshPicker} />
</Stack>
</div>
)}
{(hasControlMenuVariables || hasControlMenuLinks) && (
<Stack>
@@ -198,6 +198,7 @@ function getStyles(theme: GrafanaTheme2) {
},
}),
controlsPanelEdit: css({
flexWrap: 'wrap-reverse',
// In panel edit we do not need any right padding as the splitter is providing it
paddingRight: 0,
}),
@@ -205,5 +206,14 @@ function getStyles(theme: GrafanaTheme2) {
background: 'unset',
position: 'unset',
}),
timeControls: css({
display: 'flex',
justifyContent: 'flex-end',
gap: theme.spacing(1),
}),
timeControlsWrap: css({
flexWrap: 'wrap',
marginLeft: 'auto',
}),
};
}