Skip to content

feat(components): Implement Theme System, Base UI Components, and Refined Seeding#6

Merged
TKanX merged 17 commits intomainfrom
feature/5-implement-theme-system-and-base-ui-components
Jan 29, 2026
Merged

feat(components): Implement Theme System, Base UI Components, and Refined Seeding#6
TKanX merged 17 commits intomainfrom
feature/5-implement-theme-system-and-base-ui-components

Conversation

@TKanX
Copy link
Copy Markdown
Member

@TKanX TKanX commented Jan 29, 2026

Summary:

Implemented a comprehensive theme management system with dark/light mode support and a suite of reusable UI components based on Radix UI. Establishes the visual foundation of the application, integrating Tailwind CSS for styling and providing essential interactive elements. Additionally, the database seeding script has been significantly improved with strict typing to ensure data integrity during development.

Changes:

  • Implemented Theme System (src/components/layout/theme-toggle.tsx, src/app/providers.tsx):

    • Integrated next-themes for robust dark/light mode switching.
    • Created a ThemeToggle component that cycles through Light, Dark, and System preferences.
    • Added a global Providers wrapper to manage theme context application-wide.
    • Configured layout.tsx to utilize the new provider system and suppress hydration warnings.
  • Added Core UI Components (src/components/ui/):

    • Implemented a set of accessible, styled components using Radix UI primitives and Tailwind CSS:
      • Button: Supports multiple variants (default, secondary, destructive, outline, ghost, link).
      • Card: Composable card structure (Header, Title, Description, Content, Footer).
      • Badge: Status indicators with variant support.
      • Avatar: Image with fallback support.
      • Separator: Visual divider.
      • Input: Standard form input.
      • Skeleton: Loading state placeholder.
    • Added src/lib/utils.ts with a cn utility for conditional class merging.
  • Refined Database Seeding (prisma/seed.ts):

    • Introduced TypeScript interfaces (MemberSeed, PublicationSeed, etc.) to strictly type seed data.
    • Updated seed data structures to match new types, improving maintainability and reducing runtime errors during seeding.
    • Fixed logic for hierarchical research area creation (parent/child relationship handling).
  • Enhanced Home Page (src/app/page.tsx):

    • Updated the landing page to demonstrate the new UI components and theme toggling functionality.
    • Added visual previews for buttons, badges, and cards to serve as a style guide reference.
  • Dependency Updates:

    • Added @radix-ui primitives and next-themes to package.json.
    • Updated .env.example instructions.

@TKanX TKanX self-assigned this Jan 29, 2026
@TKanX TKanX added the enhancement ✨ New feature or request label Jan 29, 2026
Copilot AI review requested due to automatic review settings January 29, 2026 08:29
@TKanX TKanX linked an issue Jan 29, 2026 that may be closed by this pull request
7 tasks
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a comprehensive theme management system with dark/light mode support and establishes a foundation of reusable UI components built on Radix UI and Tailwind CSS. The changes also enhance the database seeding script with strict TypeScript typing for improved maintainability and type safety during development.

Changes:

  • Implemented theme system with next-themes integration, including a ThemeToggle component and global Providers wrapper
  • Added seven accessible UI components (Button, Card, Badge, Avatar, Separator, Input, Skeleton) using Radix UI primitives and class-variance-authority for variant management
  • Enhanced database seeding with TypeScript interfaces for all seed data types, improving type safety and code maintainability

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/lib/utils.ts Added cn utility function for conditional Tailwind class merging using clsx and tailwind-merge
src/components/ui/skeleton.tsx Skeleton loading placeholder component with pulse animation
src/components/ui/separator.tsx Accessible separator component using Radix UI primitive with horizontal/vertical orientation support
src/components/ui/input.tsx Styled input component with consistent focus states and disabled styling
src/components/ui/card.tsx Composable card component with Header, Title, Description, Content, and Footer subcomponents
src/components/ui/button.tsx Button component with multiple variants (default, secondary, destructive, outline, ghost, link) and size options
src/components/ui/badge.tsx Badge component for status indicators with variant support
src/components/ui/avatar.tsx Avatar component using Radix UI with image and fallback support
src/components/layout/theme-toggle.tsx Theme toggle button cycling through light, dark, and system preferences with proper hydration handling
src/app/providers.tsx Global providers wrapper for next-themes configuration
src/app/page.tsx Updated homepage to showcase new UI components and theme functionality
src/app/layout.tsx Integrated Providers wrapper and added suppressHydrationWarning for theme support
prisma/seed.ts Added TypeScript interfaces for all seed data types and improved type safety; minor logic cleanup in research area seeding
package.json Added new Radix UI dependencies and updated next-themes version
package-lock.json Lock file updates for new and updated dependencies
.env.example Updated instructions for environment file setup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/ui/card.tsx
Comment thread src/components/ui/card.tsx
Comment thread prisma/seed.ts Outdated
Comment thread .env.example
@TKanX TKanX force-pushed the feature/5-implement-theme-system-and-base-ui-components branch from fe9ab4b to f26d56b Compare January 29, 2026 08:42
@TKanX TKanX merged commit 1393c23 into main Jan 29, 2026
2 checks passed
@TKanX TKanX deleted the feature/5-implement-theme-system-and-base-ui-components branch January 29, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Theme System and Base UI Components

2 participants