Skip to content

Comments

Use CSS variables#902

Closed
danteissaias wants to merge 9 commits intoMail-0:stagingfrom
danteissaias:feat/css-variables
Closed

Use CSS variables#902
danteissaias wants to merge 9 commits intoMail-0:stagingfrom
danteissaias:feat/css-variables

Conversation

@danteissaias
Copy link
Contributor

@danteissaias danteissaias commented May 7, 2025

Description

This PR removes hardcoded colors from the app and adds CSS variables that can be used to configure the colors.

Although I have taken care to avoid regressing the default theme, let's review this PR thoroughly for any regressions.

Here is a custom dark theme you can use to test; the goal is that everything should be themed, and there shouldn't be any colors left over from the default theme.

  .dark {
    --radius: 0.5rem;

    --background: 150 30% 10%;
    --foreground: 150 30% 90%;
    --panel: 150 30% 12.5%;
    --panel-border: 150 30% 20%;
    
    --card: 150 30% 10%;
    --card-foreground: 150 30% 90%;
    --popover: 150 30% 19%;
    --popover-foreground: 150 30% 90%;
    
    --primary: 150 50% 50%;
    --primary-foreground: 150 30% 98%;
    --secondary: 150 50% 30%;
    --secondary-foreground: 150 30% 90%;
    
    --muted: 150 30% 25%;
    --muted-foreground: 150 30% 70%;
    --accent: 150 50% 30%;
    --accent-foreground: 150 30% 98%;
    
    --destructive: 350 38% 18%;
    --destructive-foreground: 350 89% 60%;
    
    --border: 150 30% 30%;
    --input: 150 30% 20%;
    --ring: 150 50% 75%;
    
    --chart-1: 150 70% 50%;
    --chart-2: 140 60% 45%;
    --chart-3: 130 80% 55%;
    --chart-4: 150 65% 60%;
    --chart-5: 160 75% 55%;
    
    --sidebar-foreground: var(--foreground);
    --sidebar-primary: var(--primary);
    --sidebar-primary-foreground: var(--primary-foreground);
    --sidebar-accent: 150 50% 20%;
    --sidebar-accent-foreground: var(--accent-foreground);
    --sidebar-border: var(--border);
    --sidebar-ring: var(--ring);
    --icon-color: currentColor;
  }

Let me know if you find any regressions or inconsistencies!


Type of Change

Please delete options that are not relevant.

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature with breaking changes)
  • 📝 Documentation update
  • x ] 🎨 UI/UX improvement
  • 🔒 Security enhancement
  • ⚡ Performance improvement

Areas Affected

Please check all that apply:

  • Email Integration (Gmail, IMAP, etc.)
  • User Interface/Experience
  • Authentication/Authorization
  • Data Storage/Management
  • API Endpoints
  • Documentation
  • Testing Infrastructure
  • Development Workflow
  • Deployment/Infrastructure

Testing Done

Describe the tests you've done:

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • Cross-browser testing (if UI changes)
  • Mobile responsiveness verified (if UI changes)

Security Considerations

For changes involving data or authentication:

  • No sensitive data is exposed
  • Authentication checks are in place
  • Input validation is implemented
  • Rate limiting is considered (if applicable)

Checklist

  • I have read the CONTRIBUTING document
  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in complex areas
  • I have updated the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix/feature works
  • All tests pass locally
  • Any dependent changes are merged and published

Additional Notes

N/A

Screenshots/Recordings

CleanShot 2025-05-07 at 17 08 06@2x


By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.

Summary by CodeRabbit

  • Style

    • Unified and simplified color theming across the app by replacing hardcoded and dark mode-specific colors with semantic, theme-aware utility classes.
    • Improved consistency in backgrounds, borders, text, icons, and button styles for all major mail and sidebar components.
    • Updated Tailwind and CSS variables to support dynamic theming.
  • New Features

    • Email content now adapts its background color to match the current theme within iframes and templates.
  • Bug Fixes

    • Enhanced visual consistency for avatars, tooltips, dropdowns, and toast notifications.
  • Chores

    • Rate limiting middleware temporarily disabled.
    • Default theme provider updated to use a custom theme.

@vercel
Copy link

vercel bot commented May 7, 2025

@danteissaias is attempting to deploy a commit to the Zero Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 7, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This update standardizes and unifies color and theme handling across the mail app by replacing hardcoded and dark mode-specific color values with semantic CSS variables and utility classes. It updates Tailwind and global CSS configurations, refactors component styles, and introduces theme-driven background handling for email rendering. Rate limiting middleware is also disabled.

Changes

