From 4f597ba580346f54e8024f3f2fd074de3fdc595c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Obermu=CC=88ller?= Date: Thu, 28 Dec 2023 17:08:17 +0100 Subject: [PATCH 1/6] fix(3000): re-implement debug notice --- .../src/layout/navigation-3000/Navigation.tsx | 4 ++- .../navigation-3000/components/Navbar.tsx | 2 ++ .../components/NavbarButton.tsx | 2 +- .../src/layout/navigation/SideBar/SideBar.tsx | 2 -- frontend/src/lib/components/DebugNotice.tsx | 36 ++++++++++++++++--- 5 files changed, 38 insertions(+), 8 deletions(-) diff --git a/frontend/src/layout/navigation-3000/Navigation.tsx b/frontend/src/layout/navigation-3000/Navigation.tsx index 16b4e9fade648..c7a99096015ec 100644 --- a/frontend/src/layout/navigation-3000/Navigation.tsx +++ b/frontend/src/layout/navigation-3000/Navigation.tsx @@ -32,7 +32,9 @@ export function Navigation({ useEffect(() => { // FIXME: Include debug notice in a non-obstructing way - document.getElementById('bottom-notice')?.remove() + if (mode !== 'minimal') { + document.getElementById('bottom-notice')?.remove() + } }, []) if (mode !== 'full') { diff --git a/frontend/src/layout/navigation-3000/components/Navbar.tsx b/frontend/src/layout/navigation-3000/components/Navbar.tsx index 6fbae5671a9c3..87dc6473e8a26 100644 --- a/frontend/src/layout/navigation-3000/components/Navbar.tsx +++ b/frontend/src/layout/navigation-3000/components/Navbar.tsx @@ -2,6 +2,7 @@ import { IconGear, IconSearch, IconToolbar } from '@posthog/icons' import clsx from 'clsx' import { useActions, useValues } from 'kea' import { commandBarLogic } from 'lib/components/CommandBar/commandBarLogic' +import { DebugNotice } from 'lib/components/DebugNotice' import { Resizer } from 'lib/components/Resizer/Resizer' import { ScrollableShadows } from 'lib/components/ScrollableShadows/ScrollableShadows' import { IconWarning } from 'lib/lemon-ui/icons' @@ -70,6 +71,7 @@ export function Navbar(): JSX.Element {