Skip to content
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

fix(nx-dev): mobile menu, adding ai chat and changelog #19887

Merged
merged 1 commit into from
Oct 26, 2023
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
7 changes: 6 additions & 1 deletion nx-dev/nx-dev/pages/ai-chat/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { FeedContainer } from '@nx/nx-dev/feature-ai';
import { DocumentationHeader } from '@nx/nx-dev/ui-common';
import { DocumentationHeader, SidebarContainer } from '@nx/nx-dev/ui-common';
import { NextSeo } from 'next-seo';
import { useNavToggle } from '../../lib/navigation-toggle.effect';
import { cx } from '@nx/nx-dev/ui-primitives';

export default function AiDocs(): JSX.Element {
const { toggleNav, navIsOpen } = useNavToggle();

return (
<>
<NextSeo
Expand Down Expand Up @@ -38,6 +39,10 @@ export default function AiDocs(): JSX.Element {
role="main"
className="flex h-full flex-1 overflow-y-hidden"
>
<div className="hidden">
<SidebarContainer menu={{ sections: [] }} navIsOpen={navIsOpen} />
</div>

<FeedContainer />
</main>
</div>
Expand Down
21 changes: 17 additions & 4 deletions nx-dev/ui-common/src/lib/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ export function SidebarMobile({
const isNxCloud: boolean = router.asPath.startsWith('/nx-cloud');
const isAPI: boolean = router.asPath.startsWith('/nx-api');
const isPlugins: boolean = router.asPath.startsWith('/extending-nx');
const isNx: boolean = !isNxCloud && !isAPI && !isPlugins;
const isChangelog: boolean = router.asPath.startsWith('/changelog');
const isAiChat: boolean = router.asPath.startsWith('/ai-chat');
const isNx: boolean =
!isNxCloud && !isAPI && !isPlugins && !isChangelog && !isAiChat;

const sections = [
{ name: 'Home', href: '/', current: false },
Expand All @@ -190,15 +193,25 @@ export function SidebarMobile({
href: '/nx-cloud/intro/ci-with-nx',
current: isNxCloud,
},
{
name: 'Extending Nx',
href: '/extending-nx/intro/getting-started',
current: isPlugins,
},
{
name: 'API',
href: '/nx-api',
current: isAPI,
},
{
name: 'Extending Nx',
href: '/extending-nx/intro/getting-started',
current: isPlugins,
name: 'Changelog',
href: '/changelog',
current: isChangelog,
},
{
name: 'AI Chat (beta)',
href: '/ai-chat',
current: isAiChat,
},
];
return (
Expand Down