Files/Group Change Summary
apps/mail/app/(routes)/mail/compose/page.tsx, apps/mail/components/ui/app-sidebar.tsx Replaced explicit light/dark background classes with a unified semi-transparent background class for compose dialog content. Minor import and whitespace cleanup.
apps/mail/app/(routes)/mail/layout.tsx, apps/mail/components/ui/sidebar.tsx, apps/mail/components/ui/ai-sidebar.tsx Unified background classes by removing conditional light/dark mode styling and using a single background class throughout layout and sidebar components.
apps/mail/app/globals.css, apps/mail/tailwind.config.ts Updated CSS variables and Tailwind color palette to use semantic tokens and HSL values. Added new panel and border variables, adjusted destructive colors, and removed hardcoded backgrounds.
apps/mail/components/connection/add.tsx, apps/mail/components/mail/render-labels.tsx, apps/mail/components/ui/dropdown-menu.tsx Updated warning and label styling to use semantic color tokens and added a text color class to dropdown menu items.
apps/mail/components/context/label-sidebar-context.tsx, apps/mail/components/ui/nav-user.tsx Removed explicit background and text color classes from context and dropdown menus, replacing them with semantic or inherited styles.
apps/mail/components/create/ai-chat.tsx, apps/mail/components/create/create-email.tsx, apps/mail/components/create/email-composer.tsx Refactored all color and background classes to use semantic utility classes, unified input and button styling, and added hotkey scope management in compose email.
apps/mail/components/icons/icons.tsx Removed all fillOpacity="0.5" attributes from SVG icon paths, making fills fully opaque.
apps/mail/components/mail/mail-display.tsx, apps/mail/components/mail/mail-list.tsx, apps/mail/components/mail/mail.tsx, apps/mail/components/mail/note-panel.tsx, apps/mail/components/mail/reply-composer.tsx, apps/mail/components/mail/search-bar.tsx, apps/mail/components/mail/thread-display.tsx Replaced hardcoded and dark mode-specific color classes with theme-aware utility classes for backgrounds, borders, icons, and text. Simplified and unified styling throughout mail display, list, notes, search, and thread components.
apps/mail/components/mail/mail-iframe.tsx, apps/mail/lib/email-utils.client.tsx Integrated theme-dependent background color into email iframe rendering by passing CSS variable values to the email template. Updated template and interface signatures accordingly.
apps/mail/components/settings/settings-card.tsx, apps/mail/components/ui/settings-content.tsx Simplified background and border styling to use semantic classes, removed explicit color codes and dark mode overrides.
apps/mail/components/ui/avatar.tsx Added a muted foreground text color class to avatar fallback styling.
apps/mail/components/ui/dialog.tsx Unified dialog content background class, removing separate light/dark mode classes.
apps/mail/components/ui/nav-main.tsx Replaced hardcoded sidebar and label colors with theme-based utility classes for text, icons, backgrounds, and borders.
apps/mail/components/ui/sidebar-toggle.tsx Replaced conditional icon fill classes with a unified muted foreground fill.
apps/mail/components/ui/toast.tsx Updated toast background and text color classes to use theme-based classes and simplified border handling.
apps/mail/providers/client-providers.tsx Hardcoded the theme provider's default theme to 'custom' instead of using user settings.
apps/mail/trpc/trpc.ts Disabled rate limiting by commenting out all related logic in the middleware.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MailApp
    participant ThemeProvider
    participant EmailTemplate
    participant Iframe

    User->>MailApp: Opens mail or compose view
    MailApp->>ThemeProvider: Requests current theme/background color
    ThemeProvider-->>MailApp: Returns CSS variable for background
    MailApp->>EmailTemplate: Passes HTML content + background color
    EmailTemplate-->>MailApp: Returns themed HTML document
    MailApp->>Iframe: Sets src to themed HTML document
    Iframe-->>User: Renders email with correct theme background
Loading

Suggested labels

enhancement

Poem

In the warren of code, a palette anew,
Where colors once clashed, now softly imbue.
Semantic and subtle, the themes intertwine,
Each button and badge with a gentle design.
The rabbits all cheer as the backgrounds align—
HSL in the burrow, and harmony divine!
🐇🎨


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@danteissaias
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 7, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

Choose a reason for hiding this comment

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

it this a leftover you forgot to uncomment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yeah, my bad. Will uncomment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would probably make sense to disable this in development though, wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

we never had issues with it in dev mode, what issues did you face? the rate limits are pretty generous

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran into the rate limit a couple times, maybe I was reloading too aggressively.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🔭 Outside diff range comments (2)
apps/mail/components/create/ai-chat.tsx (1)

227-233: 🛠️ Refactor suggestion

Remaining hardcoded colors in message bubbles

There are still hardcoded colors in the message bubble styling that should be replaced with semantic tokens for consistency with the rest of the UI.

<div
  className={cn(
    'flex w-fit flex-col gap-2 rounded-xl text-sm shadow',
    message.role === 'user'
-      ? 'overflow-wrap-anywhere text-subtleWhite dark:text-offsetDark ml-auto break-words bg-[#313131] p-2 dark:bg-[#f0f0f0]'
-      : 'overflow-wrap-anywhere mr-auto break-words bg-[#f0f0f0] p-2 dark:bg-[#313131]',
+      ? 'overflow-wrap-anywhere text-primary-foreground ml-auto break-words bg-primary p-2'
+      : 'overflow-wrap-anywhere mr-auto break-words bg-muted p-2',
  )}
>
apps/mail/components/mail/mail-iframe.tsx (1)

107-116: 🛠️ Refactor suggestion

Inconsistent background handling

There's an inconsistency between the new theme-based approach and this effect that still sets background colors based on resolvedTheme with hardcoded RGB values. This should be updated to use the CSS variables for consistency.

useEffect(() => {
  if (iframeRef.current?.contentWindow?.document.body) {
    const body = iframeRef.current.contentWindow.document.body;
-    body.style.backgroundColor =
-      resolvedTheme === 'dark' ? 'rgb(10, 10, 10)' : 'rgb(245, 245, 245)';
+    const styles = getComputedStyle(document.documentElement);
+    body.style.backgroundColor = `hsl(${styles.getPropertyValue('--panel').trim()})`;
    requestAnimationFrame(() => {
      fixNonReadableColors(body);
    });
  }
-}, [resolvedTheme]);
+}, [theme]);
🧹 Nitpick comments (9)
apps/mail/components/mail/search-bar.tsx (1)

211-211: Input border color: apply semantic token

The Input component now uses bg-background but retains the generic border utility, which falls back to the default Tailwind border color. For full theming consistency, consider replacing:

- border
+ border border-panelBorder

so the border color leverages your --panel-border CSS variable.

apps/mail/components/ui/toast.tsx (1)

34-34: Toast container border: consider semantic border token

The default toast container now uses bg-popover but lacks a defined border color. To maintain visual separation and follow your theming approach, consider adding:

- bg-popover
+ border border-panelBorder bg-popover

and retain dark:border-transparent as needed.

apps/mail/components/ui/settings-content.tsx (1)

13-13: Nitpick: Remove redundant dark variant

Since border-panelBorder applies in both light and dark, the dark:border-panelBorder override is redundant and can be removed to simplify the class string.

