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

refactor: Design tweaks canvas actions and templates based on uplift feedback #4418

Merged
merged 10 commits into from
Nov 6, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ const CanvasControls = ({ children }) => {
tooltipText={isInteractive ? "Lock" : "Unlock"}
onClick={onToggleInteractivity}
backgroundClasses={isInteractive ? "" : "bg-destructive"}
iconClasses={isInteractive ? "" : "text-primary-foreground"}
iconClasses={
isInteractive ? "" : "text-primary-foreground dark:text-primary"
}
testId="lock_unlock"
/>
{children}
Expand Down
6 changes: 3 additions & 3 deletions src/frontend/src/components/flowToolbarComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ export default function FlowToolbar(): JSX.Element {
<button
disabled={!hasApiKey || !validApiKey || !hasStore}
className={classNames(
"relative inline-flex h-8 w-full items-center justify-center gap-1.5 rounded px-3 py-1.5 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-accent",
"relative inline-flex h-8 w-full items-center justify-center gap-1.5 rounded px-3 py-1.5 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out",
!hasApiKey || !validApiKey || !hasStore
? "text-muted-foreground"
: "",
? "cursor-not-allowed text-muted-foreground"
: "hover:bg-accent",
)}
data-testid="shared-button-flow"
onClick={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ export default function GetStartedComponent() {
// Define the card data
const cardData: CardData[] = [
{
bg: "linear-gradient(145deg, #7CC0FF 0%, #96B9FF 50%, #CAA5FF 100%)",
bg: "radial-gradient(ellipse at top left, #A3E8EF, #ADF6FD, #9676fd)",
spiralImage: memoryChatbotSpiral,
icon: "MessagesSquare",
category: "Chatbot",
category: "Prompting",
flow: examples.find((example) => example.name === "Memory Chatbot"),
},
{
bg: "linear-gradient(145deg, #388295 0%, #52B0C4 50%, #7CAB64 100%)",
bg: "radial-gradient(ellipse at top right, #f599fe, #de8afa, #9a5af7)",
spiralImage: vectorRagSpiral,
icon: "Database",
category: "Vector RAG",
category: "RAG",
flow: examples.find((example) => example.name === "Vector Store RAG"),
},
{
bg: "linear-gradient(145deg, #DB52C2 0%, #DC4F88 50%, #FFA395 100%)",
bg: "radial-gradient(ellipse at top left, #ed93f5, #e0bae9, #a5f0af)",
spiralImage: multiAgentSpiral,
icon: "Bot",
category: "Agents",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function Nav({ categories, currentTab, setCurrentTab }: NavProps) {
const isMobile = useIsMobile();

return (
<Sidebar collapsible={isMobile ? "icon" : "none"}>
<Sidebar collapsible={isMobile ? "icon" : "none"} className="max-w-[230px]">
<SidebarContent className="gap-0 p-2">
<div
className={cn("relative flex items-center gap-2 px-2 py-3 md:px-4")}
Expand All @@ -33,11 +33,11 @@ export function Nav({ categories, currentTab, setCurrentTab }: NavProps) {
/>
<div
className={cn(
"flex h-8 shrink-0 items-center rounded-md text-lg font-semibold leading-none tracking-tight text-primary outline-none ring-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-1 [&>svg]:size-4 [&>svg]:shrink-0",
"text-base-semibold flex h-8 shrink-0 items-center rounded-md leading-none tracking-tight text-primary outline-none ring-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-1 [&>svg]:size-4 [&>svg]:shrink-0",
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
)}
>
Categories
Templates
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/modals/templatesModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export default function TemplatesModal({
],
},
{
title: "Usecase",
title: "Methodology",
items: [
{ title: "Chatbots", icon: "MessagesSquare", id: "chatbots" },
{ title: "Prompting", icon: "MessagesSquare", id: "chatbots" },
{ title: "RAG", icon: "Database", id: "rag" },
{ title: "Agents", icon: "Bot", id: "agents" },
],
Expand Down
Loading