[WEB-5506] regression: navigation revamp bugs (#8180)

This commit is contained in:
Aaryan Khandelwal 2025-11-26 16:25:29 +05:30 committed by GitHub
parent ae7898aaee
commit 05b1c147a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 19 deletions

View file

@ -1,10 +1,12 @@
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { useParams } from "next/navigation"; import { useParams } from "next/navigation";
// hooks // plane imports
import { Header, Row } from "@plane/ui"; import { Header, Row } from "@plane/ui";
// components
import { AppHeader } from "@/components/core/app-header"; import { AppHeader } from "@/components/core/app-header";
import { TabNavigationRoot } from "@/components/navigation"; import { TabNavigationRoot } from "@/components/navigation";
import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useIssueDetail } from "@/hooks/store/use-issue-detail";
import { useProjectNavigationPreferences } from "@/hooks/use-navigation-preferences";
// local components // local components
import { WorkItemDetailsHeader } from "./work-item-header"; import { WorkItemDetailsHeader } from "./work-item-header";
@ -18,9 +20,12 @@ export const ProjectWorkItemDetailsHeader = observer(function ProjectWorkItemDet
// derived values // derived values
const issueId = getIssueIdByIdentifier(workItem?.toString()); const issueId = getIssueIdByIdentifier(workItem?.toString());
const issueDetails = issueId ? getIssueById(issueId?.toString()) : undefined; const issueDetails = issueId ? getIssueById(issueId?.toString()) : undefined;
// preferences
const { preferences: projectPreferences } = useProjectNavigationPreferences();
return ( return (
<> <>
{projectPreferences.navigationMode === "horizontal" && (
<div className="z-20"> <div className="z-20">
<Row className="h-header flex gap-2 w-full items-center border-b border-custom-border-200 bg-custom-sidebar-background-100"> <Row className="h-header flex gap-2 w-full items-center border-b border-custom-border-200 bg-custom-sidebar-background-100">
<div className="flex items-center gap-2 divide-x divide-custom-border-100 h-full w-full"> <div className="flex items-center gap-2 divide-x divide-custom-border-100 h-full w-full">
@ -37,6 +42,7 @@ export const ProjectWorkItemDetailsHeader = observer(function ProjectWorkItemDet
</div> </div>
</Row> </Row>
</div> </div>
)}
<AppHeader header={<WorkItemDetailsHeader />} /> <AppHeader header={<WorkItemDetailsHeader />} />
</> </>
); );

View file

@ -15,7 +15,6 @@ export const TopNavigationRoot = observer(() => {
return ( return (
<div <div
className={cn("flex items-center justify-evenly min-h-11 w-full px-3.5 z-[27] transition-all duration-300", { className={cn("flex items-center justify-evenly min-h-11 w-full px-3.5 z-[27] transition-all duration-300", {
"px-3.5": showLabel,
"px-2": !showLabel, "px-2": !showLabel,
})} })}
> >

View file

@ -4,7 +4,6 @@ import useSWR from "swr";
// plane imports // plane imports
import { PRODUCT_TOUR_TRACKER_EVENTS } from "@plane/constants"; import { PRODUCT_TOUR_TRACKER_EVENTS } from "@plane/constants";
import { ContentWrapper } from "@plane/ui"; import { ContentWrapper } from "@plane/ui";
import { cn } from "@plane/utils";
// components // components
import { TourRoot } from "@/components/onboarding/tour"; import { TourRoot } from "@/components/onboarding/tour";
// helpers // helpers
@ -60,7 +59,7 @@ export const WorkspaceHomeView = observer(function WorkspaceHomeView() {
)} )}
<> <>
<HomePeekOverviewsRoot /> <HomePeekOverviewsRoot />
<ContentWrapper className={cn("gap-6 bg-custom-background-100 mx-auto scrollbar-hide px-page-x lg:px-0")}> <ContentWrapper className="gap-6 bg-custom-background-100 mx-auto scrollbar-hide px-page-x">
<div className="max-w-[800px] mx-auto w-full"> <div className="max-w-[800px] mx-auto w-full">
{currentUser && <UserGreetingsView user={currentUser} />} {currentUser && <UserGreetingsView user={currentUser} />}
<DashboardWidgets /> <DashboardWidgets />