Skip to content

Commit 05b1c14

Browse files
authored
[WEB-5506] regression: navigation revamp bugs (#8180)
1 parent ae7898a commit 05b1c14

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed

apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/header.tsx

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { observer } from "mobx-react";
22
import { useParams } from "next/navigation";
3-
// hooks
3+
// plane imports
44
import { Header, Row } from "@plane/ui";
5+
// components
56
import { AppHeader } from "@/components/core/app-header";
67
import { TabNavigationRoot } from "@/components/navigation";
78
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
9+
import { useProjectNavigationPreferences } from "@/hooks/use-navigation-preferences";
810
// local components
911
import { WorkItemDetailsHeader } from "./work-item-header";
1012

@@ -18,25 +20,29 @@ export const ProjectWorkItemDetailsHeader = observer(function ProjectWorkItemDet
1820
// derived values
1921
const issueId = getIssueIdByIdentifier(workItem?.toString());
2022
const issueDetails = issueId ? getIssueById(issueId?.toString()) : undefined;
23+
// preferences
24+
const { preferences: projectPreferences } = useProjectNavigationPreferences();
2125

2226
return (
2327
<>
24-
<div className="z-20">
25-
<Row className="h-header flex gap-2 w-full items-center border-b border-custom-border-200 bg-custom-sidebar-background-100">
26-
<div className="flex items-center gap-2 divide-x divide-custom-border-100 h-full w-full">
27-
<div className="flex items-center h-full w-full flex-1">
28-
<Header className="h-full">
29-
<Header.LeftItem className="h-full max-w-full">
30-
<TabNavigationRoot
31-
workspaceSlug={workspaceSlug}
32-
projectId={issueDetails?.project_id?.toString() ?? ""}
33-
/>
34-
</Header.LeftItem>
35-
</Header>
28+
{projectPreferences.navigationMode === "horizontal" && (
29+
<div className="z-20">
30+
<Row className="h-header flex gap-2 w-full items-center border-b border-custom-border-200 bg-custom-sidebar-background-100">
31+
<div className="flex items-center gap-2 divide-x divide-custom-border-100 h-full w-full">
32+
<div className="flex items-center h-full w-full flex-1">
33+
<Header className="h-full">
34+
<Header.LeftItem className="h-full max-w-full">
35+
<TabNavigationRoot
36+
workspaceSlug={workspaceSlug}
37+
projectId={issueDetails?.project_id?.toString() ?? ""}
38+
/>
39+
</Header.LeftItem>
40+
</Header>
41+
</div>
3642
</div>
37-
</div>
38-
</Row>
39-
</div>
43+
</Row>
44+
</div>
45+
)}
4046
<AppHeader header={<WorkItemDetailsHeader />} />
4147
</>
4248
);

apps/web/ce/components/navigations/top-navigation-root.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export const TopNavigationRoot = observer(() => {
1515
return (
1616
<div
1717
className={cn("flex items-center justify-evenly min-h-11 w-full px-3.5 z-[27] transition-all duration-300", {
18-
"px-3.5": showLabel,
1918
"px-2": !showLabel,
2019
})}
2120
>

apps/web/core/components/home/root.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import useSWR from "swr";
44
// plane imports
55
import { PRODUCT_TOUR_TRACKER_EVENTS } from "@plane/constants";
66
import { ContentWrapper } from "@plane/ui";
7-
import { cn } from "@plane/utils";
87
// components
98
import { TourRoot } from "@/components/onboarding/tour";
109
// helpers
@@ -60,7 +59,7 @@ export const WorkspaceHomeView = observer(function WorkspaceHomeView() {
6059
)}
6160
<>
6261
<HomePeekOverviewsRoot />
63-
<ContentWrapper className={cn("gap-6 bg-custom-background-100 mx-auto scrollbar-hide px-page-x lg:px-0")}>
62+
<ContentWrapper className="gap-6 bg-custom-background-100 mx-auto scrollbar-hide px-page-x">
6463
<div className="max-w-[800px] mx-auto w-full">
6564
{currentUser && <UserGreetingsView user={currentUser} />}
6665
<DashboardWidgets />

0 commit comments

Comments
 (0)