From 2c9338c68ef24d661c415891d8f3c391a42efd18 Mon Sep 17 00:00:00 2001 From: RobertoSimonini1 Date: Tue, 11 Jun 2024 16:02:49 +0200 Subject: [PATCH 1/2] made sidebar always visible on settings page --- .../navigation-drawer/components/NavigationDrawer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx index 2b9863915ab1..febcc5693bcd 100644 --- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx +++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx @@ -12,6 +12,7 @@ import { DESKTOP_NAV_DRAWER_WIDTHS } from '../constants/DesktopNavDrawerWidths'; import { NavigationDrawerBackButton } from './NavigationDrawerBackButton'; import { NavigationDrawerHeader } from './NavigationDrawerHeader'; +import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage'; export type NavigationDrawerProps = { children: ReactNode; @@ -69,6 +70,7 @@ export const NavigationDrawer = ({ const isMobile = useIsMobile(); const theme = useTheme(); const isNavigationDrawerOpen = useRecoilValue(isNavigationDrawerOpenState); + const isSettingsPage = useIsSettingsPage(); const handleHover = () => { setIsHovered(true); @@ -90,7 +92,7 @@ export const NavigationDrawer = ({ initial={false} animate={{ width: isMobile ? mobileWidth : desktopWidth, - opacity: isNavigationDrawerOpen ? 1 : 0, + opacity: isNavigationDrawerOpen || isSettingsPage ? 1 : 0, }} transition={{ duration: theme.animation.duration.normal, From 2d573be1613475c3338c49d306b8a8abb5daa80e Mon Sep 17 00:00:00 2001 From: RobertoSimonini1 Date: Tue, 11 Jun 2024 16:14:14 +0200 Subject: [PATCH 2/2] lint fix --- .../navigation-drawer/components/NavigationDrawer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx index febcc5693bcd..524e87947691 100644 --- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx +++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx @@ -5,6 +5,7 @@ import { motion } from 'framer-motion'; import { useRecoilValue } from 'recoil'; import { MOBILE_VIEWPORT } from 'twenty-ui'; +import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage'; import { isNavigationDrawerOpenState } from '@/ui/navigation/states/isNavigationDrawerOpenState'; import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile'; @@ -12,7 +13,6 @@ import { DESKTOP_NAV_DRAWER_WIDTHS } from '../constants/DesktopNavDrawerWidths'; import { NavigationDrawerBackButton } from './NavigationDrawerBackButton'; import { NavigationDrawerHeader } from './NavigationDrawerHeader'; -import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage'; export type NavigationDrawerProps = { children: ReactNode;