Skip to content

Commit eb0f176

Browse files
Copilothotlong
andcommitted
feat: sidebar active indicator bar, group label separators, tooltip support, config panel separators and CSS variable width, tab bar improvements
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 36d8e61 commit eb0f176

4 files changed

Lines changed: 15 additions & 8 deletions

File tree

packages/components/src/custom/config-panel-renderer.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { X, Save, RotateCcw, ChevronRight } from 'lucide-react';
1212

1313
import { cn } from '../lib/utils';
1414
import { Button } from '../ui/button';
15+
import { Separator } from '../ui/separator';
1516
import { SectionHeader } from './section-header';
1617
import { ConfigFieldRenderer } from './config-field-renderer';
1718
import type { ConfigPanelSchema } from '../types/config-panel';
@@ -128,7 +129,7 @@ export function ConfigPanelRenderer({
128129
aria-label={ariaLabel}
129130
tabIndex={tabIndex}
130131
className={cn(
131-
'absolute inset-y-0 right-0 w-full sm:w-72 lg:w-80 sm:relative border-l bg-background flex flex-col shrink-0 z-20',
132+
'absolute inset-y-0 right-0 w-full sm:w-[var(--config-panel-width,280px)] sm:relative border-l bg-background flex flex-col shrink-0 z-20',
132133
className,
133134
)}
134135
>
@@ -167,13 +168,14 @@ export function ConfigPanelRenderer({
167168

168169
{/* ── Scrollable sections ────────────────────────────── */}
169170
<div className="flex-1 overflow-auto px-4 pb-4">
170-
{schema.sections.map((section) => {
171+
{schema.sections.map((section, sectionIdx) => {
171172
if (section.visibleWhen && !section.visibleWhen(draft)) return null;
172173

173174
const sectionCollapsed = isCollapsed(section.key, section.defaultCollapsed);
174175

175176
return (
176177
<div key={section.key} data-testid={`config-section-${section.key}`}>
178+
{sectionIdx > 0 && <Separator className="my-1" />}
177179
<SectionHeader
178180
title={section.title}
179181
collapsible={section.collapsible}

packages/components/src/ui/sidebar.tsx

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/layout/src/SidebarNav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function SidebarNav({ items, title = "Application", className, collapsibl
3636
<SidebarMenu>
3737
{items.map((item) => (
3838
<SidebarMenuItem key={item.href}>
39-
<SidebarMenuButton asChild isActive={location.pathname === item.href}>
39+
<SidebarMenuButton asChild isActive={location.pathname === item.href} tooltip={item.title}>
4040
<NavLink to={item.href}>
4141
{item.icon && <item.icon />}
4242
<span>{item.title}</span>

packages/plugin-list/src/components/TabBar.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const TabBar: React.FC<TabBarProps> = ({
8787

8888
return (
8989
<div
90-
className={cn('border-b px-2 sm:px-4 py-1 flex items-center gap-1 bg-background', className)}
90+
className={cn('border-b px-2 sm:px-4 py-1 flex items-center gap-0.5 bg-background', className)}
9191
data-testid="view-tabs"
9292
role="tablist"
9393
>
@@ -97,9 +97,14 @@ export const TabBar: React.FC<TabBarProps> = ({
9797
return (
9898
<Button
9999
key={tab.name}
100-
variant={isActive ? 'default' : 'ghost'}
100+
variant="ghost"
101101
size="sm"
102-
className="h-7 px-3 text-xs"
102+
className={cn(
103+
"h-7 px-3 py-1.5 text-xs rounded-none",
104+
isActive
105+
? "border-b-2 border-primary font-medium text-foreground"
106+
: "text-muted-foreground hover:text-foreground"
107+
)}
103108
data-testid={`view-tab-${tab.name}`}
104109
role="tab"
105110
aria-selected={isActive}

0 commit comments

Comments
 (0)