Repository navigation
fix: add warning badge variant for accessible paused-status contrast - #66
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes paused subscription badge being invisible in dark mode by introducing a theme-safe
warningbadge variant.Root cause: The paused badge used
bg-yellowandtext-yellowclasses, but no--color-yellowCSS variable is defined inapp/globals.css. This left the badge with no background, making black text invisible on dark backgrounds.Solution: Added a new
warningbadge variant to the badge component that uses existing, theme-aware--warningand--warning-bgtokens (identical to howincome,expense,savingsvariants work — one consistent set of values across both light and dark themes, with transparency for proper contrast).Changes:
components/ui/badge.tsx: Addedwarningvariant withbg-warning-bg text-warning border-warning/20classescomponents/dashboard/subscriptions-tab.tsx: Updated paused subscription status to usevariant="warning"instead of hardcodedbg-yellowclassescomponents/ui/__tests__/badge.test.tsx: Added test case for the new warning variantType of Change
Testing
pnpm run lint— passespnpm run build— passespnpm run test— passes (new badge warning variant test + subscriptions-tab tests)Supabase / Database
supabase/migrationsSecurity Checklist
user_metadatais not used for authorization decisionsNotes
The
warningvariant 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.