refactor: remove Docs from the navbar (#16251)

Close #16247
This commit is contained in:
Bruno Quaresma
2025-01-24 09:25:20 -03:00
committed by GitHub
parent 4872d14e55
commit 0c30a114d1
5 changed files with 0 additions and 26 deletions
@@ -39,7 +39,6 @@ const meta: Meta<typeof MobileMenu> = {
},
user: MockUser,
supportLinks: MockSupportLinks,
docsHref: "https://coder.com/docs",
onSignOut: fn(),
isDefaultOpen: true,
canViewAuditLog: true,
@@ -45,7 +45,6 @@ type MobileMenuProps = MobileMenuPermissions & {
proxyContextValue?: ProxyContextValue;
user?: TypesGen.User;
supportLinks?: readonly TypesGen.LinkConfig[];
docsHref: string;
onSignOut: () => void;
isDefaultOpen?: boolean; // Useful for storybook
};
@@ -55,7 +54,6 @@ export const MobileMenu: FC<MobileMenuProps> = ({
proxyContextValue,
user,
supportLinks,
docsHref,
onSignOut,
...permissions
}) => {
@@ -90,12 +88,6 @@ export const MobileMenu: FC<MobileMenuProps> = ({
</>
)}
<DropdownMenuSeparator />
<DropdownMenuItem asChild className={itemStyles.default}>
<a href={docsHref} target="_blank" rel="noreferrer norefereer">
Docs
</a>
</DropdownMenuItem>
<DropdownMenuSeparator />
<UserSettingsSub
user={user}
supportLinks={supportLinks}
@@ -35,7 +35,6 @@ export const Navbar: FC = () => {
canViewHealth={canViewHealth}
canViewAuditLog={canViewAuditLog}
proxyContextValue={proxyContextValue}
docsHref={appearance.docs_url}
/>
);
};
@@ -25,7 +25,6 @@ describe("NavbarView", () => {
it("workspaces nav link has the correct href", async () => {
renderWithAuth(
<NavbarView
docsHref="https://docs.coder.com"
proxyContextValue={proxyContextValue}
user={MockUser}
onSignOut={noop}
@@ -43,7 +42,6 @@ describe("NavbarView", () => {
it("templates nav link has the correct href", async () => {
renderWithAuth(
<NavbarView
docsHref="https://docs.coder.com"
proxyContextValue={proxyContextValue}
user={MockUser}
onSignOut={noop}
@@ -61,7 +59,6 @@ describe("NavbarView", () => {
it("audit nav link has the correct href", async () => {
renderWithAuth(
<NavbarView
docsHref="https://docs.coder.com"
proxyContextValue={proxyContextValue}
user={MockUser}
onSignOut={noop}
@@ -80,7 +77,6 @@ describe("NavbarView", () => {
it("deployment nav link has the correct href", async () => {
renderWithAuth(
<NavbarView
docsHref="https://docs.coder.com"
proxyContextValue={proxyContextValue}
user={MockUser}
onSignOut={noop}
@@ -13,7 +13,6 @@ import { UserDropdown } from "./UserDropdown/UserDropdown";
export interface NavbarViewProps {
logo_url?: string;
user?: TypesGen.User;
docsHref: string;
buildInfo?: TypesGen.BuildInfoResponse;
supportLinks?: readonly TypesGen.LinkConfig[];
onSignOut: () => void;
@@ -33,7 +32,6 @@ const linkStyles = {
export const NavbarView: FC<NavbarViewProps> = ({
user,
logo_url,
docsHref,
buildInfo,
supportLinks,
onSignOut,
@@ -67,15 +65,6 @@ export const NavbarView: FC<NavbarViewProps> = ({
canViewHealth={canViewHealth}
/>
<a
className={linkStyles.default}
href={docsHref}
target="_blank"
rel="noreferrer"
>
Docs
</a>
{user && (
<UserDropdown
user={user}
@@ -90,7 +79,6 @@ export const NavbarView: FC<NavbarViewProps> = ({
proxyContextValue={proxyContextValue}
user={user}
supportLinks={supportLinks}
docsHref={docsHref}
onSignOut={onSignOut}
canViewAuditLog={canViewAuditLog}
canViewOrganizations={canViewOrganizations}