Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

chore: app sidebar behaviour (#5964)

Anmol Singh Bhatiaeebc327b1034
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<Props> = 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<Props> = 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<Props> = observer((props) => {
<>
<FavoriteItemWrapper elementRef={elementRef} isMenuActive={isMenuActive} sidebarCollapsed={sidebarCollapsed}>
{!sidebarCollapsed && <FavoriteItemDragHandle isDragging={isDragging} sort_order={favorite.sort_order} />}
- <FavoriteItemTitle
- href={itemLink}
- projectId={favorite.project_id}
- icon={itemIcon}
- title={itemTitle}
- isSidebarCollapsed={!!sidebarCollapsed}
- />
+ <FavoriteItemTitle href={itemLink} icon={itemIcon} title={itemTitle} isSidebarCollapsed={!!sidebarCollapsed} />
{!sidebarCollapsed && (
<FavoriteItemQuickAction
favorite={favorite}
diff --git a/web/core/components/workspace/sidebar/projects-list-item.tsx b/web/core/components/workspace/sidebar/projects-list-item.tsx
index 2f809bb47d..faa85a8260 100644
--- a/web/core/components/workspace/sidebar/projects-list-item.tsx
+++ b/web/core/components/workspace/sidebar/projects-list-item.tsx
@@ -287,7 +287,6 @@ export const SidebarProjectsListItem: React.FC<Props> = observer((props) => {
useEffect(() => {
if (URLProjectId === project.id) setIsProjectListOpen(true);
- else setIsProjectListOpen(false);
}, [URLProjectId]);
const handleItemClick = () => {