Skip to content

ECHOES-1368 Add BadgeCounter Accent variety#702

Open
gregaubert wants to merge 1 commit into
mainfrom
greg/badge-counter-accent
Open

ECHOES-1368 Add BadgeCounter Accent variety#702
gregaubert wants to merge 1 commit into
mainfrom
greg/badge-counter-accent

Conversation

@gregaubert

@gregaubert gregaubert commented Jun 12, 2026

Copy link
Copy Markdown
Member

Part of


Summary by Gitar

  • New feature:
    • Added BadgeCounterVariety enum to support default and accent visual styles.
    • Implemented variety prop in BadgeCounter to apply corresponding CSS variables.
  • Refactoring:
    • Updated BadgeCounter to use a standard component function instead of forwardRef.
    • Added BADGE_COUNTER_VARIETY_STYLES to manage component style variants via CSS variables.
  • Documentation & Testing:
    • Added an Accent story in BadgeCounter-stories.tsx for visual verification.
    • Expanded test coverage in BadgeCounter-test.tsx to validate both varieties and accessibility.

This will update automatically on new commits.

@netlify

netlify Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploy Preview for echoes-react ready!

Name Link
🔨 Latest commit ed75237
🔍 Latest deploy log https://app.netlify.com/projects/echoes-react/deploys/6a2c1587922e070008fb67db
😎 Deploy Preview https://deploy-preview-702--echoes-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Jun 12, 2026

Copy link
Copy Markdown

ECHOES-1368

Comment thread src/components/badges/BadgeCounter.tsx
@gitar-bot

gitar-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Introduces a new accent variety for the BadgeCounter component with accompanying stories and test coverage. Note that removing forwardRef deviates from the existing component pattern used by sibling badges.

✅ 1 resolved
Quality: BadgeCounter diverges from forwardRef pattern used by sibling badges

📄 src/components/badges/BadgeCounter.tsx:45-52
This PR migrates BadgeCounter from forwardRef to a plain function component that receives ref as a regular prop (valid in React 19.2.4). However, the sibling components in the same directory — Badge.tsx (forwardRef at ~line 87) and BadgeSeverity.tsx (forwardRef at ~line 105) — still use the forwardRef pattern. This introduces an inconsistency within the badges module. It's functionally correct, but consider either keeping forwardRef here for consistency, or planning to migrate the sibling components too so the codebase stays uniform.

File: src/components/badges/BadgeCounter.tsx:45-52

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqube-next

Copy link
Copy Markdown

@gregaubert gregaubert marked this pull request as ready for review June 12, 2026 15:18

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

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.

2 participants