Add Badge component and integrate into DashboardFilters; update exports#699
Open
owohdora-stack wants to merge 5 commits into
Open
Add Badge component and integrate into DashboardFilters; update exports#699owohdora-stack wants to merge 5 commits into
owohdora-stack wants to merge 5 commits into
Conversation
|
@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! 🚀 |
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. |
…into chore-badge-system-408
…stack/teachLink_web into chore-badge-system-408
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.
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— ReusableBadgecomponent using CVA (class-variance-authority) with 6 variants (default,success,warning,danger,info,outline), 3 sizes (sm,md,lg), and optional dismissible functionality viaonRemoveprop. Follows the same pattern asButton.tsxwith 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— AddedBadge,badgeVariants,BadgePropsexports.src/components/index.ts— AddedBadge,badgeVariants,BadgePropsexports.src/components/dashboard/DashboardFilters.tsx— Replaced inline active time range filter badge with the reusableBadgecomponent, leveraging built-in dismiss functionality and accessibility.Testing