-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(ui): interface for the experiment flags #1724
Changes from 6 commits
d5dcb31
5372bdf
7b13880
ed39464
14d084e
daaef15
9d20888
ec342b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,30 @@ | ||||||||||
'use client' | ||||||||||
|
||||||||||
import { useEnableCodeBrowserQuickActionBar } from '@/lib/experiment-flags' | ||||||||||
import { Switch } from '@/components/ui/switch' | ||||||||||
|
||||||||||
export default function FeatureList() { | ||||||||||
const [quickActionBar, toggleQuickActionBar] = | ||||||||||
useEnableCodeBrowserQuickActionBar() | ||||||||||
|
||||||||||
return ( | ||||||||||
<> | ||||||||||
{!quickActionBar.loading && ( | ||||||||||
<div className="flex items-center space-x-4 rounded-md border p-4"> | ||||||||||
<div className="flex-1 space-y-1"> | ||||||||||
<p className="text-sm font-medium leading-none">Quick Action Bar</p> | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use {quickActionBar.title} |
||||||||||
<p className="text-sm text-muted-foreground"> | ||||||||||
Enable Quick Action Bar to display a convenient toolbar when you | ||||||||||
select code, offering options to explain the code, add unit tests, | ||||||||||
and more. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated |
||||||||||
</p> | ||||||||||
</div> | ||||||||||
<Switch | ||||||||||
checked={quickActionBar.value} | ||||||||||
onCheckedChange={toggleQuickActionBar} | ||||||||||
/> | ||||||||||
</div> | ||||||||||
)} | ||||||||||
</> | ||||||||||
) | ||||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Metadata } from 'next' | ||
|
||
import FeatureList from './components/feature-list' | ||
|
||
export const metadata: Metadata = { | ||
title: 'Experimental AI' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated |
||
} | ||
|
||
export default function IndexPage() { | ||
return ( | ||
<div className="mx-auto flex max-w-xl flex-col gap-3"> | ||
<h3 className="scroll-m-20 text-2xl font-semibold tracking-tight"> | ||
Experimental AI | ||
</h3> | ||
<FeatureList /> | ||
</div> | ||
) | ||
} |
wsxiaoys marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't display it in side bar, it's developer only page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed