feat(web): design system overhaul, motion layer, and UI refinements#1
feat(web): design system overhaul, motion layer, and UI refinements#1azizbekdevuz merged 12 commits intomainfrom
Conversation
…int root settings
…ements, and motion system
…otification components
…and token buttons
…ith cross-component sync
…architecture changes
|
Important Review skippedToo many files! This PR contains 171 files, which is 21 over the limit of 150. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (171)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly modernizes the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive UI design system overhaul, migrating many hardcoded Tailwind CSS classes to a new token-based system for improved theming and maintainability. This includes refactoring global CSS, updating numerous components to use new semantic tokens for colors, backgrounds, and borders, and integrating new motion effects like scroll reveals and kinetic headings. The globals.css file contains duplicated CSS rules and variable definitions that should be addressed for better maintainability. Additionally, the any type is used in some map functions, which could be improved for type safety.
| :root { | ||
| color-scheme: light; | ||
| } | ||
|
|
||
| @media (prefers-color-scheme: dark) { | ||
| html:not(.dark) { color-scheme: light !important; } | ||
| html:not(.dark) { | ||
| color-scheme: light !important; | ||
| } | ||
| } | ||
|
|
||
| /* Dark theme tokens */ | ||
| .dark { | ||
| --color-bg: 2 6 23; /* slate-950 */ | ||
| --color-fg: 241 245 249; /* slate-100 */ | ||
| --color-card: 15 23 42; /* slate-900 */ | ||
| --color-muted: 3 7 18; | ||
| --color-border: 30 41 59; /* slate-700 */ | ||
|
|
||
| --color-primary: 34 211 238; /* cyan-400 */ | ||
| --color-primary-ink: 6 182 212; /* cyan-500 */ | ||
| --color-glow: 14 165 233; /* cyan-500 */ | ||
|
|
||
| /* Dark semantic soft surfaces: | ||
| These replace all your "bg-*-50 in dark mode becomes random slate". | ||
| Use them to keep status pills readable and still distinct. */ | ||
| --surface-info-soft: 30 41 59; /* slate-700-ish w/ cyan hint */ | ||
| --surface-success-soft: 22 27 34; /* near-slate w/ green hint */ | ||
| --surface-warn-soft: 41 37 16; /* warm deep amber/olive */ | ||
| --surface-danger-soft: 45 13 13; /* deep red */ | ||
| --surface-neutral-soft: 30 41 59; /* generic pill */ | ||
| @theme { | ||
| --font-sans: var(--font-dm-sans), system-ui, sans-serif; | ||
| --font-display: var(--font-sora), system-ui, sans-serif; | ||
| --font-mono: var(--font-dm-mono), monospace; | ||
|
|
||
| --color-bg: 240 244 248; | ||
| --color-fg: 12 18 32; | ||
| --color-card: 255 255 255; | ||
| --color-muted: 241 245 249; | ||
| --color-border: 226 232 240; | ||
| --color-primary: 14 165 233; | ||
| --color-primary-ink: 8 145 178; | ||
| --color-glow: 34 211 238; | ||
|
|
||
| color-scheme: dark; | ||
| --radius-lg: 1.25rem; | ||
|
|
||
| --surface-info-soft: 240 249 255; | ||
| --surface-success-soft: 240 253 244; | ||
| --surface-warn-soft: 254 252 232; | ||
| --surface-danger-soft: 254 242 242; | ||
|
|
||
| /* shadcn / Radix semantic aliases → design tokens (theme-aware via :root / .dark vars) */ | ||
| --color-background: var(--bg-base); | ||
| --color-foreground: var(--text-primary); | ||
| --color-card-foreground: var(--text-primary); | ||
| --color-popover: var(--bg-elevated); | ||
| --color-popover-foreground: var(--text-primary); | ||
| --color-primary-foreground: #020c16; | ||
| --color-secondary: var(--bg-inset); | ||
| --color-secondary-foreground: var(--text-primary); | ||
| --color-muted-foreground: var(--text-muted); | ||
| --color-accent: var(--accent-glow); | ||
| --color-accent-foreground: var(--text-primary); | ||
| --color-destructive: #ef4444; | ||
| --color-destructive-foreground: #fafafa; | ||
| --color-input: var(--border-default); | ||
| --color-ring: var(--accent); | ||
| } |
There was a problem hiding this comment.
This section contains duplicated CSS rules and variable definitions, which can lead to maintenance issues and confusion.
Specifically:
- The
:root { color-scheme: light; }and the@media (prefers-color-scheme: dark)block (lines 247-255) are duplicates of rules that already exist in the file. - The design tokens defined in the
@themeblock (lines 262-276) are also duplicates of the same variables defined in the:rootblock (lines 126-133).
To keep the stylesheet clean and maintainable, please remove these redundant blocks.
|
|
||
| {/* Mission */} | ||
| <section className="grid md:grid-cols-3 gap-4"> | ||
| {dict.pages.about.mission.map((c: any) => ( |
There was a problem hiding this comment.
Using any for the type of c in the map function is not type-safe and goes against TypeScript best practices. It's better to define a specific type for the objects in the mission array to improve code clarity and maintainability.
| {dict.pages.about.mission.map((c: any) => ( | |
| {dict.pages.about.mission.map((c: { title: string; desc: string }) => ( |
Summary
Delivers a token-based presentation layer for
apps/web: glass/frosted surfaces, consistent light/dark styling, portal-based overlays, motion helpers, and an interactive background. Also includes targeted UX fixes (reviews, account session sync, admin/cart), repo config tweaks, and documentation aligned with the new UI architecture.Scope: ~171 files, mostly
apps/webUI/CSS/components; no intentional API or route contract changes.Design system & styling
styles/glass.css,components.css,admin.css; large expansion ofapp/globals.css(tokens, modals, motion, cursor blob).Heroremoved in favor ofHeroBento+HomeHeroSection; related product card and layout updates.components/ui/glass/*,MetricCard, broad primitive and email template token alignment.Motion & background
ScrollRevealandKineticHeadingsmounted from rootlayout.tsx.InteractiveBackgroundrework with cursor-following blob (Framer Motion; reduced-motion aware).Overlays & structure
Form, bottom sheet, dropdown menu, and several review modals usecreatePortal+ consistent backdrops to fix stacking/clipping.UX & product fixes
review:createdsync, i18n forrefresh/undoPending.updateSession()after profile/avatar changes.min-h-screen→ layout-friendly heights).SmartImage.error.tsx/not-found.tsxuse glass cards and token buttons.Config & housekeeping
.eslintrc.json: root + NextrootDir/no-html-link-for-pagesalignment.description→aboutin frontmatter.Documentation
architecture.md: UI design system section (stylesheets, motion, portals,components/uilayout).README.md/CONTRIBUTING.md: presentation layer and file layout hints.Suggested checks before merge
pnpm lint/pnpm typecheck(root or web as you usually run)pnpm --filter @apps/web test