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.

[WEB-2182] fix: favorite item alignment and redirection (#5316)

Anmol Singh Bhatia3279bb6ac952
diff --git a/web/core/components/workspace/sidebar/favorites/favorite-item.tsx b/web/core/components/workspace/sidebar/favorites/favorite-item.tsx
index 4ef38c8c26..79cd8dc563 100644
--- a/web/core/components/workspace/sidebar/favorites/favorite-item.tsx
+++ b/web/core/components/workspace/sidebar/favorites/favorite-item.tsx
@@ -135,7 +135,11 @@ export const FavoriteItem = observer(
key={favorite.id}
className={`${sidebarCollapsed ? "p-0 size-8 aspect-square justify-center mx-auto" : ""}`}
>
- <div className="flex flex-between items-center gap-1.5 py-[1px] w-full">
+ <div
+ className={cn("flex justify-between items-center gap-1.5 py-[1px]", {
+ "w-full": !sidebarCollapsed,
+ })}
+ >
<Tooltip
isMobile={isMobile}
tooltipContent={favorite.sort_order === null ? "Join the project to rearrange" : "Drag to rearrange"}
@@ -158,13 +162,14 @@ export const FavoriteItem = observer(
</button>
</Tooltip>
- {getIcon()}
-
- {!sidebarCollapsed && (
- <Link href={getLink()} className="text-sm leading-5 font-medium flex-1 truncate">
- {favorite.entity_data ? favorite.entity_data.name : favorite.name}
- </Link>
- )}
+ <Link href={getLink()} className="flex items-center gap-1.5 truncate">
+ {getIcon()}
+ {!sidebarCollapsed && (
+ <span className="text-sm leading-5 font-medium flex-1 truncate">
+ {favorite.entity_data ? favorite.entity_data.name : favorite.name}
+ </span>
+ )}
+ </Link>
{!sidebarCollapsed && (
<CustomMenu