apps/mail/components/create/create-email.tsx (2)

20-20: Consider standardizing React import style across the codebase

You're importing React as a namespace here while using destructured imports elsewhere in the file (line 8). For consistency, consider standardizing the import style across the codebase.

-import { useEffect, useMemo, useState } from 'react';
-import * as React from 'react';
+import React, { useMemo, useState } from 'react';

136-155: Good hotkey scope management implementation

Adding the compose scope and global escape key handler improves keyboard navigation. This is a good accessibility enhancement.

One suggestion: Consider using the useHotkeys hook from react-hotkeys-hook for the Escape key instead of a manual event listener, which would be more consistent with your hotkey management approach.

React.useEffect(() => {
  // Enable the compose scope for hotkeys
  enableScope('compose');

-  // Register a hotkey for ESC to close the dialog
-  const handleEsc = (event: KeyboardEvent) => {
-    if (event.key === 'Escape') {
-      setDialogOpen(false);
-    }
-  };
-
-  // Add event listener
-  window.addEventListener('keydown', handleEsc);

  // Clean up
  return () => {
-    window.removeEventListener('keydown', handleEsc);
    disableScope('compose');
  };
}, [enableScope, disableScope]);

And add a useHotkeys hook:

useHotkeys('esc', () => setDialogOpen(false), { 
  scopes: ['compose'],
  enableOnFormTags: true 
});
apps/mail/app/globals.css (1)

25-27: Remove empty layer block

The empty CSS layer block should be removed as it serves no purpose.

-@layer base {
-}
🧰 Tools
🪛 Biome (1.9.4)

[error] 26-27: An empty block isn't allowed.

Consider removing the empty block or adding styles inside it.

(lint/suspicious/noEmptyBlock)

apps/mail/components/mail/mail-display.tsx (3)

813-818: Refactor dark-mode prefixes to semantic background token
Instead of dark:bg-muted, prefer using bg-muted so it applies in both light/dark. Similarly, replace dark:border-none with a semantic border variable or helper.


827-831: Consistent reply-all button theming
Same recommendation: drop dark:bg-muted in favor of bg-muted, and unify border styling via CSS variables.


843-848: Consistent forward button theming
Replace dark:bg-muted with bg-muted and remove dark:border-none, using semantic tokens to handle both modes.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa8cb91 and ad9405c.

📒 Files selected for processing (34)
  • apps/mail/app/(routes)/mail/compose/page.tsx (3 hunks)
  • apps/mail/app/(routes)/mail/layout.tsx (1 hunks)
  • apps/mail/app/globals.css (4 hunks)
  • apps/mail/components/connection/add.tsx (1 hunks)
  • apps/mail/components/context/label-sidebar-context.tsx (1 hunks)
  • apps/mail/components/create/ai-chat.tsx (7 hunks)
  • apps/mail/components/create/create-email.tsx (3 hunks)
  • apps/mail/components/create/email-composer.tsx (18 hunks)
  • apps/mail/components/icons/icons.tsx (0 hunks)
  • apps/mail/components/mail/mail-display.tsx (20 hunks)
  • apps/mail/components/mail/mail-iframe.tsx (1 hunks)
  • apps/mail/components/mail/mail-list.tsx (10 hunks)
  • apps/mail/components/mail/mail.tsx (8 hunks)
  • apps/mail/components/mail/note-panel.tsx (15 hunks)
  • apps/mail/components/mail/render-labels.tsx (3 hunks)
  • apps/mail/components/mail/reply-composer.tsx (1 hunks)
  • apps/mail/components/mail/search-bar.tsx (1 hunks)
  • apps/mail/components/mail/thread-display.tsx (12 hunks)
  • apps/mail/components/settings/settings-card.tsx (1 hunks)
  • apps/mail/components/ui/ai-sidebar.tsx (5 hunks)
  • apps/mail/components/ui/app-sidebar.tsx (1 hunks)
  • apps/mail/components/ui/avatar.tsx (1 hunks)
  • apps/mail/components/ui/dialog.tsx (1 hunks)
  • apps/mail/components/ui/dropdown-menu.tsx (1 hunks)
  • apps/mail/components/ui/nav-main.tsx (6 hunks)
  • apps/mail/components/ui/nav-user.tsx (6 hunks)
  • apps/mail/components/ui/settings-content.tsx (1 hunks)
  • apps/mail/components/ui/sidebar-toggle.tsx (1 hunks)
  • apps/mail/components/ui/sidebar.tsx (3 hunks)
  • apps/mail/components/ui/toast.tsx (2 hunks)
  • apps/mail/lib/email-utils.client.tsx (7 hunks)
  • apps/mail/providers/client-providers.tsx (1 hunks)
  • apps/mail/tailwind.config.ts (1 hunks)
  • apps/mail/trpc/trpc.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/mail/components/icons/icons.tsx
🧰 Additional context used
🧬 Code Graph Analysis (10)
apps/mail/components/settings/settings-card.tsx (1)
apps/mail/lib/utils.ts (1)
  • cn (53-53)
apps/mail/components/mail/reply-composer.tsx (1)
apps/mail/components/create/email-composer.tsx (1)
  • EmailComposer (78-910)
apps/mail/app/(routes)/mail/compose/page.tsx (2)
packages/db/src/schema.ts (1)
  • session (28-39)
apps/mail/components/ui/dialog.tsx (5)
  • Dialog (106-106)
  • DialogTitle (114-114)
  • DialogDescription (115-115)
  • DialogTrigger (110-110)
  • DialogContent (111-111)
apps/mail/components/ui/settings-content.tsx (1)
apps/mail/components/ui/app-sidebar.tsx (1)
  • AppSidebar (37-126)
apps/mail/components/create/ai-chat.tsx (1)
apps/mail/components/ui/avatar.tsx (2)
  • AvatarFallback (47-47)
  • Avatar (47-47)
apps/mail/components/ui/ai-sidebar.tsx (2)
apps/mail/lib/utils.ts (1)
  • cn (53-53)
