Skip to content

fix: separate dashboard and browser bookmarks; fix light theme contrast#143

Open
rudra-chothe wants to merge 1 commit into
AshutoshDash1999:masterfrom
rudra-chothe:fix/bookmarks-data-separation
Open

fix: separate dashboard and browser bookmarks; fix light theme contrast#143
rudra-chothe wants to merge 1 commit into
AshutoshDash1999:masterfrom
rudra-chothe:fix/bookmarks-data-separation

Conversation

@rudra-chothe

@rudra-chothe rudra-chothe commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes Issue #122

This PR fixes two issues:

1. Bookmarks data source separation

The BookmarksSection component was only reading from useBrowserBookmarks() (Chrome extension API), completely ignoring the bookmarks: BookmarkItem[] list managed by DashboardStateProvider. This meant app-saved bookmarks (persisted in localStorage) were never shown in the UI.

Changes:

  • BookmarksSection now renders two distinct sections:
    • Bookmarks — dashboard-managed saved bookmarks from useDashboardState(), always visible, with inline add and delete support
    • Browser Bookmarks — Chrome API bookmarks (read-only, hidden entirely in dev mode)
  • New SavedBookmarkItem component handles rendering of individual saved bookmarks with favicon, link, and delete button

2. Light theme contrast and card styling

All dashboard cards (glass-card) remained dark gray in light mode, and most interactive elements used hardcoded white/* opacity classes making them invisible on a light background.

Changes:

  • .glass-card now uses a light/translucent background in light mode and dark/translucent in dark mode
  • Stoic quote text (text-white) → text-foreground; author (text-white/50) → text-muted-foreground
  • All bg-white/5, border-white/5, hover:bg-white/5, hover:bg-white/10foreground/* equivalents across DashboardHeader, TasksSection, TechNewsSection, BookmarksSection, TaskItem, SavedBookmarkItem
  • Shortcut label text color made adaptive via var(--foreground)

Type of Change

  • Bug fix
  • UI polish

Screenshots / Screen Recording

image

Toggle between light and dark mode on the dashboard to observe:

  • Cards change from dark-on-light to glass-dark-on-dark
  • Quote text is clearly readable in both modes
  • Bookmarks section shows saved bookmarks in both modes, browser bookmarks only in extension mode

How to Test

  1. Run npm run dev and open http://localhost:5173
  2. Saved Bookmarks — Confirm 4 default bookmarks (Design reference, Typography, Color & contrast, Documentation) are visible
  3. Add bookmark — Click + → enter a URL → press Save or Enter → item appears
  4. Delete bookmark — Hover a row → click the 🗑️ icon → item disappears
  5. Persistence — Reload the page and confirm added/deleted bookmarks are preserved in localStorage
  6. Browser Bookmarks — Confirm the "Browser Bookmarks" section is not shown in dev mode (correct — Chrome API unavailable)
  7. Light theme — Click the theme toggle to switch to light mode; confirm all card backgrounds, text, buttons, and borders are clearly visible with proper contrast
  8. Dark theme — Switch back and confirm dark mode appearance is unchanged

Checklist

  • I linked the related issue, if one exists.
  • I assigned myself before opening the PR, if required.
  • npm run lint passes.
  • npm run typecheck passes.
  • npm run build succeeds.
  • I reviewed my own changes before requesting review.
  • I did not change unrelated files.
  • I updated documentation if needed.

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.

1 participant