mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-02-02 23:33:35 +00:00
feat: move feature action buttons to pending column header
Move the "Add Feature" (+) and "Expand Project" (sparkles) buttons from the top navigation bar to the Pending column header in the Kanban board. Changes: - KanbanColumn: Add optional onAddFeature, onExpandProject, and showExpandButton props; render action buttons in column header - KanbanBoard: Accept and pass action handlers to the Pending column - App: Remove buttons from header, pass handlers to KanbanBoard This improves UX by placing feature creation actions contextually near the pending features they affect. Keyboard shortcuts (N, E) still work. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { FeatureCard } from './FeatureCard'
|
||||
import { Plus, Sparkles } from 'lucide-react'
|
||||
import type { Feature } from '../lib/types'
|
||||
|
||||
interface KanbanColumnProps {
|
||||
@@ -7,6 +8,9 @@ interface KanbanColumnProps {
|
||||
features: Feature[]
|
||||
color: 'pending' | 'progress' | 'done'
|
||||
onFeatureClick: (feature: Feature) => void
|
||||
onAddFeature?: () => void
|
||||
onExpandProject?: () => void
|
||||
showExpandButton?: boolean
|
||||
}
|
||||
|
||||
const colorMap = {
|
||||
@@ -21,6 +25,9 @@ export function KanbanColumn({
|
||||
features,
|
||||
color,
|
||||
onFeatureClick,
|
||||
onAddFeature,
|
||||
onExpandProject,
|
||||
showExpandButton,
|
||||
}: KanbanColumnProps) {
|
||||
return (
|
||||
<div
|
||||
@@ -32,10 +39,34 @@ export function KanbanColumn({
|
||||
className="px-4 py-3 border-b-3 border-[var(--color-neo-border)]"
|
||||
style={{ backgroundColor: colorMap[color] }}
|
||||
>
|
||||
<h2 className="font-display text-lg font-bold uppercase flex items-center justify-between text-[var(--color-neo-text)]">
|
||||
{title}
|
||||
<span className="neo-badge bg-white text-[var(--color-neo-text)]">{count}</span>
|
||||
</h2>
|
||||
<div className="flex items-center justify-between">
|
||||
<h2 className="font-display text-lg font-bold uppercase flex items-center gap-2 text-[var(--color-neo-text)]">
|
||||
{title}
|
||||
<span className="neo-badge bg-white text-[var(--color-neo-text)]">{count}</span>
|
||||
</h2>
|
||||
{(onAddFeature || onExpandProject) && (
|
||||
<div className="flex items-center gap-2">
|
||||
{onAddFeature && (
|
||||
<button
|
||||
onClick={onAddFeature}
|
||||
className="neo-btn neo-btn-primary text-sm py-1.5 px-2"
|
||||
title="Add new feature (N)"
|
||||
>
|
||||
<Plus size={16} />
|
||||
</button>
|
||||
)}
|
||||
{onExpandProject && showExpandButton && (
|
||||
<button
|
||||
onClick={onExpandProject}
|
||||
className="neo-btn bg-[var(--color-neo-progress)] text-black text-sm py-1.5 px-2"
|
||||
title="Expand project with AI (E)"
|
||||
>
|
||||
<Sparkles size={16} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Cards */}
|
||||
|
||||
Reference in New Issue
Block a user