From fc6812a97054b51561e308e2e0e96b85c6b3747a Mon Sep 17 00:00:00 2001 From: Marius Andra Date: Wed, 27 Mar 2024 23:11:55 +0100 Subject: [PATCH 1/3] fix(3000): interface triangulator --- .../src/layout/navigation-3000/Navigation.tsx | 10 +++++--- .../navigation-3000/components/Navbar.tsx | 8 +++++- .../navigation-3000/sidepanel/SidePanel.tsx | 3 +++ .../src/layout/navigation-3000/themeLogic.ts | 24 +++++++++++++++++- frontend/src/layout/navigation-3000/themes.ts | 25 +++++++++++++++++++ .../Cards/InsightCard/InsightCard.tsx | 4 +++ .../components/CompactList/CompactList.tsx | 10 +++++++- frontend/src/lib/constants.tsx | 1 + 8 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 frontend/src/layout/navigation-3000/themes.ts diff --git a/frontend/src/layout/navigation-3000/Navigation.tsx b/frontend/src/layout/navigation-3000/Navigation.tsx index 507c2a9146520..da07642816cec 100644 --- a/frontend/src/layout/navigation-3000/Navigation.tsx +++ b/frontend/src/layout/navigation-3000/Navigation.tsx @@ -1,7 +1,7 @@ import './Navigation.scss' import clsx from 'clsx' -import { useMountedLogic, useValues } from 'kea' +import { useValues } from 'kea' import { BillingAlertsV2 } from 'lib/components/BillingAlertsV2' import { CommandBar } from 'lib/components/CommandBar/CommandBar' import { FlaggedFeature } from 'lib/components/FlaggedFeature' @@ -27,13 +27,14 @@ export function Navigation({ children: ReactNode sceneConfig: SceneConfig | null }): JSX.Element { - useMountedLogic(themeLogic) + const { theme } = useValues(themeLogic) const { mobileLayout } = useValues(navigationLogic) const { activeNavbarItem, mode } = useValues(navigation3000Logic) if (mode !== 'full') { return ( -
+ // eslint-disable-next-line react/forbid-dom-props +
{mode === 'minimal' ? : null}
{children}
@@ -41,7 +42,8 @@ export function Navigation({ } return ( -
+ // eslint-disable-next-line react/forbid-dom-props +
{activeNavbarItem && } diff --git a/frontend/src/layout/navigation-3000/components/Navbar.tsx b/frontend/src/layout/navigation-3000/components/Navbar.tsx index a99d6def7188d..62308871fc11a 100644 --- a/frontend/src/layout/navigation-3000/components/Navbar.tsx +++ b/frontend/src/layout/navigation-3000/components/Navbar.tsx @@ -15,12 +15,14 @@ import { userLogic } from 'scenes/userLogic' import { navigationLogic } from '~/layout/navigation/navigationLogic' import { AccountPopoverOverlay } from '~/layout/navigation/TopBar/AccountPopover' +import { themeLogic } from '~/layout/navigation-3000/themeLogic' import { navigation3000Logic } from '../navigationLogic' import { KeyboardShortcut } from './KeyboardShortcut' import { NavbarButton } from './NavbarButton' export function Navbar(): JSX.Element { + const { theme } = useValues(themeLogic) const { user } = useValues(userLogic) const { isAccountPopoverOpen, systemStatusHealthy } = useValues(navigationLogic) const { closeAccountPopover, toggleAccountPopover } = useActions(navigationLogic) @@ -34,7 +36,11 @@ export function Navbar(): JSX.Element { return ( <>