[WEB-3422] fix: app sidebar fixes and improvements (#2541)

* chore: workspace constant and types updated

* chore: workspace service, store and app theme store updated

* dev: extended sidebar implementation and code refactor

* chore: ux improvements

* chore: sidebar preference endpoint updated

* chore: sidebar preference endpoint updated

* chore: sidebar preference endpoint updated

* chore: code refactor

* chore: code refactor

* chore: code refactor

---------

Co-authored-by: sangeethailango <sangeethailango21@gmail.com>
This commit is contained in:
Anmol Singh Bhatia
2025-02-18 23:41:15 +05:30
committed by GitHub
parent 1c495dd94b
commit e3cacab908
3 changed files with 5 additions and 5 deletions

View File

@@ -178,7 +178,7 @@ export const ExtendedSidebarItem: FC<TExtendedSidebarItemProps> = observer((prop
<button
type="button"
className={cn(
"hidden group-hover/project-item:flex items-center justify-center absolute top-1/2 -left-3 -translate-y-1/2 rounded text-custom-sidebar-text-400 cursor-grab",
"flex items-center justify-center absolute top-1/2 -left-3 -translate-y-1/2 rounded text-custom-sidebar-text-400 cursor-grab",
{
// "cursor-not-allowed opacity-60": project.sort_order === null,
"cursor-grabbing": isDragging,
@@ -208,14 +208,14 @@ export const ExtendedSidebarItem: FC<TExtendedSidebarItemProps> = observer((prop
{isPinned ? (
<Tooltip tooltipContent="Hide tab">
<Eye
className="size-4 flex-shrink-0 invisible group-hover:visible outline-none text-custom-text-300"
className="size-4 flex-shrink-0 hover:text-custom-text-200 outline-none text-custom-text-300"
onClick={() => unPinNavigationItem(workspaceSlug.toString(), item.key)}
/>
</Tooltip>
) : (
<Tooltip tooltipContent="Show tab">
<EyeClosed
className="size-4 flex-shrink-0 invisible group-hover:visible outline-none text-custom-text-400"
className="size-4 flex-shrink-0 hover:text-custom-text-200 outline-none text-custom-text-400"
onClick={() => pinNavigationItem(workspaceSlug.toString(), item.key)}
/>
</Tooltip>

View File

@@ -6,7 +6,7 @@ export const getSidebarNavigationItemIcon = (key: string, className: string = ""
switch (key) {
case "home":
return <Home className={cn("size-4 flex-shrink-0", className)} />;
case "notifications":
case "inbox":
return <Inbox className={cn("size-4 flex-shrink-0", className)} />;
case "pi_chat":
return <PiChatLogo className={cn("size-4 flex-shrink-0", className)} />;

View File

@@ -43,7 +43,7 @@ export const SidebarItem: FC<TSidebarItemProps> = observer((props) => {
if (extendedSidebarCollapsed) toggleExtendedSidebar();
};
const staticItems = ["home", "your-work","notifications", "pi_chat", "projects"];
const staticItems = ["home", "inbox", "pi_chat", "projects"];
if (!allowPermissions(item.access as any, EUserPermissionsLevel.WORKSPACE, workspaceSlug.toString())) {
return null;