From 40e4d3deb5c7cef2cc245563d6b9a1e8ad360961 Mon Sep 17 00:00:00 2001 From: Ezequiel Victorero Date: Tue, 9 Jan 2024 07:43:31 -0300 Subject: [PATCH] UI: Hide additional separator when time picker is hidden (#80168) UI: Hide additional separator when time range is hidden --- .../app/features/dashboard/components/DashNav/DashNav.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard/components/DashNav/DashNav.tsx b/public/app/features/dashboard/components/DashNav/DashNav.tsx index 1cdac7b5cc6..c5629a17980 100644 --- a/public/app/features/dashboard/components/DashNav/DashNav.tsx +++ b/public/app/features/dashboard/components/DashNav/DashNav.tsx @@ -251,7 +251,7 @@ export const DashNav = React.memo((props) => { }; const renderRightActions = () => { - const { dashboard, onAddPanel, isFullscreen, kioskMode } = props; + const { dashboard, onAddPanel, isFullscreen, kioskMode, hideTimePicker } = props; const { canSave, canEdit, showSettings, canShare } = dashboard.meta; const { snapshot } = dashboard; const snapshotUrl = snapshot && snapshot.originalUrl; @@ -335,7 +335,10 @@ export const DashNav = React.memo((props) => { buttons.push(); } - buttons.push(); + // if the timepicker is hidden, we don't need to add this separator + if (!hideTimePicker) { + buttons.push(); + } buttons.push(renderTimeControls());