apps/mail/components/icons/icons.tsx (2)
  • X (604-615)
  • Paper (1330-1342)
apps/mail/components/ui/nav-main.tsx (3)
apps/mail/components/ui/dialog.tsx (2)
  • Dialog (106-106)
  • DialogTrigger (110-110)
apps/mail/components/ui/command.tsx (1)
  • Command (139-139)
apps/mail/components/icons/icons.tsx (1)
  • CurvedArrow (83-94)
apps/mail/components/ui/sidebar-toggle.tsx (3)
apps/mail/components/ui/sidebar.tsx (2)
  • SidebarTrigger (616-616)
  • useSidebar (617-617)
apps/mail/lib/utils.ts (1)
  • cn (53-53)
apps/mail/components/icons/icons.tsx (1)
  • PanelLeftOpen (114-129)
apps/mail/components/mail/note-panel.tsx (5)
packages/db/src/schema.ts (1)
  • note (119-131)
apps/mail/components/ui/tooltip.tsx (3)
  • Tooltip (74-74)
  • TooltipTrigger (74-74)
  • TooltipContent (74-74)
apps/mail/lib/notes-utils.ts (2)
  • formatRelativeTime (86-112)
  • NOTE_COLORS (4-55)
apps/mail/components/ui/dropdown-menu.tsx (8)
  • DropdownMenuContent (173-173)
  • DropdownMenuItem (174-174)
  • DropdownMenuSubTrigger (184-184)
  • DropdownMenuPortal (181-181)
  • DropdownMenuSubContent (183-183)
  • DropdownMenuRadioGroup (185-185)
  • DropdownMenuRadioItem (176-176)
  • DropdownMenuSeparator (178-178)
apps/mail/lib/utils.ts (1)
  • cn (53-53)
apps/mail/components/mail/mail-iframe.tsx (2)
apps/mail/lib/email-utils.client.tsx (1)
  • template (245-267)
apps/mail/lib/email-utils.ts (1)
  • fixNonReadableColors (5-35)
🪛 Biome (1.9.4)
apps/mail/app/globals.css

[error] 26-27: An empty block isn't allowed.

Consider removing the empty block or adding styles inside it.

(lint/suspicious/noEmptyBlock)

🔇 Additional comments (138)
apps/mail/components/context/label-sidebar-context.tsx (1)

61-61: LGTM: Background styling extracted to theme variables

The removal of explicit background colors in favor of inherited theme styles aligns with the PR's goal of using CSS variables for theming. This change allows the ContextMenuContent to consistently follow the application's theme without hardcoded color values.

apps/mail/trpc/trpc.ts (1)

66-85:

Details

❓ Verification inconclusive

Rate limiting has been completely disabled

This change entirely disables the rate limiting functionality by commenting out the implementation code. While the PR is focused on theming changes, this is a functional change that could have security and performance implications.

Please clarify if disabling rate limiting was intentional as part of this PR, as it seems unrelated to the theming changes described in the PR objectives. If not intentional, the rate limiting code should be restored.


🏁 Script executed:

#!/bin/bash
# Check if this rate limiting functionality is used elsewhere or has a replacement
echo "Checking for other rate limiting implementations..."
rg "Ratelimit|rate limit|ratelimit" --type ts --type tsx -C 2

Length of output: 204


🏁 Script executed:

#!/bin/bash
# Broad search for any use of rate limiting utilities or mentions across all files
rg -i "ratelimit" -C2

Length of output: 8387


Rate limiting implementation disabled in TRPC middleware

The createRateLimiterMiddleware in apps/mail/trpc/trpc.ts has its Upstash Ratelimit logic fully commented out, effectively turning off rate limiting for every route that uses this middleware. This impacts all of the following routes (and any others using createRateLimiterMiddleware):

  • apps/mail/trpc/routes/settings.ts
  • apps/mail/trpc/routes/mail.ts
  • apps/mail/trpc/routes/label.ts
  • apps/mail/trpc/routes/connections.ts

Please confirm whether disabling rate limiting was intentional. If not, restore the instantiation and enforcement logic in createRateLimiterMiddleware so that each route’s limiter and generatePrefix configurations are applied as before.

apps/mail/components/ui/dropdown-menu.tsx (1)

83-83: Improved dropdown menu text theming

Adding text-popover-foreground to the dropdown menu item ensures text color is controlled by the theme system rather than using hardcoded colors. This change is consistent with the PR's goal of using CSS variables for theming.

apps/mail/components/ui/avatar.tsx (1)

39-39: Enhanced avatar fallback text styling

Adding text-muted-foreground to the avatar fallback ensures text color is controlled by the theme system rather than using hardcoded colors. This improves consistency across the UI when theme changes are applied.

apps/mail/components/mail/reply-composer.tsx (2)

204-204: Good refactoring: Removed hardcoded background color

