diff --git a/src/pages/Features.tsx b/src/pages/Features.tsx new file mode 100644 index 0000000..19280e6 --- /dev/null +++ b/src/pages/Features.tsx @@ -0,0 +1,210 @@ +import { useState } from "react"; +import { Card, CardContent } from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { Button } from "@/components/ui/button"; +import { Avatar, AvatarFallback } from "@/components/ui/avatar"; +import { Input } from "@/components/ui/input"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; +import { + Plus, Search, ArrowUpDown, ThumbsUp, Calendar, Filter, LayoutList, LayoutGrid +} from "lucide-react"; +import { toast } from "sonner"; +import Sidebar from "@/components/Sidebar"; +import Header from "@/components/Header"; + +interface Feature { + id: number; + title: string; + status: string; + statusColor: string; + priority: string; + priorityColor: string; + votes: number; + assignee: string; + assigneeInitials: string; + assigneeColor: string; + targetDate: string; + category: string; +} + +const features: Feature[] = [ + { id: 1, title: "Visual Roadmap Board", status: "In Progress", statusColor: "bg-blue-100 text-blue-700", priority: "P0", priorityColor: "bg-red-100 text-red-700", votes: 48, assignee: "Sarah Kim", assigneeInitials: "SK", assigneeColor: "bg-blue-500", targetDate: "May 15, 2026", category: "Core" }, + { id: 2, title: "Slack Integration", status: "In Progress", statusColor: "bg-blue-100 text-blue-700", priority: "P0", priorityColor: "bg-red-100 text-red-700", votes: 36, assignee: "Alex Lee", assigneeInitials: "AL", assigneeColor: "bg-sky-500", targetDate: "May 20, 2026", category: "Integrations" }, + { id: 3, title: "Feedback Analytics", status: "Planned", statusColor: "bg-slate-100 text-slate-700", priority: "P1", priorityColor: "bg-orange-100 text-orange-700", votes: 52, assignee: "Nina Kumar", assigneeInitials: "NK", assigneeColor: "bg-emerald-500", targetDate: "Jun 1, 2026", category: "Analytics" }, + { id: 4, title: "Priority Scoring Engine", status: "In Review", statusColor: "bg-amber-100 text-amber-700", priority: "P1", priorityColor: "bg-orange-100 text-orange-700", votes: 29, assignee: "Raj Joshi", assigneeInitials: "RJ", assigneeColor: "bg-indigo-500", targetDate: "May 25, 2026", category: "Core" }, + { id: 5, title: "Public Changelog", status: "Planned", statusColor: "bg-slate-100 text-slate-700", priority: "P1", priorityColor: "bg-orange-100 text-orange-700", votes: 31, assignee: "Sarah Kim", assigneeInitials: "SK", assigneeColor: "bg-blue-500", targetDate: "Jun 10, 2026", category: "Communication" }, + { id: 6, title: "API Access", status: "Planned", statusColor: "bg-slate-100 text-slate-700", priority: "P2", priorityColor: "bg-slate-100 text-slate-600", votes: 22, assignee: "Alex Lee", assigneeInitials: "AL", assigneeColor: "bg-sky-500", targetDate: "Jun 20, 2026", category: "Platform" }, + { id: 7, title: "Mobile App", status: "Exploring", statusColor: "bg-purple-100 text-purple-700", priority: "P2", priorityColor: "bg-slate-100 text-slate-600", votes: 41, assignee: "Nina Kumar", assigneeInitials: "NK", assigneeColor: "bg-emerald-500", targetDate: "Q3 2026", category: "Platform" }, + { id: 8, title: "AI Roadmap Generator", status: "Exploring", statusColor: "bg-purple-100 text-purple-700", priority: "P2", priorityColor: "bg-slate-100 text-slate-600", votes: 33, assignee: "Sarah Kim", assigneeInitials: "SK", assigneeColor: "bg-blue-500", targetDate: "Q3 2026", category: "AI" }, + { id: 9, title: "Custom Dashboards", status: "Shipped", statusColor: "bg-emerald-100 text-emerald-700", priority: "P0", priorityColor: "bg-red-100 text-red-700", votes: 64, assignee: "Raj Joshi", assigneeInitials: "RJ", assigneeColor: "bg-indigo-500", targetDate: "Apr 30, 2026", category: "Core" }, + { id: 10, title: "Team Permissions", status: "Shipped", statusColor: "bg-emerald-100 text-emerald-700", priority: "P1", priorityColor: "bg-orange-100 text-orange-700", votes: 27, assignee: "Alex Lee", assigneeInitials: "AL", assigneeColor: "bg-sky-500", targetDate: "Apr 20, 2026", category: "Platform" }, +]; + +export default function FeaturesPage() { + const [statusFilter, setStatusFilter] = useState("all"); + const [priorityFilter, setPriorityFilter] = useState("all"); + const [assigneeFilter, setAssigneeFilter] = useState("all"); + const [searchQuery, setSearchQuery] = useState(""); + const [sortAsc, setSortAsc] = useState(false); + + const filtered = features + .filter(f => { + if (statusFilter !== "all" && f.status !== statusFilter) return false; + if (priorityFilter !== "all" && f.priority !== priorityFilter) return false; + if (assigneeFilter !== "all" && f.assigneeInitials !== assigneeFilter) return false; + if (searchQuery && !f.title.toLowerCase().includes(searchQuery.toLowerCase())) return false; + return true; + }) + .sort((a, b) => sortAsc ? a.votes - b.votes : b.votes - a.votes); + + return ( +
+ +
+
+
+ {/* ── Page Header ── */} +
+
+

Features

+

{features.length} features across all stages

+
+ +
+ + {/* ── Filter Bar ── */} + + +
+
+ + setSearchQuery(e.target.value)} + className="pl-10 bg-slate-50 border-slate-200 h-9" + /> +
+ + + + +
+
+
+ + {/* ── Feature Table ── */} + +
+ + + + + + + + + + + + + {filtered.map((feature) => ( + + + + + + + + + ))} + +
FeatureStatusPriorityVotesAssigneeTarget
+
+
+ +
+
+

{feature.title}

+

{feature.category}

+
+
+
+ {feature.status} + + {feature.priority} + +
+ + {feature.votes} +
+
+
+ + {feature.assigneeInitials} + + {feature.assignee} +
+
+ + + {feature.targetDate} + +
+
+ {filtered.length === 0 && ( +
+ +

No features match your filters

+

Try adjusting your search or filter criteria

+
+ )} +
+
+
+
+ ); +}