Skip to content

refactor: remove Docs from the navbar #16251

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 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion site/src/modules/dashboard/Navbar/MobileMenu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const meta: Meta<typeof MobileMenu> = {
},
user: MockUser,
supportLinks: MockSupportLinks,
docsHref: "https://coder.com/docs",
onSignOut: fn(),
isDefaultOpen: true,
canViewAuditLog: true,
Expand Down
8 changes: 0 additions & 8 deletions site/src/modules/dashboard/Navbar/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand All @@ -55,7 +54,6 @@ export const MobileMenu: FC<MobileMenuProps> = ({
proxyContextValue,
user,
supportLinks,
docsHref,
onSignOut,
...permissions
}) => {
Expand Down Expand Up @@ -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}
Expand Down
1 change: 0 additions & 1 deletion site/src/modules/dashboard/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const Navbar: FC = () => {
canViewHealth={canViewHealth}
canViewAuditLog={canViewAuditLog}
proxyContextValue={proxyContextValue}
docsHref={appearance.docs_url}
/>
);
};
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 @@ -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}
Expand All @@ -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}
Expand All @@ -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}
Expand All @@ -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}
Expand Down
12 changes: 0 additions & 12 deletions site/src/modules/dashboard/Navbar/NavbarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -33,7 +32,6 @@ const linkStyles = {
export const NavbarView: FC<NavbarViewProps> = ({
user,
logo_url,
docsHref,
buildInfo,
supportLinks,
onSignOut,
Expand Down Expand Up @@ -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}
Expand All @@ -90,7 +79,6 @@ export const NavbarView: FC<NavbarViewProps> = ({
proxyContextValue={proxyContextValue}
user={user}
supportLinks={supportLinks}
docsHref={docsHref}
onSignOut={onSignOut}
canViewAuditLog={canViewAuditLog}
canViewOrganizations={canViewOrganizations}
Expand Down
Loading