Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactor: update the navbar to match the new designs #15964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix fmt and lint
  • Loading branch information
BrunoQuaresma committed Dec 27, 2024
commit 7e11d46c2d300c03c8aea9ec7de424aa36e814dd
6 changes: 3 additions & 3 deletions site/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

/** Related to https://github.com/radix-ui/primitives/issues/3251 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the comment also be updated to list what components rely on this patch?

html body[data-scroll-locked] {
--removed-body-scroll-bar-size: 0 !important;
margin-right: 0 !important;
}
--removed-body-scroll-bar-size: 0 !important;
margin-right: 0 !important;
}
}
8 changes: 4 additions & 4 deletions site/src/modules/dashboard/Navbar/MobileMenu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { Meta, StoryObj } from "@storybook/react";
import { fn, userEvent, within } from "@storybook/test";
import { PointerEventsCheckLevel } from "@testing-library/user-event";
import type { FC } from "react";
import { chromaticWithTablet } from "testHelpers/chromatic";
import { MobileMenu } from "./MobileMenu";
import {
MockPrimaryWorkspaceProxy,
MockProxyLatencies,
Expand All @@ -9,9 +11,7 @@ import {
MockUser2,
MockWorkspaceProxies,
} from "testHelpers/entities";
import { fn, userEvent, within } from "@storybook/test";
import { PointerEventsCheckLevel } from "@testing-library/user-event";
import type { FC } from "react";
import { MobileMenu } from "./MobileMenu";

const meta: Meta<typeof MobileMenu> = {
title: "modules/dashboard/MobileMenu",
Expand Down
32 changes: 16 additions & 16 deletions site/src/modules/dashboard/Navbar/MobileMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import type * as TypesGen from "api/typesGenerated";
import type { ProxyContextValue } from "contexts/ProxyContext";
import { useState, type FC } from "react";
import { Link } from "react-router-dom";
import { cn } from "utils/cn";
import { Avatar } from "components/Avatar/Avatar";
import { Button } from "components/Button/Button";
import {
ChevronRightIcon,
CircleHelpIcon,
MenuIcon,
XIcon,
} from "lucide-react";
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from "components/Collapsible/Collapsible";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "components/DropdownMenu/DropdownMenu";
import { Avatar } from "components/Avatar/Avatar";
import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";
import { displayError } from "components/GlobalSnackbar/utils";
import { Latency } from "components/Latency/Latency";
import type { ProxyContextValue } from "contexts/ProxyContext";
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from "components/Collapsible/Collapsible";
ChevronRightIcon,
CircleHelpIcon,
MenuIcon,
XIcon,
} from "lucide-react";
import { type FC, useState } from "react";
import { Link } from "react-router-dom";
import { cn } from "utils/cn";
import { sortProxiesByLatency } from "./proxyUtils";
import { displayError } from "components/GlobalSnackbar/utils";
import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";

const itemStyles = {
default: "px-9 h-10 no-underline",
Expand Down
4 changes: 0 additions & 4 deletions site/src/modules/dashboard/Navbar/NavbarView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ describe("NavbarView", () => {
onSignOut={noop}
canViewDeployment
canViewOrganizations
canViewAllUsers
canViewHealth
canViewAuditLog
/>,
Expand All @@ -49,7 +48,6 @@ describe("NavbarView", () => {
onSignOut={noop}
canViewDeployment
canViewOrganizations
canViewAllUsers
canViewHealth
canViewAuditLog
/>,
Expand All @@ -67,7 +65,6 @@ describe("NavbarView", () => {
onSignOut={noop}
canViewDeployment
canViewOrganizations
canViewAllUsers
canViewHealth
canViewAuditLog
/>,
Expand All @@ -87,7 +84,6 @@ describe("NavbarView", () => {
onSignOut={noop}
canViewDeployment
canViewOrganizations
canViewAllUsers
canViewHealth
canViewAuditLog
/>,
Expand Down
4 changes: 2 additions & 2 deletions site/src/modules/dashboard/Navbar/NavbarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { CoderIcon } from "components/Icons/CoderIcon";
import type { ProxyContextValue } from "contexts/ProxyContext";
import type { FC } from "react";
import { NavLink, useLocation } from "react-router-dom";
import { cn } from "utils/cn";
import { DeploymentDropdown } from "./DeploymentDropdown";
import { MobileMenu } from "./MobileMenu";
import { ProxyMenu } from "./ProxyMenu";
import { UserDropdown } from "./UserDropdown/UserDropdown";
import { cn } from "utils/cn";
import { MobileMenu } from "./MobileMenu";

export interface NavbarViewProps {
logo_url?: string;
Expand Down
Loading