Skip to content

Commit

Permalink
fix(nx-dev): mobile menu, adding ai chat and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
juristr committed Oct 26, 2023
1 parent f9fc3dd commit a080960
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
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

0 comments on commit a080960

Please sign in to comment.