diff --git a/e2e/fixtures/connectionsTestCases.json b/e2e/fixtures/connectionsTestCases.json index 8cb72d5892..1767c1d19c 100644 --- a/e2e/fixtures/connectionsTestCases.json +++ b/e2e/fixtures/connectionsTestCases.json @@ -1,386 +1,386 @@ [ - { - "testName": "Linear - OAuth v2 - Default app", - "integration": "linear", - "label": "Linear", - "authType": "oauthDefault", - "authLabel": "OAuth v2 - Default app", - "category": "multi-type" - }, - { - "testName": "Linear - OAuth v2 - Private app", - "integration": "linear", - "label": "Linear", - "authType": "oauthPrivate", - "authLabel": "OAuth v2 - Private app", - "category": "multi-type" - }, - { - "testName": "Linear - API Key", - "integration": "linear", - "label": "Linear", - "authType": "apiKey", - "authLabel": "API Key", - "category": "multi-type" - }, - { - "testName": "Auth0 (no auth types)", - "integration": "auth0", - "label": "Auth0", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "Asana (no auth types)", - "integration": "asana", - "label": "Asana", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "Anthropic (no auth types)", - "integration": "anthropic", - "label": "Anthropic", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "AWS (no auth types)", - "integration": "aws", - "label": "AWS", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "Google Calendar - User (OAuth 2.0)", - "integration": "calendar", - "label": "Google Calendar", - "authType": "oauth", - "authLabel": "User (OAuth 2.0)", - "category": "multi-type" - }, - { - "testName": "Google Calendar - Service Account (JSON Key)", - "integration": "calendar", - "label": "Google Calendar", - "authType": "json", - "authLabel": "Service Account (JSON Key)", - "category": "multi-type" - }, - { - "testName": "OpenAI ChatGPT (no auth types)", - "integration": "chatgpt", - "label": "OpenAI ChatGPT", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "Atlassian Confluence - OAuth 2.0 App", - "integration": "confluence", - "label": "Atlassian Confluence", - "authType": "oauth", - "authLabel": "OAuth 2.0 App", - "category": "multi-type" - }, - { - "testName": "Atlassian Confluence - User API Token / PAT", - "integration": "confluence", - "label": "Atlassian Confluence", - "authType": "apiToken", - "authLabel": "User API Token / PAT", - "category": "multi-type" - }, - { - "testName": "Discord (no auth types)", - "integration": "discord", - "label": "Discord", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "Google Drive - User (OAuth 2.0)", - "integration": "drive", - "label": "Google Drive", - "authType": "oauth", - "authLabel": "User (OAuth 2.0)", - "category": "multi-type" - }, - { - "testName": "Google Drive - Service Account (JSON Key)", - "integration": "drive", - "label": "Google Drive", - "authType": "json", - "authLabel": "Service Account (JSON Key)", - "category": "multi-type" - }, - { - "testName": "Google Forms - User (OAuth 2.0)", - "integration": "forms", - "label": "Google Forms", - "authType": "oauth", - "authLabel": "User (OAuth 2.0)", - "category": "multi-type" - }, - { - "testName": "Google Forms - Service Account (JSON Key)", - "integration": "forms", - "label": "Google Forms", - "authType": "json", - "authLabel": "Service Account (JSON Key)", - "category": "multi-type" - }, - { - "testName": "GitHub - OAuth v2 - Default app", - "integration": "github", - "label": "GitHub", - "authType": "oauth", - "authLabel": "OAuth v2 - Default app", - "category": "multi-type" - }, - { - "testName": "GitHub - OAuth v2 - Private app", - "integration": "github", - "label": "GitHub", - "authType": "oauthPrivate", - "authLabel": "OAuth v2 - Private app", - "category": "multi-type" - }, - { - "testName": "GitHub - PAT + Webhook", - "integration": "github", - "label": "GitHub", - "authType": "pat", - "authLabel": "PAT + Webhook", - "category": "multi-type" - }, - { - "testName": "Gmail - User (OAuth 2.0)", - "integration": "gmail", - "label": "Gmail", - "authType": "oauth", - "authLabel": "User (OAuth 2.0)", - "category": "multi-type" - }, - { - "testName": "Gmail - Service Account (JSON Key)", - "integration": "gmail", - "label": "Gmail", - "authType": "json", - "authLabel": "Service Account (JSON Key)", - "category": "multi-type" - }, - { - "testName": "YouTube - User (OAuth 2.0)", - "integration": "youtube", - "label": "YouTube", - "authType": "oauth", - "authLabel": "User (OAuth 2.0)", - "category": "multi-type" - }, - { - "testName": "YouTube - Service Account (JSON Key)", - "integration": "youtube", - "label": "YouTube", - "authType": "json", - "authLabel": "Service Account (JSON Key)", - "category": "multi-type" - }, - { - "testName": "Google Gemini (no auth types)", - "integration": "googlegemini", - "label": "Google Gemini", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "Atlassian Jira - OAuth 2.0 App", - "integration": "jira", - "label": "Atlassian Jira", - "authType": "oauth", - "authLabel": "OAuth 2.0 App", - "category": "multi-type" - }, - { - "testName": "Atlassian Jira - User API Token / PAT", - "integration": "jira", - "label": "Atlassian Jira", - "authType": "apiToken", - "authLabel": "User API Token / PAT", - "category": "multi-type" - }, - { - "testName": "Google Sheets - User (OAuth 2.0)", - "integration": "sheets", - "label": "Google Sheets", - "authType": "oauth", - "authLabel": "User (OAuth 2.0)", - "category": "multi-type" - }, - { - "testName": "Google Sheets - Service Account (JSON Key)", - "integration": "sheets", - "label": "Google Sheets", - "authType": "json", - "authLabel": "Service Account (JSON Key)", - "category": "multi-type" - }, - { - "testName": "Slack - OAuth v2 - Default app", - "integration": "slack", - "label": "Slack", - "authType": "oauthDefault", - "authLabel": "OAuth v2 - Default app", - "category": "multi-type" - }, - { - "testName": "Slack - OAuth v2 - Private app", - "integration": "slack", - "label": "Slack", - "authType": "oauthPrivate", - "authLabel": "OAuth v2 - Private app", - "category": "multi-type" - }, - { - "testName": "Twilio - Auth Token", - "integration": "twilio", - "label": "Twilio", - "authType": "authToken", - "authLabel": "Auth Token", - "category": "multi-type" - }, - { - "testName": "Twilio - API Key", - "integration": "twilio", - "label": "Twilio", - "authType": "apiKey", - "authLabel": "API Key", - "category": "multi-type" - }, - { - "testName": "Telegram (no auth types)", - "integration": "telegram", - "label": "Telegram", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "HubSpot (no auth types)", - "integration": "hubspot", - "label": "HubSpot", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "Zoom - OAuth v2 - Default app", - "integration": "zoom", - "label": "Zoom", - "authType": "oauthDefault", - "authLabel": "OAuth v2 - Default app", - "category": "multi-type" - }, - { - "testName": "Zoom - OAuth v2 - Private app", - "integration": "zoom", - "label": "Zoom", - "authType": "oauthPrivate", - "authLabel": "OAuth v2 - Private app", - "category": "multi-type" - }, - { - "testName": "Zoom - Private Server-to-Server", - "integration": "zoom", - "label": "Zoom", - "authType": "serverToServer", - "authLabel": "Private Server-to-Server", - "category": "multi-type" - }, - { - "testName": "Salesforce - OAuth v2 - Default app", - "integration": "salesforce", - "label": "Salesforce", - "authType": "oauthDefault", - "authLabel": "OAuth v2 - Default app", - "category": "multi-type" - }, - { - "testName": "Salesforce - OAuth v2 - Private app", - "integration": "salesforce", - "label": "Salesforce", - "authType": "oauthPrivate", - "authLabel": "OAuth v2 - Private app", - "category": "multi-type" - }, - { - "testName": "Microsoft Teams - Default user-delegated app", - "integration": "microsoft_teams", - "label": "Microsoft Teams", - "authType": "oauthDefault", - "authLabel": "Default user-delegated app", - "category": "multi-type" - }, - { - "testName": "Microsoft Teams - Private user-delegated app", - "integration": "microsoft_teams", - "label": "Microsoft Teams", - "authType": "oauthPrivate", - "authLabel": "Private user-delegated app", - "category": "multi-type" - }, - { - "testName": "Microsoft Teams - Private daemon application", - "integration": "microsoft_teams", - "label": "Microsoft Teams", - "authType": "daemonApp", - "authLabel": "Private daemon application", - "category": "multi-type" - }, - { - "testName": "Kubernetes (no auth types)", - "integration": "kubernetes", - "label": "Kubernetes", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "Reddit (no auth types)", - "integration": "reddit", - "label": "Reddit", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "Pipedrive (no auth types)", - "integration": "pipedrive", - "label": "Pipedrive", - "authType": null, - "authLabel": null, - "category": "single-type" - }, - { - "testName": "Notion - OAuth v2 - Default app", - "integration": "notion", - "label": "Notion", - "authType": "oauthDefault", - "authLabel": "OAuth v2 - Default app", - "category": "multi-type" - }, - { - "testName": "Notion - API Key", - "integration": "notion", - "label": "Notion", - "authType": "apiKey", - "authLabel": "API Key", - "category": "multi-type" - } -] \ No newline at end of file + { + "testName": "Linear - OAuth v2 - Default app", + "integration": "linear", + "label": "Linear", + "authType": "oauthDefault", + "authLabel": "OAuth v2 - Default app", + "category": "multi-type" + }, + { + "testName": "Linear - OAuth v2 - Private app", + "integration": "linear", + "label": "Linear", + "authType": "oauthPrivate", + "authLabel": "OAuth v2 - Private app", + "category": "multi-type" + }, + { + "testName": "Linear - API Key", + "integration": "linear", + "label": "Linear", + "authType": "apiKey", + "authLabel": "API Key", + "category": "multi-type" + }, + { + "testName": "Auth0 (no auth types)", + "integration": "auth0", + "label": "Auth0", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "Asana (no auth types)", + "integration": "asana", + "label": "Asana", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "Anthropic (no auth types)", + "integration": "anthropic", + "label": "Anthropic", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "AWS (no auth types)", + "integration": "aws", + "label": "AWS", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "Google Calendar - User (OAuth 2.0)", + "integration": "calendar", + "label": "Google Calendar", + "authType": "oauth", + "authLabel": "User (OAuth 2.0)", + "category": "multi-type" + }, + { + "testName": "Google Calendar - Service Account (JSON Key)", + "integration": "calendar", + "label": "Google Calendar", + "authType": "json", + "authLabel": "Service Account (JSON Key)", + "category": "multi-type" + }, + { + "testName": "OpenAI ChatGPT (no auth types)", + "integration": "chatgpt", + "label": "OpenAI ChatGPT", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "Atlassian Confluence - OAuth 2.0 App", + "integration": "confluence", + "label": "Atlassian Confluence", + "authType": "oauth", + "authLabel": "OAuth 2.0 App", + "category": "multi-type" + }, + { + "testName": "Atlassian Confluence - User API Token / PAT", + "integration": "confluence", + "label": "Atlassian Confluence", + "authType": "apiToken", + "authLabel": "User API Token / PAT", + "category": "multi-type" + }, + { + "testName": "Discord (no auth types)", + "integration": "discord", + "label": "Discord", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "Google Drive - User (OAuth 2.0)", + "integration": "drive", + "label": "Google Drive", + "authType": "oauth", + "authLabel": "User (OAuth 2.0)", + "category": "multi-type" + }, + { + "testName": "Google Drive - Service Account (JSON Key)", + "integration": "drive", + "label": "Google Drive", + "authType": "json", + "authLabel": "Service Account (JSON Key)", + "category": "multi-type" + }, + { + "testName": "Google Forms - User (OAuth 2.0)", + "integration": "forms", + "label": "Google Forms", + "authType": "oauth", + "authLabel": "User (OAuth 2.0)", + "category": "multi-type" + }, + { + "testName": "Google Forms - Service Account (JSON Key)", + "integration": "forms", + "label": "Google Forms", + "authType": "json", + "authLabel": "Service Account (JSON Key)", + "category": "multi-type" + }, + { + "testName": "GitHub - OAuth v2 - Default app", + "integration": "github", + "label": "GitHub", + "authType": "oauth", + "authLabel": "OAuth v2 - Default app", + "category": "multi-type" + }, + { + "testName": "GitHub - OAuth v2 - Private app", + "integration": "github", + "label": "GitHub", + "authType": "oauthPrivate", + "authLabel": "OAuth v2 - Private app", + "category": "multi-type" + }, + { + "testName": "GitHub - PAT + Webhook", + "integration": "github", + "label": "GitHub", + "authType": "pat", + "authLabel": "PAT + Webhook", + "category": "multi-type" + }, + { + "testName": "Gmail - User (OAuth 2.0)", + "integration": "gmail", + "label": "Gmail", + "authType": "oauth", + "authLabel": "User (OAuth 2.0)", + "category": "multi-type" + }, + { + "testName": "Gmail - Service Account (JSON Key)", + "integration": "gmail", + "label": "Gmail", + "authType": "json", + "authLabel": "Service Account (JSON Key)", + "category": "multi-type" + }, + { + "testName": "YouTube - User (OAuth 2.0)", + "integration": "youtube", + "label": "YouTube", + "authType": "oauth", + "authLabel": "User (OAuth 2.0)", + "category": "multi-type" + }, + { + "testName": "YouTube - Service Account (JSON Key)", + "integration": "youtube", + "label": "YouTube", + "authType": "json", + "authLabel": "Service Account (JSON Key)", + "category": "multi-type" + }, + { + "testName": "Google Gemini (no auth types)", + "integration": "googlegemini", + "label": "Google Gemini", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "Atlassian Jira - OAuth 2.0 App", + "integration": "jira", + "label": "Atlassian Jira", + "authType": "oauth", + "authLabel": "OAuth 2.0 App", + "category": "multi-type" + }, + { + "testName": "Atlassian Jira - User API Token / PAT", + "integration": "jira", + "label": "Atlassian Jira", + "authType": "apiToken", + "authLabel": "User API Token / PAT", + "category": "multi-type" + }, + { + "testName": "Google Sheets - User (OAuth 2.0)", + "integration": "sheets", + "label": "Google Sheets", + "authType": "oauth", + "authLabel": "User (OAuth 2.0)", + "category": "multi-type" + }, + { + "testName": "Google Sheets - Service Account (JSON Key)", + "integration": "sheets", + "label": "Google Sheets", + "authType": "json", + "authLabel": "Service Account (JSON Key)", + "category": "multi-type" + }, + { + "testName": "Slack - OAuth v2 - Default app", + "integration": "slack", + "label": "Slack", + "authType": "oauthDefault", + "authLabel": "OAuth v2 - Default app", + "category": "multi-type" + }, + { + "testName": "Slack - OAuth v2 - Private app", + "integration": "slack", + "label": "Slack", + "authType": "oauthPrivate", + "authLabel": "OAuth v2 - Private app", + "category": "multi-type" + }, + { + "testName": "Twilio - Auth Token", + "integration": "twilio", + "label": "Twilio", + "authType": "authToken", + "authLabel": "Auth Token", + "category": "multi-type" + }, + { + "testName": "Twilio - API Key", + "integration": "twilio", + "label": "Twilio", + "authType": "apiKey", + "authLabel": "API Key", + "category": "multi-type" + }, + { + "testName": "Telegram (no auth types)", + "integration": "telegram", + "label": "Telegram", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "HubSpot (no auth types)", + "integration": "hubspot", + "label": "HubSpot", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "Zoom - OAuth v2 - Default app", + "integration": "zoom", + "label": "Zoom", + "authType": "oauthDefault", + "authLabel": "OAuth v2 - Default app", + "category": "multi-type" + }, + { + "testName": "Zoom - OAuth v2 - Private app", + "integration": "zoom", + "label": "Zoom", + "authType": "oauthPrivate", + "authLabel": "OAuth v2 - Private app", + "category": "multi-type" + }, + { + "testName": "Zoom - Private Server-to-Server", + "integration": "zoom", + "label": "Zoom", + "authType": "serverToServer", + "authLabel": "Private Server-to-Server", + "category": "multi-type" + }, + { + "testName": "Salesforce - OAuth v2 - Default app", + "integration": "salesforce", + "label": "Salesforce", + "authType": "oauthDefault", + "authLabel": "OAuth v2 - Default app", + "category": "multi-type" + }, + { + "testName": "Salesforce - OAuth v2 - Private app", + "integration": "salesforce", + "label": "Salesforce", + "authType": "oauthPrivate", + "authLabel": "OAuth v2 - Private app", + "category": "multi-type" + }, + { + "testName": "Microsoft Teams - Default user-delegated app", + "integration": "microsoft_teams", + "label": "Microsoft Teams", + "authType": "oauthDefault", + "authLabel": "Default user-delegated app", + "category": "multi-type" + }, + { + "testName": "Microsoft Teams - Private user-delegated app", + "integration": "microsoft_teams", + "label": "Microsoft Teams", + "authType": "oauthPrivate", + "authLabel": "Private user-delegated app", + "category": "multi-type" + }, + { + "testName": "Microsoft Teams - Private daemon application", + "integration": "microsoft_teams", + "label": "Microsoft Teams", + "authType": "daemonApp", + "authLabel": "Private daemon application", + "category": "multi-type" + }, + { + "testName": "Kubernetes (no auth types)", + "integration": "kubernetes", + "label": "Kubernetes", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "Reddit (no auth types)", + "integration": "reddit", + "label": "Reddit", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "Pipedrive (no auth types)", + "integration": "pipedrive", + "label": "Pipedrive", + "authType": null, + "authLabel": null, + "category": "single-type" + }, + { + "testName": "Notion - OAuth v2 - Default app", + "integration": "notion", + "label": "Notion", + "authType": "oauthDefault", + "authLabel": "OAuth v2 - Default app", + "category": "multi-type" + }, + { + "testName": "Notion - API Key", + "integration": "notion", + "label": "Notion", + "authType": "apiKey", + "authLabel": "API Key", + "category": "multi-type" + } +] diff --git a/src/autokitteh b/src/autokitteh index 7b34eb3ced..40ee308cac 160000 --- a/src/autokitteh +++ b/src/autokitteh @@ -1 +1 @@ -Subproject commit 7b34eb3ceddc061832d7a46be73fd9dc0f58fb0b +Subproject commit 40ee308cac5979c0584b336c9692b9e547ff9425 diff --git a/src/components/molecules/navigationButton.tsx b/src/components/molecules/navigationButton.tsx index b97a511e7d..2e986a8488 100644 --- a/src/components/molecules/navigationButton.tsx +++ b/src/components/molecules/navigationButton.tsx @@ -22,7 +22,7 @@ export const NavigationButton = ({ showUnderline = true, }: NavigationButtonProps) => { const buttonClassName = cn( - "group relative size-full gap-2 whitespace-nowrap rounded-none bg-transparent p-3.5 text-gray-1500 hover:bg-gray-1050", + "group relative size-full gap-1 whitespace-nowrap rounded-none bg-transparent p-2 text-gray-1500 hover:bg-gray-1050 sm:gap-2 sm:p-3.5", { "bg-black font-semibold active text-white": isSelected, }, diff --git a/src/components/organisms/configuration/configrationDrawer.tsx b/src/components/organisms/configuration/configrationDrawer.tsx index 794f60fb91..78ff37ff05 100644 --- a/src/components/organisms/configuration/configrationDrawer.tsx +++ b/src/components/organisms/configuration/configrationDrawer.tsx @@ -5,7 +5,7 @@ import { useLocation, useParams } from "react-router-dom"; import { defaultProjectSettingsWidth } from "@src/constants"; import { EventListenerName } from "@src/enums"; import { DrawerName } from "@src/enums/components"; -import { triggerEvent, useResize } from "@src/hooks"; +import { triggerEvent, useResize, useWindowDimensions } from "@src/hooks"; import { useCacheStore, useSharedBetweenProjectsStore } from "@src/store"; import { cn } from "@src/utilities"; import { extractSettingsPath } from "@src/utilities/navigation"; @@ -19,6 +19,9 @@ export const ProjectConfigurationDrawer = () => { const location = useLocation(); const setProjectSettingsWidth = useSharedBetweenProjectsStore((state) => state.setProjectSettingsWidth); const projectSettingsWidth = useSharedBetweenProjectsStore((state) => state.projectSettingsWidth); + const { isMobile, isTablet } = useWindowDimensions(); + + const isMobileOrTablet = isMobile || isTablet; const fetchTriggers = useCacheStore((state) => state.fetchTriggers); const fetchVariables = useCacheStore((state) => state.fetchVariables); @@ -63,29 +66,36 @@ export const ProjectConfigurationDrawer = () => { const className = cn( "flex h-full flex-col overflow-y-auto overflow-x-hidden bg-gray-1100", - "rounded-r-2xl px-8 py-3 sm:py-5 md:py-7" + "rounded-r-2xl px-4 py-3 sm:px-6 sm:py-5 md:px-8 md:py-7" ); + const mobileWidth = isMobileOrTablet ? 100 : drawerWidth; + return ( triggerEvent(EventListenerName.hideProjectConfigSidebar)} - width={drawerWidth} - wrapperClassName="p-0 relative absolute rounded-r-2xl" + width={mobileWidth} + wrapperClassName={cn("absolute p-0", { + "rounded-r-2xl": !isMobileOrTablet, + "rounded-none": isMobileOrTablet, + })} > - + {!isMobileOrTablet ? ( + + ) : null} ); }; diff --git a/src/components/organisms/sidebar/sidebar.tsx b/src/components/organisms/sidebar/sidebar.tsx index 6e966ef44b..64e0c0f8e5 100644 --- a/src/components/organisms/sidebar/sidebar.tsx +++ b/src/components/organisms/sidebar/sidebar.tsx @@ -1,4 +1,4 @@ -import React, { Suspense, useEffect, useMemo, useState } from "react"; +import React, { Suspense, useCallback, useEffect, useMemo, useState } from "react"; import { AnimatePresence, motion } from "motion/react"; import Avatar from "react-avatar"; @@ -7,6 +7,7 @@ import { LuUnplug } from "react-icons/lu"; import { useLocation, useNavigate } from "react-router-dom"; import { descopeProjectId, featureFlags } from "@constants"; +import { useWindowDimensions } from "@src/hooks"; import { cn } from "@src/utilities"; import { useLoggerStore, useOrganizationStore, useToastStore } from "@store"; @@ -31,11 +32,18 @@ export const Sidebar = () => { const { t } = useTranslation("sidebar"); const addToast = useToastStore((state) => state.addToast); const navigate = useNavigate(); + const { isMobile, isTablet } = useWindowDimensions(); + + const isMobileOrTablet = isMobile || isTablet; useEffect(() => { setIsOpen(false); }, [location.pathname]); + const handleCloseSidebar = useCallback(() => { + setIsOpen(false); + }, []); + const loadOrganizations = async () => { const { data, error } = await getEnrichedOrganizations(); if (error || !data) { @@ -70,14 +78,45 @@ export const Sidebar = () => { }; const rootClassName = useMemo( - () => cn("relative z-30 flex h-full items-start", { "z-50": isFeedbackOpen }), - [isFeedbackOpen] + () => + cn("relative z-30 flex h-full items-start", { + "z-50": isFeedbackOpen, + "fixed left-0 top-0 z-50": isMobileOrTablet && isOpen, + hidden: isMobileOrTablet && !isOpen, + }), + [isFeedbackOpen, isMobileOrTablet, isOpen] + ); + + const sidebarContentClassName = useMemo( + () => + cn("z-10 flex h-full flex-col justify-between bg-white p-2.5 pb-3 pt-6", { + "min-w-[60px]": !isMobileOrTablet, + "shadow-xl": isMobileOrTablet && isOpen, + }), + [isMobileOrTablet, isOpen] ); return ( }> + {isMobileOrTablet && !isOpen ? ( + + ) : null} + {isMobileOrTablet && isOpen ? ( +