Skip to content

fix: add warning badge variant for accessible paused-status contrast - #66

Merged
fsousac merged 1 commit into
developfrom
fix/59-paused-badge-contrast
Sep 23, 2026
Merged

fsousac merged 1 commit into
developfrom
fix/59-paused-badge-contrast

Conversation

@fsousac

@fsousac fsousac commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes paused subscription badge being invisible in dark mode by introducing a theme-safe warning badge variant.

Root cause: The paused badge used bg-yellow and text-yellow classes, but no --color-yellow CSS variable is defined in app/globals.css. This left the badge with no background, making black text invisible on dark backgrounds.

Solution: Added a new warning badge variant to the badge component that uses existing, theme-aware --warning and --warning-bg tokens (identical to how income, expense, savings variants work — one consistent set of values across both light and dark themes, with transparency for proper contrast).

Changes:

  • components/ui/badge.tsx: Added warning variant with bg-warning-bg text-warning border-warning/20 classes
  • components/dashboard/subscriptions-tab.tsx: Updated paused subscription status to use variant="warning" instead of hardcoded bg-yellow classes
  • components/ui/__tests__/badge.test.tsx: Added test case for the new warning variant

Type of Change

  • Bug fix
  • Feature
  • Documentation
  • Security hardening
  • Database migration
  • Refactor

Testing

  • pnpm run lint — passes
  • pnpm run build — passes
  • pnpm run test — passes (new badge warning variant test + subscriptions-tab tests)
  • Manual testing completed

Supabase / Database

  • No database changes
  • Migration added under supabase/migrations
  • RLS impact reviewed

Security Checklist

  • No secrets committed
  • Server Action inputs are validated
  • User-owned records are scoped by authenticated user ID
  • user_metadata is not used for authorization decisions

Notes

The warning variant follows the same CSS variable pattern as existing badge variants (income, expense, etc.). The paused status is now consistent with the app's overall theme-aware badge design and visible in both light and dark modes.

@fsousac fsousac self-assigned this Sep 23, 2026
@vercel

vercel Bot commented Sep 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
dragg-finance Ignored Ignored v0 Sep 23, 2026 3:04pm UTC

@fsousac fsousac linked an issue Sep 23, 2026 that may be closed by this pull request
4 tasks
@fsousac
fsousac merged commit 965d7fc into develop Sep 23, 2026
13 of 15 checks passed
@fsousac
fsousac deleted the fix/59-paused-badge-contrast branch September 23, 2026 15:18
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.

Fix paused subscription status badge visibility in dark mode

1 participant