Skip to content

Add Badge component and integrate into DashboardFilters; update exports#699

Open
owohdora-stack wants to merge 5 commits into
rinafcode:mainfrom
owohdora-stack:chore-badge-system-408
Open

Add Badge component and integrate into DashboardFilters; update exports#699
owohdora-stack wants to merge 5 commits into
rinafcode:mainfrom
owohdora-stack:chore-badge-system-408

Conversation

@owohdora-stack

Copy link
Copy Markdown

Closes #408

Summary

Created a reusable Badge component system and integrated it into the Dashboard Customization features, replacing ad-hoc inline badge implementations with a standardized, accessible component.

Changes

New Files:

  • src/components/ui/Badge.tsx — Reusable Badge component using CVA (class-variance-authority) with 6 variants (default, success, warning, danger, info, outline), 3 sizes (sm, md, lg), and optional dismissible functionality via onRemove prop. Follows the same pattern as Button.tsx with dark mode support and accessible remove button.
  • src/components/ui/__tests__/Badge.test.tsx — 10 unit tests covering all variants, sizes, dismissible behavior, custom className, aria attributes, and displayName.

Modified Files:

  • src/components/ui/index.ts — Added Badge, badgeVariants, BadgeProps exports.
  • src/components/index.ts — Added Badge, badgeVariants, BadgeProps exports.
  • src/components/dashboard/DashboardFilters.tsx — Replaced inline active time range filter badge with the reusable Badge component, leveraging built-in dismiss functionality and accessibility.

Testing

  • Badge component: 10/10 tests pass
  • Dashboard filters: all existing tests pass
  • No regression in existing functionality (all pre-existing test failures are unrelated)

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@owohdora-stack Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Great job so far

There’s just one blocker — the workflow is failing. Could you take a look and fix it so all checks pass?

Happy to review again once that’s done.
You can pull from the main first before pushing. The workflow should pass

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.

chore Badge System : Dashboard Customization

3 participants