Skip to content

Commit

Permalink
feat(nx-dev): add link to AI Chat beta in docs header (#19261)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo authored Sep 26, 2023
1 parent 5cc87bf commit ae38219
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
4 changes: 2 additions & 2 deletions nx-dev/feature-ai/src/lib/feed/feed-answer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export function FeedAnswer({
<div>
<div className="text-lg flex gap-2 items-center text-slate-900 dark:text-slate-100">
Nx Assistant{' '}
<span className="rounded-md bg-red-50 dark:bg-red-900/30 px-1.5 py-0.5 text-xs font-medium text-red-600 dark:text-red-400">
alpha
<span className="rounded-md bg-yellow-50 dark:bg-yellow-900/30 px-1.5 py-0.5 text-xs font-medium text-yellow-600 dark:text-yellow-400">
beta
</span>
</div>
<p className="mt-0.5 flex items-center gap-x-1 text-sm text-slate-500">
Expand Down
2 changes: 1 addition & 1 deletion nx-dev/nx-dev/pages/ai-chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function AiDocs(): JSX.Element {
return (
<>
<NextSeo
title="Nx AI Chat (Alpha)"
title="Nx AI Chat (Beta)"
description="AI chat powered by Nx docs."
noindex={true}
robotsProps={{
Expand Down
24 changes: 22 additions & 2 deletions nx-dev/ui-common/src/lib/documentation-header.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { type JSX } from 'react';
import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline';
import { AlgoliaSearch } from '@nx/nx-dev/feature-search';
import { ThemeSwitcher } from '@nx/nx-dev/ui-theme';
Expand All @@ -22,7 +23,7 @@ function Menu({ tabs }: { tabs: any[] }): JSX.Element {
)}
aria-current={tab.current ? 'page' : undefined}
>
{tab.name}
{tab.content ?? tab.name}
</Link>
))}
</nav>
Expand All @@ -44,8 +45,14 @@ export function DocumentationHeader({
const isExtendingNx: boolean = routerPath.startsWith('/extending-nx');
const isPlugins: boolean = routerPath.startsWith('/plugin-registry');
const isChangelog: boolean = routerPath.startsWith('/changelog');
const isAiChat: boolean = router.asPath.startsWith('/ai-chat');
const isNx: boolean =
!isNxCloud && !isAPI && !isExtendingNx && !isPlugins && !isChangelog;
!isNxCloud &&
!isAPI &&
!isExtendingNx &&
!isPlugins &&
!isChangelog &&
!isAiChat;

const sections = [
{ name: 'Nx', href: '/getting-started/intro', current: isNx },
Expand Down Expand Up @@ -74,6 +81,19 @@ export function DocumentationHeader({
href: '/changelog',
current: isChangelog,
},
{
name: 'AI Chat',
href: '/ai-chat',
current: isAiChat,
content: (
<>
<span>AI Chat</span>
<span className="ml-1 rounded-md bg-yellow-50 dark:bg-yellow-900/30 px-1.5 py-0.5 text-xs font-medium text-yellow-600 dark:text-yellow-400">
beta
</span>
</>
),
},
];

const communityLinks = [
Expand Down

1 comment on commit ae38219

@vercel
Copy link

@vercel vercel bot commented on ae38219 Sep 26, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.