mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-02-05 08:23:08 +00:00
refactor(ui): migrate to shadcn/ui components and fix scroll issues
Migrate UI component library from custom implementations to shadcn/ui: - Add shadcn/ui primitives (Button, Card, Dialog, Input, etc.) - Replace custom styles with Tailwind CSS v4 theme configuration - Remove custom-theme.css in favor of globals.css with @theme directive Fix scroll overflow issues in multiple components: - ProjectSelector: "New Project" button no longer overlays project list - FolderBrowser: folder list now scrolls properly within modal - AgentCard: log modal content stays within bounds - ConversationHistory: conversation list scrolls correctly - KanbanColumn: feature cards scroll within fixed height - ScheduleModal: schedule form content scrolls properly Key technical changes: - Replace ScrollArea component with native overflow-y-auto divs - Add min-h-0 to flex containers to allow proper shrinking - Restructure dropdown layouts with flex-col for fixed footers New files: - ui/components.json (shadcn/ui configuration) - ui/src/components/ui/* (20 UI primitive components) - ui/src/lib/utils.ts (cn utility for class merging) - ui/tsconfig.app.json (app-specific TypeScript config) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,436 +0,0 @@
|
||||
/*
|
||||
* Clean Twitter-Style Theme
|
||||
* =========================
|
||||
* Based on user's exact design system values
|
||||
*/
|
||||
|
||||
:root {
|
||||
/* Core colors */
|
||||
--color-neo-bg: oklch(1.0000 0 0);
|
||||
--color-neo-card: oklch(0.9784 0.0011 197.1387);
|
||||
--color-neo-text: oklch(0.1884 0.0128 248.5103);
|
||||
--color-neo-text-secondary: oklch(0.1884 0.0128 248.5103);
|
||||
--color-neo-text-muted: oklch(0.5637 0.0078 247.9662);
|
||||
--color-neo-text-on-bright: oklch(1.0000 0 0);
|
||||
|
||||
/* Primary accent - Twitter blue */
|
||||
--color-neo-accent: oklch(0.6723 0.1606 244.9955);
|
||||
|
||||
/* Status colors - all use accent blue except danger */
|
||||
--color-neo-pending: oklch(0.6723 0.1606 244.9955);
|
||||
--color-neo-progress: oklch(0.6723 0.1606 244.9955);
|
||||
--color-neo-done: oklch(0.6723 0.1606 244.9955);
|
||||
--color-neo-danger: oklch(0.6188 0.2376 25.7658);
|
||||
|
||||
/* Borders and neutrals */
|
||||
--color-neo-border: oklch(0.9317 0.0118 231.6594);
|
||||
--color-neo-neutral-50: oklch(0.9809 0.0025 228.7836);
|
||||
--color-neo-neutral-100: oklch(0.9392 0.0166 250.8453);
|
||||
--color-neo-neutral-200: oklch(0.9222 0.0013 286.3737);
|
||||
--color-neo-neutral-300: oklch(0.9317 0.0118 231.6594);
|
||||
|
||||
/* No shadows */
|
||||
--shadow-neo-sm: none;
|
||||
--shadow-neo-md: none;
|
||||
--shadow-neo-lg: none;
|
||||
--shadow-neo-xl: none;
|
||||
--shadow-neo-left: none;
|
||||
--shadow-neo-inset: none;
|
||||
|
||||
/* Typography */
|
||||
--font-neo-sans: Open Sans, sans-serif;
|
||||
--font-neo-mono: Menlo, monospace;
|
||||
|
||||
/* Radius - 1.3rem base */
|
||||
--radius-neo-sm: calc(1.3rem - 4px);
|
||||
--radius-neo-md: calc(1.3rem - 2px);
|
||||
--radius-neo-lg: 1.3rem;
|
||||
--radius-neo-xl: calc(1.3rem + 4px);
|
||||
}
|
||||
|
||||
.dark {
|
||||
/* Core colors - dark mode (Twitter dark style) */
|
||||
--color-neo-bg: oklch(0.08 0 0);
|
||||
--color-neo-card: oklch(0.16 0.005 250);
|
||||
--color-neo-text: oklch(0.95 0 0);
|
||||
--color-neo-text-secondary: oklch(0.75 0 0);
|
||||
--color-neo-text-muted: oklch(0.55 0 0);
|
||||
--color-neo-text-on-bright: oklch(1.0 0 0);
|
||||
|
||||
/* Primary accent */
|
||||
--color-neo-accent: oklch(0.6692 0.1607 245.0110);
|
||||
|
||||
/* Status colors - all use accent blue except danger */
|
||||
--color-neo-pending: oklch(0.6692 0.1607 245.0110);
|
||||
--color-neo-progress: oklch(0.6692 0.1607 245.0110);
|
||||
--color-neo-done: oklch(0.6692 0.1607 245.0110);
|
||||
--color-neo-danger: oklch(0.6188 0.2376 25.7658);
|
||||
|
||||
/* Borders and neutrals - better contrast */
|
||||
--color-neo-border: oklch(0.30 0 0);
|
||||
--color-neo-neutral-50: oklch(0.20 0 0);
|
||||
--color-neo-neutral-100: oklch(0.25 0.01 250);
|
||||
--color-neo-neutral-200: oklch(0.22 0 0);
|
||||
--color-neo-neutral-300: oklch(0.30 0 0);
|
||||
|
||||
/* No shadows */
|
||||
--shadow-neo-sm: none;
|
||||
--shadow-neo-md: none;
|
||||
--shadow-neo-lg: none;
|
||||
--shadow-neo-xl: none;
|
||||
--shadow-neo-left: none;
|
||||
--shadow-neo-inset: none;
|
||||
}
|
||||
|
||||
/* ===== GLOBAL OVERRIDES ===== */
|
||||
|
||||
* {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* ===== CARDS ===== */
|
||||
.neo-card,
|
||||
[class*="neo-card"] {
|
||||
border: 1px solid var(--color-neo-border) !important;
|
||||
box-shadow: none !important;
|
||||
transform: none !important;
|
||||
border-radius: var(--radius-neo-lg) !important;
|
||||
background-color: var(--color-neo-card) !important;
|
||||
}
|
||||
|
||||
.neo-card:hover,
|
||||
[class*="neo-card"]:hover {
|
||||
transform: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* ===== BUTTONS ===== */
|
||||
.neo-btn,
|
||||
[class*="neo-btn"],
|
||||
button {
|
||||
border-width: 1px !important;
|
||||
box-shadow: none !important;
|
||||
text-transform: none !important;
|
||||
font-weight: 500 !important;
|
||||
transform: none !important;
|
||||
border-radius: var(--radius-neo-lg) !important;
|
||||
font-family: var(--font-neo-sans) !important;
|
||||
}
|
||||
|
||||
.neo-btn:hover,
|
||||
[class*="neo-btn"]:hover,
|
||||
button:hover {
|
||||
transform: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.neo-btn:active,
|
||||
[class*="neo-btn"]:active {
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
/* Primary button */
|
||||
.neo-btn-primary {
|
||||
background-color: var(--color-neo-accent) !important;
|
||||
border-color: var(--color-neo-accent) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
/* Success button - use accent blue instead of green */
|
||||
.neo-btn-success {
|
||||
background-color: var(--color-neo-accent) !important;
|
||||
border-color: var(--color-neo-accent) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
/* Danger button - subtle red */
|
||||
.neo-btn-danger {
|
||||
background-color: var(--color-neo-danger) !important;
|
||||
border-color: var(--color-neo-danger) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
/* ===== INPUTS ===== */
|
||||
.neo-input,
|
||||
.neo-textarea,
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
border: 1px solid var(--color-neo-border) !important;
|
||||
box-shadow: none !important;
|
||||
border-radius: var(--radius-neo-md) !important;
|
||||
background-color: var(--color-neo-neutral-50) !important;
|
||||
}
|
||||
|
||||
.neo-input:focus,
|
||||
.neo-textarea:focus,
|
||||
input:focus,
|
||||
textarea:focus,
|
||||
select:focus {
|
||||
box-shadow: none !important;
|
||||
border-color: var(--color-neo-accent) !important;
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
/* ===== KEYBOARD ACCESSIBILITY ===== */
|
||||
/* Focus-visible styles for keyboard navigation */
|
||||
.neo-btn:focus-visible,
|
||||
[class*="neo-btn"]:focus-visible,
|
||||
button:focus-visible {
|
||||
outline: 2px solid var(--color-neo-accent) !important;
|
||||
outline-offset: 2px !important;
|
||||
}
|
||||
|
||||
.neo-input:focus-visible,
|
||||
.neo-textarea:focus-visible,
|
||||
input:focus-visible,
|
||||
textarea:focus-visible,
|
||||
select:focus-visible {
|
||||
outline: 2px solid var(--color-neo-accent) !important;
|
||||
outline-offset: 2px !important;
|
||||
border-color: var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
a:focus-visible,
|
||||
[role="button"]:focus-visible,
|
||||
[tabindex]:focus-visible {
|
||||
outline: 2px solid var(--color-neo-accent) !important;
|
||||
outline-offset: 2px !important;
|
||||
}
|
||||
|
||||
/* ===== BADGES ===== */
|
||||
.neo-badge,
|
||||
[class*="neo-badge"] {
|
||||
border: 1px solid var(--color-neo-border) !important;
|
||||
box-shadow: none !important;
|
||||
border-radius: var(--radius-neo-lg) !important;
|
||||
font-weight: 500 !important;
|
||||
text-transform: none !important;
|
||||
}
|
||||
|
||||
/* ===== PROGRESS BAR ===== */
|
||||
.neo-progress {
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
border-radius: var(--radius-neo-lg) !important;
|
||||
background-color: var(--color-neo-neutral-100) !important;
|
||||
overflow: hidden !important;
|
||||
height: 0.75rem !important;
|
||||
}
|
||||
|
||||
.neo-progress-fill {
|
||||
background-color: var(--color-neo-accent) !important;
|
||||
border-radius: var(--radius-neo-lg) !important;
|
||||
}
|
||||
|
||||
.neo-progress-fill::after {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* ===== KANBAN COLUMNS ===== */
|
||||
.kanban-column {
|
||||
border: 1px solid var(--color-neo-border) !important;
|
||||
border-radius: var(--radius-neo-lg) !important;
|
||||
overflow: hidden;
|
||||
background-color: var(--color-neo-bg) !important;
|
||||
border-left: none !important;
|
||||
}
|
||||
|
||||
/* Left accent border on the whole column */
|
||||
.kanban-column.kanban-header-pending {
|
||||
border-left: 3px solid var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
.kanban-column.kanban-header-progress {
|
||||
border-left: 3px solid var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
.kanban-column.kanban-header-done {
|
||||
border-left: 3px solid var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
.kanban-header {
|
||||
background-color: var(--color-neo-card) !important;
|
||||
border-bottom: 1px solid var(--color-neo-border) !important;
|
||||
border-left: none !important;
|
||||
}
|
||||
|
||||
/* ===== MODALS & DROPDOWNS ===== */
|
||||
.neo-modal,
|
||||
[class*="neo-modal"],
|
||||
[role="dialog"] {
|
||||
border: 1px solid var(--color-neo-border) !important;
|
||||
border-radius: var(--radius-neo-xl) !important;
|
||||
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1) !important;
|
||||
}
|
||||
|
||||
.neo-dropdown,
|
||||
[class*="dropdown"],
|
||||
[role="menu"],
|
||||
[data-radix-popper-content-wrapper] {
|
||||
border: 1px solid var(--color-neo-border) !important;
|
||||
border-radius: var(--radius-neo-lg) !important;
|
||||
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08) !important;
|
||||
}
|
||||
|
||||
/* ===== STATUS BADGES ===== */
|
||||
[class*="bg-neo-pending"],
|
||||
.bg-\[var\(--color-neo-pending\)\] {
|
||||
background-color: var(--color-neo-neutral-100) !important;
|
||||
color: var(--color-neo-text-secondary) !important;
|
||||
}
|
||||
|
||||
[class*="bg-neo-progress"],
|
||||
.bg-\[var\(--color-neo-progress\)\] {
|
||||
background-color: oklch(0.9392 0.0166 250.8453) !important;
|
||||
color: var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
[class*="bg-neo-done"],
|
||||
.bg-\[var\(--color-neo-done\)\] {
|
||||
background-color: oklch(0.9392 0.0166 250.8453) !important;
|
||||
color: var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
/* ===== REMOVE NEO EFFECTS ===== */
|
||||
[class*="shadow-neo"],
|
||||
[class*="shadow-"] {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* Only disable hover transforms, not layout utilities like -translate-x-1/2 */
|
||||
[class*="hover:translate"],
|
||||
[class*="hover:-translate"] {
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
/* ===== TEXT STYLING ===== */
|
||||
h1, h2, h3, h4, h5, h6,
|
||||
[class*="heading"],
|
||||
[class*="title"],
|
||||
[class*="font-display"] {
|
||||
text-transform: none !important;
|
||||
font-family: var(--font-neo-sans) !important;
|
||||
}
|
||||
|
||||
.uppercase {
|
||||
text-transform: none !important;
|
||||
}
|
||||
|
||||
strong, b,
|
||||
[class*="font-bold"],
|
||||
[class*="font-black"] {
|
||||
font-weight: 600 !important;
|
||||
}
|
||||
|
||||
/* ===== SPECIFIC ELEMENT FIXES ===== */
|
||||
|
||||
/* Green badges should use accent color */
|
||||
[class*="bg-green"],
|
||||
[class*="bg-emerald"],
|
||||
[class*="bg-lime"] {
|
||||
background-color: oklch(0.9392 0.0166 250.8453) !important;
|
||||
color: var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
/* Category badges */
|
||||
[class*="FUNCTIONAL"],
|
||||
[class*="functional"] {
|
||||
background-color: oklch(0.9392 0.0166 250.8453) !important;
|
||||
color: var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
/* Live/Status indicators - use accent instead of green */
|
||||
.text-\[var\(--color-neo-done\)\] {
|
||||
color: var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
/* Override any remaining borders to be thin */
|
||||
[class*="border-3"],
|
||||
[class*="border-b-3"] {
|
||||
border-width: 1px !important;
|
||||
}
|
||||
|
||||
/* ===== DARK MODE SPECIFIC FIXES ===== */
|
||||
|
||||
.dark .neo-card,
|
||||
.dark [class*="neo-card"] {
|
||||
background-color: var(--color-neo-card) !important;
|
||||
border-color: var(--color-neo-border) !important;
|
||||
}
|
||||
|
||||
.dark .kanban-column {
|
||||
background-color: var(--color-neo-card) !important;
|
||||
}
|
||||
|
||||
.dark .kanban-header {
|
||||
background-color: var(--color-neo-neutral-50) !important;
|
||||
}
|
||||
|
||||
/* Feature cards in dark mode */
|
||||
.dark .neo-card .neo-card {
|
||||
background-color: var(--color-neo-neutral-50) !important;
|
||||
}
|
||||
|
||||
/* Badges in dark mode - lighter background for visibility */
|
||||
.dark .neo-badge,
|
||||
.dark [class*="neo-badge"] {
|
||||
background-color: var(--color-neo-neutral-100) !important;
|
||||
color: var(--color-neo-text) !important;
|
||||
border-color: var(--color-neo-border) !important;
|
||||
}
|
||||
|
||||
/* Status badges in dark mode */
|
||||
.dark [class*="bg-neo-done"],
|
||||
.dark .bg-\[var\(--color-neo-done\)\] {
|
||||
background-color: oklch(0.25 0.05 245) !important;
|
||||
color: var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
.dark [class*="bg-neo-progress"],
|
||||
.dark .bg-\[var\(--color-neo-progress\)\] {
|
||||
background-color: oklch(0.25 0.05 245) !important;
|
||||
color: var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
/* Green badges in dark mode */
|
||||
.dark [class*="bg-green"],
|
||||
.dark [class*="bg-emerald"],
|
||||
.dark [class*="bg-lime"] {
|
||||
background-color: oklch(0.25 0.05 245) !important;
|
||||
color: var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
/* Category badges in dark mode */
|
||||
.dark [class*="FUNCTIONAL"],
|
||||
.dark [class*="functional"] {
|
||||
background-color: oklch(0.25 0.05 245) !important;
|
||||
color: var(--color-neo-accent) !important;
|
||||
}
|
||||
|
||||
/* Buttons in dark mode - better visibility */
|
||||
.dark .neo-btn,
|
||||
.dark button {
|
||||
border-color: var(--color-neo-border) !important;
|
||||
}
|
||||
|
||||
.dark .neo-btn-primary,
|
||||
.dark .neo-btn-success {
|
||||
background-color: var(--color-neo-accent) !important;
|
||||
border-color: var(--color-neo-accent) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
/* Toggle buttons - fix "Graph" visibility */
|
||||
.dark [class*="text-neo-text"] {
|
||||
color: var(--color-neo-text) !important;
|
||||
}
|
||||
|
||||
/* Inputs in dark mode */
|
||||
.dark input,
|
||||
.dark textarea,
|
||||
.dark select {
|
||||
background-color: var(--color-neo-neutral-50) !important;
|
||||
border-color: var(--color-neo-border) !important;
|
||||
color: var(--color-neo-text) !important;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user