From e19cb012be44c1f36dbb979e215ed74777c7b9e8 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Wed, 6 Nov 2024 16:56:15 +0530 Subject: [PATCH 1/2] [WEB-2728] improvement: add `true-transparent` variant for textarea. (#5960) --- packages/ui/src/form-fields/textarea.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/form-fields/textarea.tsx b/packages/ui/src/form-fields/textarea.tsx index 48cc311e38..786e00a1de 100644 --- a/packages/ui/src/form-fields/textarea.tsx +++ b/packages/ui/src/form-fields/textarea.tsx @@ -5,7 +5,7 @@ import { cn } from "../../helpers"; import { useAutoResizeTextArea } from "../hooks/use-auto-resize-textarea"; export interface TextAreaProps extends React.TextareaHTMLAttributes { - mode?: "primary" | "transparent"; + mode?: "primary" | "transparent" | "true-transparent"; textAreaSize?: "xs" | "sm" | "md"; hasError?: boolean; className?: string; @@ -39,6 +39,7 @@ const TextArea = React.forwardRef((props, re "rounded-md border-[0.5px] border-custom-border-200": mode === "primary", "focus:ring-theme rounded border-none bg-transparent ring-0 transition-all focus:ring-1": mode === "transparent", + "rounded border-none bg-transparent ring-0": mode === "true-transparent", "px-1.5 py-1": textAreaSize === "xs", "px-3 py-2": textAreaSize === "sm", "p-3": textAreaSize === "md", From eebc327b103433c13d494f4e8d7b4461d289d2d6 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 6 Nov 2024 18:36:23 +0530 Subject: [PATCH 2/2] chore: app sidebar behaviour (#5964) --- .../favorite-items/common/favorite-item-title.tsx | 7 +------ .../workspace/sidebar/favorites/favorite-items/root.tsx | 8 +------- .../components/workspace/sidebar/projects-list-item.tsx | 1 - 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx b/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx index dfa939ce35..98dcb033b5 100644 --- a/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx +++ b/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx @@ -6,7 +6,6 @@ import { useAppTheme } from "@/hooks/store"; import { usePlatformOS } from "@/hooks/use-platform-os"; type Props = { - projectId: string | null; href: string; title: string; icon: JSX.Element; @@ -14,7 +13,7 @@ type Props = { }; export const FavoriteItemTitle: FC = observer((props) => { - const { projectId, href, title, icon, isSidebarCollapsed } = props; + const { href, title, icon, isSidebarCollapsed } = props; // store hooks const { toggleSidebar } = useAppTheme(); const { isMobile } = usePlatformOS(); @@ -24,10 +23,6 @@ export const FavoriteItemTitle: FC = observer((props) => { "group/project-item cursor-pointer relative group w-full flex items-center justify-center gap-1.5 rounded px-2 py-1 outline-none text-custom-sidebar-text-200 hover:bg-custom-sidebar-background-90 active:bg-custom-sidebar-background-90 truncate p-0 size-8 aspect-square mx-auto"; const handleOnClick = () => { - if (projectId) { - const projectItem = document.getElementById(`${projectId}`); - projectItem?.scrollIntoView({ behavior: "smooth" }); - } if (isMobile) toggleSidebar(); }; diff --git a/web/core/components/workspace/sidebar/favorites/favorite-items/root.tsx b/web/core/components/workspace/sidebar/favorites/favorite-items/root.tsx index 84f66c0a71..5d880e3a6c 100644 --- a/web/core/components/workspace/sidebar/favorites/favorite-items/root.tsx +++ b/web/core/components/workspace/sidebar/favorites/favorite-items/root.tsx @@ -91,13 +91,7 @@ export const FavoriteRoot: FC = observer((props) => { <> {!sidebarCollapsed && } - + {!sidebarCollapsed && ( = observer((props) => { useEffect(() => { if (URLProjectId === project.id) setIsProjectListOpen(true); - else setIsProjectListOpen(false); }, [URLProjectId]); const handleItemClick = () => {