The removal of explicit background classes (bg-white dark:bg-[#141414]) from the container div helps standardize the theming approach by letting the element inherit its background from CSS variables.


206-207: Improved theming consistency

Removing the dark mode background class (dark:bg-[#141414]) from the EmailComposer components is consistent with the theme standardization across the app. The component will now use CSS variables for theming.

apps/mail/app/(routes)/mail/layout.tsx (1)

8-8: Good semantic class refactoring

Replacing conditional light/dark background classes (bg-lightBackground dark:bg-darkBackground) with a unified semantic class (bg-background) improves maintainability and follows the new theming approach using CSS variables.

apps/mail/components/ui/sidebar.tsx (3)

44-45: Improved semantic styling

Converting from explicit light/dark background classes to the semantic bg-background class aligns with the CSS variables approach and improves theming consistency.


61-61: Consistent theming for mobile view

Good implementation of the bg-background class in the mobile sheet content, maintaining theme consistency between desktop and mobile views.


115-115: Unified background styling in nested elements

The desktop sidebar inner container now correctly uses bg-background class, ensuring consistent styling throughout nested sidebar components.

apps/mail/components/ui/sidebar-toggle.tsx (2)

8-8: Trivial import reordering

Import reordering doesn't affect functionality but maintains consistent import ordering across files.


15-15: Improved icon theming with semantic class

Replacing conditional fill colors (dark:fill-iconDark fill-iconLight) with the semantic class (fill-muted-foreground) enhances theme consistency and follows the CSS variables approach.

apps/mail/components/ui/app-sidebar.tsx (1)

166-166: Enhanced dialog background with semi-transparency

Replacing explicit colors (bg-[#FAFAFA] dark:bg-[#141414]) with a semantic semi-transparent background class (bg-background/50) not only aligns with the CSS variables approach but also adds a subtle UI enhancement with transparency.

apps/mail/app/(routes)/mail/compose/page.tsx (2)

10-11: Clean import reordering.

The reordering of imports doesn't affect functionality and improves organization.


49-49: Good replacement of hardcoded colors with CSS variables.

Changing from hardcoded background colors to the semantic bg-background/50 class improves theming consistency and enables easier theme customization. The 50% opacity also creates a nice semi-transparent effect.

apps/mail/providers/client-providers.tsx (1)

27-27: Verify the impact of hardcoding theme to 'custom'.

Changing from a dynamic user-selected theme (theme variable) to a hardcoded 'custom' value removes user theme preference control. Ensure this is intentional and aligns with the PR's goal of enabling CSS variable-based theming.

The previous implementation used:

const theme = data?.settings.colorTheme || 'system';

This change means users won't be able to switch between system/light/dark modes in settings. Verify that the new CSS variable approach properly handles theming without this setting.

apps/mail/components/settings/settings-card.tsx (1)

22-22: Good replacement of conditional styling with unified class.

Replacing light/dark conditional classes with the semantic bg-panel class simplifies the component and aligns with the CSS variables approach for theming. This improves maintainability by centralizing color definitions.

apps/mail/components/ui/dialog.tsx (1)

57-57: Good replacement of conditional styling with unified class.

Replacing light/dark conditional background classes with the semantic bg-panel class simplifies the component styling. This change aligns with the CSS variables approach for theming and improves maintainability.

apps/mail/components/mail/search-bar.tsx (1)

204-204: Styling: Migrated icon color to semantic token

Replacing explicit color classes with text-muted-foreground for the search icon aligns perfectly with the new CSS variable theming and ensures consistency across light/dark modes.

apps/mail/components/ui/toast.tsx (1)

24-24: Styling: Unified toast title color

Updating the toast title’s text color to text-foreground replaces hardcoded black/white values and leverages the theme’s foreground token.

apps/mail/components/connection/add.tsx (2)

74-74: Styling: Semantic destructive colors applied

Your update replaces raw red shades with border-destructive-foreground/40 and bg-destructive/40, aligning the warning container with the new CSS variable theming.


83-83: Styling: Semantic text color for pricing detail

Good use of text-foreground/80 for the /month span, ensuring the price detail adheres to the theme’s foreground opacity token.

apps/mail/components/ui/settings-content.tsx (2)

9-9: Layout styling: Simplified wrapper classes

The outer wrapper now uses a minimal set of layout utilities (flex, h-full, w-full, md:py-1), removing old mode-specific overrides. This keeps the layout clean and consistent.


12-12: Styling: Panel container uses semantic tokens

Replacing hardcoded background and border colors with bg-panel and border-panelBorder correctly applies your design tokens for the settings panel container.

apps/mail/components/mail/mail.tsx (11)

156-156: Responsive border: confirm border width scope

The panel wrapper applies border-panelBorder but relies on md:border for width (via another class). This may leave mobile viewports borderless. Please verify that hiding the border on smaller screens is intentional.


159-159: Sticky header styling: semantic border token used

The header now uses border-panelBorder for its bottom border, removing explicit hex values. This ensures the header aligns with the theme’s border token.


236-236: ResizablePanel styling: consistent semantic tokens

Great use of bg-panel, border, and border-panelBorder on the ResizablePanel—this maintains the visual divider and matches the design system tokens.


254-254: Mobile drawer styling: semantic panel token applied

Updating the mobile drawer’s background to bg-panel unifies it with the new panel theming—nice consistency for mobile views.


520-520: Category icon styling: unified muted foreground

Switching the Lightning icon to fill-muted-foreground and toggling to fill-white on selection aligns well with the new theming tokens.


529-529: Category icon styling: unified muted foreground

Good replacement for the Mail icon using fill-muted-foreground, enabling consistent icon theming.


539-539: Category icon styling: unified muted foreground

Updated User icon styling matches the theme’s muted icon pattern.


547-547: Category icon styling: unified muted foreground

The Bell icon now correctly uses fill-muted-foreground for unselected state.


555-555: Category icon styling: unified muted foreground

Nice use of fill-muted-foreground for the Tag icon to ensure consistency.


564-564: Category icon styling: unified muted foreground

Applying fill-muted-foreground and adjusting sizing for ScanEye fits the new icon theming guidelines.


631-632: Category button styling: semantic unselected and selected states

Leveraging bg-popover for unselected tabs and dynamic background tokens (bgColor) for the selected state provides a clean, theme-driven approach. The conditional cn use keeps the layout responsive.

apps/mail/tailwind.config.ts (2)

18-20: Excellent introduction of semantic color variables

The addition of these CSS variables is a great approach for consistent theming. Using HSL values with CSS variables provides flexibility for creating derived colors with opacity variations.


25-26: Good use of common semantic tokens for layout elements

Using background and foreground as base variables follows design system best practices and helps maintain visual consistency throughout the application.

apps/mail/components/create/create-email.tsx (1)

185-188: Clean UI update using semantic tokens

Good update of the escape key UI to use semantic color tokens. This makes the UI more consistent with design system changes and supports theming.

apps/mail/components/create/ai-chat.tsx (5)

33-33: Good semantic class substitution for hover states and avatar

Nice replacement of hardcoded colors with semantic tokens. The muted background with opacity for hover and consistent avatar styling improves consistency with the design system.

Also applies to: 42-44


48-57: Consistent text styling with semantic tokens

Good use of semantic color tokens for text elements. The consistent application of text-foreground for primary content and text-muted-foreground for secondary content improves the visual hierarchy.


91-92: Consistent button styling with semantic tokens

Good replacement of hardcoded button colors with semantic tokens. Using bg-muted with text-muted-foreground ensures buttons have consistent styling across themes.

Also applies to: 110-111


98-100: Gradient styling with semantic panel color

Good update to use the semantic panel color as the base for gradients. This ensures the gradients blend seamlessly with the surrounding UI in all themes.

Also applies to: 117-120


191-196: Semantic text styling for empty state

Good use of semantic text classes for the empty state. The differentiation between primary and secondary text using text-foreground and text-muted-foreground improves readability.

apps/mail/components/mail/mail-iframe.tsx (3)

75-75: Good use of theme context for component styling

Adding theme access is important for consistent styling across the component.


80-100: Excellent theming integration for email content

Great improvement on passing the theme-based background color to the email template. This ensures consistent styling between the app UI and embedded email content.

Using requestAnimationFrame is a good practice for DOM operations that might affect layout.


105-105: Added theme dependency to effect

Good addition of theme to the dependency array to ensure the effect runs when the theme changes.

apps/mail/components/ui/nav-user.tsx (6)

170-174: Semantic CSS variable usage for dropdown content.
The DropdownMenuContent now utilizes ml-3, w-[--radix-dropdown-menu-trigger-width], and min-w-56 font-medium with semantic tokens, removing explicit light/dark overrides. This aligns perfectly with the new theming approach.


334-336: Consistent background for active account checkmark.
The CircleCheck icon now leverages bg-background and fill-mainBlue, replacing prior dual-mode classes and ensuring it adapts correctly to both themes.


431-433: Themed styling for add-connection button.
Switched to text-muted-foreground and retained the dashed border on the add-connection control, bringing it in line with other muted interactive elements.


441-443: Unified icon fill for overflow menu button.
The ThreeDots icon now uses fill-muted-foreground inside the ghost Button, ensuring consistent icon coloration under the new theme tokens.


445-448: Dropdown panel sizing update.
Removed explicit light/dark classes from the secondary menu’s DropdownMenuContent and standardized on min-w-56 font-medium, matching other dropdowns.


541-546: Themed text classes for user info display.
Replaced concrete color utilities with text-foreground and text-muted-foreground for the user’s name and email, ensuring semantic consistency.

apps/mail/components/mail/thread-display.tsx (8)

141-141: Icon fill default for action buttons.
The ThreadActionButton component now uniformly applies fill-muted-foreground to its icons, consolidating default icon styling.


345-349: Root container background token.
Switched the thread container to use bg-panel, aligning the background with the global panel token instead of fixed values.


408-410: Header border and background tokens.
Updated the sticky header to use border-panelBorder and conditionally bg-panel, removing old dark/light overrides.


418-421: Mobile toolbar button theming.
All mobile-only toolbar buttons (Close, Previous, Next) now adopt hover:bg-muted and fill-muted-foreground, replacing mixed-mode classes.

Also applies to: 438-446, 458-466


486-490: Star toggle icon state styling.
The star icon’s on/off states now use fill-yellow-400/stroke-yellow-400 and stroke-muted-foreground fill-transparent, leveraging semantic tokens for clarity.


508-509: Archive and delete action styling.
Archive, Trash, and their button wrappers now employ fill-muted-foreground or fill-destructive-foreground alongside border-destructive-foreground/30 bg-destructive, matching the destructive palette.

Also applies to: 523-526


535-537: Overflow menu icon and panel sizing.
The secondary menu’s trigger (ThreeDots) and its DropdownMenuContent now consistently use fill-muted-foreground and default menu sizing (min-w-56 font-medium).

Also applies to: 539-540


583-586: List item separator styling.
Replaced hardcoded borders with border-panelBorder on thread dividers, ensuring consistent separation lines across themes.

apps/mail/components/mail/mail-list.tsx (6)

147-148: Draft preview text theming.
The draft subject line now uses text-muted-foreground for secondary text, aligning with other muted elements in the list.


905-911: Empty state message color token.
Updated the empty-inbox helper text to text-foreground/70, matching the muted-foreground style for non-critical information.


362-371: Demo thread avatar container theming.
GroupPeople and avatar fallback containers in demo mode now use bg-muted with text-muted-foreground, simplifying mixed-mode styling.


470-471: Quick action row and icon buttons.
The inline quick-action toolbar now relies on bg-panel, fill-muted-foreground, and fill-destructive-foreground, removing explicit hex and dark/light toggle classes.

Also applies to: 486-490, 504-505, 517-520


557-557: Mail avatar image and fallback styling.
Standardized to rounded-full with no explicit light/dark overrides on both AvatarImage and AvatarFallback.

Also applies to: 561-561


617-620: Date and subject text tokens.
Both the received date and the subject line now use text-muted-foreground for consistency in the message list.

Also applies to: 637-639

apps/mail/components/mail/render-labels.tsx (2)

44-46: Visible label button styling consolidation.
Buttons now use bg-muted/40 border-muted text-primary with border-foreground when active, streamlining light/dark handling.


65-67: Hidden label tooltip item styling.
Tooltip labels updated to bg-muted border-muted-foreground/50 with border-primary on active state, improving consistency.

apps/mail/components/ui/ai-sidebar.tsx (4)

99-100: Panel group background token.
ResizablePanelGroup now uses bg-background p-0, replacing fixed background classes with the theme variable.


108-109: Sidebar panel container theming.
The AI sidebar panel now applies bg-panel and border-panelBorder, ensuring it’s styled by the global panel token.


112-116: Sidebar header section tokens.
Header section updated to use border-panelBorder and theme-agnostic paddings, removing explicit light/dark overrides.


121-122: Icon fill color updates.
X, Paper, and Plus icons all now use fill-muted-foreground (or text-muted-foreground), unifying the monochrome icon style across the sidebar.

Also applies to: 136-137, 195-196

apps/mail/components/ui/nav-main.tsx (8)

268-270: Nicely done replacing hardcoded colors with semantic variables

Great improvement changing the text color from a hardcoded hex value to the semantic variable text-sidebar-foreground/70, which makes this component properly respect the theming system.


294-294: Good use of semantic color variables

Replacing hardcoded color with the semantic class text-sidebar-foreground/70 ensures consistent styling across themes.


302-302: Excellent icon color standardization

Changing the icon color to use text-sidebar-foreground/70 ensures it will properly adapt to theme changes.


419-421: Great icon styling cleanup

Good job replacing hardcoded icon colors with semantic variables that follow the theme system. Both text-foreground and fill-foreground ensure consistent styling.


480-481: Excellent label styling enhancement

Using bg-accent/40 border-accent provides better theme consistency for labels compared to the previous hardcoded colors, making them properly respond to theme changes.


511-513: Nice styling for selected vs unselected states

Good implementation of different styling for selected vs unselected states using semantic tokens:

  • Selected: border-accent/40 bg-accent
  • Unselected: bg-accent/40 border-accent/40

This provides proper visual feedback while respecting the theming system.


576-578: Well-implemented button state styling

Good job replacing the hardcoded hover and active state styles with semantic classes:

  • hover:bg-sidebar-accent for hover state
  • bg-sidebar-accent for active state
  • text-sidebar-accent-foreground for active text color

This creates a consistent interaction pattern that responds to theme changes.


581-581: Good icon color standardization

Effectively replaced hardcoded icon color with the semantic token text-muted-foreground/60, ensuring proper theme integration.

apps/mail/app/globals.css (4)

33-34: Excellent addition of panel CSS variables

Adding the --panel and --panel-border CSS variables is a great improvement that enables consistent styling of panel elements across the app. These will be key in achieving the theming goals of this PR.


47-48: Well-chosen destructive color values

The new HSL values for destructive states are well-calibrated, using a lighter pink shade for the background and maintaining the same foreground color, which improves the visibility of destructive actions.


69-72: Good dark theme panel definitions

Well-considered values for the dark mode background and panel colors:

  • --background: 0 0% 8% - a dark but not pure black background
  • --panel: 0 0% 10% - slightly lighter than the background
  • --panel-border: 0 0% 15% - subtle border that's visible but not harsh

These provide good contrast without being too harsh on the eyes.


75-75: Well-balanced dark theme color adjustments

The updates to these dark theme colors show thoughtful consideration of contrast and readability:

  • Popover background at 19% brightness provides good separation
  • Muted background at 25.9% brightness works well for secondary elements
  • Destructive colors correctly adjusted for dark mode visibility
  • Input field background at 19% brightness maintains consistency with popover

These adjustments will provide a cohesive dark theme experience.

Also applies to: 81-81, 85-86, 88-88

apps/mail/lib/email-utils.client.tsx (5)

7-9: Good imports for theme support

Importing the necessary React hooks and the theme provider is a good preparation for the theme-aware changes to follow.


92-92: Well-structured prop extension

Adding the backgroundColor property to the EmailTemplateProps interface is a clean way to extend the component's capabilities for theming.


159-159: Good component signature update

Properly updated the component signature to accept the new backgroundColor parameter, maintaining the existing parameters while adding the new functionality.


197-208: Excellent email theming implementation

The CSS updates to use the dynamic backgroundColor value are well implemented:

  1. Setting the background color on both the container elements and all children
  2. Using the HSL syntax hsl(${backgroundColor}) to correctly apply the theme color
  3. Preserving other important styling like font sizes and families

This effectively brings theme consistency to email content which was previously difficult to style.


245-249: Well-structured function signature update

The template function is properly updated to:

  1. Accept the new backgroundColor parameter
  2. Maintain backward compatibility with the default for imagesEnabled
  3. Pass the parameter to the EmailTemplate component

This provides a clean API for the theme integration.

apps/mail/components/create/email-composer.tsx (13)

377-377: Good container background theming

Properly replaced the hardcoded background color with the semantic bg-panel class, ensuring the composer background adapts to theme changes.


381-381: Nice border styling update

Using border-panelBorder for the border color ensures consistent styling with the rest of the application's panels while maintaining visual separation.


384-384: Good text color standardization

Replacing hardcoded text colors with semantic text-muted-foreground class provides proper theming for secondary text elements.

Also applies to: 394-394, 409-409


415-416: Well-implemented input field styling

Good use of both foreground and placeholder colors:

  • text-foreground for the input text
  • placeholder:text-muted-foreground/70 for placeholder text

This provides appropriate visual hierarchy and ensures both are readable in all themes.

Also applies to: 524-524, 603-603


389-390: Good avatar fallback theming

Properly updated avatar fallbacks to use:

  • bg-accent for the background
  • text-muted-foreground for the text

This ensures consistent styling across all user avatars in the application.

Also applies to: 393-393, 503-503, 582-582


409-409: Consistent icon styling

Good job using fill-muted-foreground consistently for the close (X) icons throughout the component, ensuring they maintain the proper visual weight across themes.

Also applies to: 519-519, 598-598


666-666: Nice message container styling

The update to bg-popover/30 with border-t creates a subtle visual separation for the message content area while maintaining theme consistency.


676-677: Well-executed primary button styling

Excellent implementation of the Send button styling:

  • bg-primary for the button background
  • text-primary-foreground for the text
  • bg-primary-foreground/10 for the shortcut badge
  • text-primary-foreground for the shortcut icons

This ensures the button stands out appropriately while respecting the theme.

Also applies to: 681-684, 686-689


729-730: Good popover content styling

The update to use z-index and proper rounding ensures that the attachment popover appears correctly above other content while maintaining visual consistency.


734-736: Nice attachment popover header styling

Good job updating the attachment popover header to use:

  • border-muted for the border
  • text-foreground for the heading
  • text-muted-foreground for the secondary text

This creates a clear visual hierarchy while respecting the theme.


754-754: Well-styled attachment items

Good updates to the attachment item styling:

  • hover:bg-primary/10 for the hover state
  • text-foreground for the primary text
  • text-muted-foreground for secondary text and file extension

This provides a consistent experience that properly adapts to theme changes.

Also applies to: 781-781, 786-786, 791-791


810-810: Good remove button styling

The styling for the attachment remove button is well-implemented:

  • Background transitions from transparent to bg-black/5 on hover
  • Icon color changes from text-muted-foreground to text-primary-foreground on hover

This provides good visual feedback while maintaining theme consistency.

Also applies to: 813-813


851-851: Well-executed AI button styling

Good updates to the AI generation button:

  • border-panelBorder for the border
  • fill-muted-foreground for the loading icon
  • fill-foreground for the sparkles icon
  • text-foreground for the text

This maintains the proper visual hierarchy and theme consistency.

Also applies to: 865-865, 867-867, 870-870

apps/mail/components/mail/mail-display.tsx (13)

212-212: Consistent badge styling with semantic tokens
The Badge now uses border-panel and semantic spacing utilities, ensuring consistent theming.


388-388: Approve unified person avatar container styling
The transition to border-muted-foreground/30 bg-muted/40 aligns with the new CSS variables.


392-396: Avatar fallback and name text use semantic tokens
Both the fallback and name container correctly use text-muted-foreground and related utility classes.


441-441: Subject header uses text-foreground token
Switching to text-foreground ensures the subject respects theming.


457-457: Participants grouping styled with semantic muted text
Using text-muted-foreground for participant names maintains consistency.


531-531: Approve details link styling
The <p> uses text-muted-foreground text-xs underline appropriately for the “Details” trigger.


545-545: Consistent popover info label styling
All metadata labels now use text-muted-foreground/60 w-24 text-end, ensuring uniform appearance.

Also applies to: 569-569, 581-581, 592-592, 601-601, 608-608, 618-618


631-631: Time stamp uses theming token
Switching to text-muted-foreground + semantic font utilities is correct.


636-636: Recipient “To” label styling
text-muted-foreground text-sm font-medium is consistent with new design tokens.


671-671: Recipient “Bcc” label styling
text-muted-foreground text-sm font-medium works well for Bcc recipients.


769-769: Attachment button styling with semantic tokens
Using bg-muted/50 hover:bg-muted aligns with our CSS variable approach.


796-796: Filename span uses text-foreground
Good choice to ensure the file name text adapts to theme.


799-799: Attachment size uses muted semantic text
text-muted-foreground/60 ensures subtle display of file sizes.

apps/mail/components/mail/note-panel.tsx (23)

120-120: Approve standardized note container styling
Replacing hardcoded borders with border-muted aligns with CSS variable refactor.


134-134: Approve note content styling
Using whitespace-pre-wrap break-words text-sm is ideal for rich note content.


138-143: Tooltip styling uses semantic tokens
text-muted-foreground and text-xs maintain consistency, and the popover content layout is unchanged.


179-180: DropdownMenuContent and first item align with new theming
The dropdown now consistently uses semantic styling for all menu items.


184-184: Copy action item styling
<DropdownMenuItem> integration is correct with no regressions.


188-188: Pin/unpin action item styling
Using existing CSS variables for destructive and accent states is fine here.


202-203: Color picker submenu retains semantic tokens
<DropdownMenuSub> and <DropdownMenuSubTrigger> are updated correctly.


207-207: Color picker portal content
The submenu portal remains unaffected; styling is consistent.


211-211: Radio items for colors use semantic border->background mapping
borderToBackgroundColorClass integration is correct.


230-231: Delete action item styling
text-destructive-foreground is used appropriately for the delete action.


533-533: Approve tooltip for notes panel button
The TooltipContent remains consistent with the new CSS variable approach.


540-540: Panel open container uses bg-panel token
Good use of bg-panel to drive the note panel’s background color.


543-544: Header border uses border-muted
Consistent theming for the sticky header is maintained.


567-567: Search icon uses muted-foreground
Appropriate use of text-muted-foreground for search input icons.


573-573: Input uses ring-offset-panel for focus state
This ensures the ring blends with the panel background token.


588-588: Empty state icon styling
text-muted-foreground for the sticky note icon is correct.


590-590: No-match state icon styling
text-muted-foreground is appropriate for the alert icon.


678-678: New note container still uses border + semantic l-color
This matches the existing pattern for SortableNote; no change needed.


697-697: Textarea for new note remains unstyled by color variables
bg-transparent is fine here; new note entry uses parent styling.


723-723: Save-selection ring uses ring-primary
Correct use of the primary accent for selected note color.


776-777: Add note button uses variant="secondary"
Consistent with other “add” buttons; no issues.


791-793: Drag overlay styling with bg-popover + text-popover-foreground
The drag preview now correctly respects panel and text tokens.

Also applies to: 797-797


803-803: Editing footer uses semantic border and text tokens
The edit note footer matches the theming of the rest of the panel.

Also applies to: 806-806, 813-813

danteissaias and others added 7 commits May 7, 2025 17:43
};
iframeRef.current.onload = handler;

requestAnimationFrame(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: this new logic is required to grab the background color from the theme's css variables. When you change theme, this effect re-runs.

@MrgSub
Copy link
Collaborator

MrgSub commented May 16, 2025

@danteissaias i'm sorry we didn't merge but there's lots of conflicts now

@danteissaias
Copy link
Contributor Author

Gonna close this as too many conflicts - will potentially revisit in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants