Skip to content

chore: update metrics badge component#35

Merged
shelegdmitriy merged 1 commit into
masterfrom
chore/update-metrics-badge-component
Nov 11, 2025
Merged

chore: update metrics badge component#35
shelegdmitriy merged 1 commit into
masterfrom
chore/update-metrics-badge-component

Conversation

@shelegdmitriy

Copy link
Copy Markdown
Member

This pull request updates the MetricsBadge component to improve its type safety, default props, and loading state display. The most important changes are grouped below:

Type improvements:

  • Updated the icon prop type to use the Icon type from @phosphor-icons/react for better type safety and consistency.

Props and default values:

  • Added default values for the variant and loading props ('desktop' and false, respectively) to simplify usage and prevent undefined behavior.

Loading state UI:

  • Refactored the loading state to display a consistent skeleton UI with animated placeholders, improving the user experience during data fetching.

@shelegdmitriy
shelegdmitriy temporarily deployed to chore/update-metrics-badge-component - asimov.directory PR #35 November 11, 2025 21:57 — with Render Destroyed

Copilot AI left a comment

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.

Pull Request Overview

This PR refactors the MetricsBadge component to enhance type safety, streamline default behavior, and improve the loading state presentation with a more polished skeleton UI.

Key changes:

  • Switched icon type from generic React component type to the stricter Icon type from @phosphor-icons/react
  • Added default values for variant ('desktop') and loading (false) props
  • Refactored loading UI with early return pattern and improved skeleton design featuring animated placeholders

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/MetricsBadge.tsx
@shelegdmitriy
shelegdmitriy merged commit bc41ea1 into master Nov 11, 2025
7 checks passed
@shelegdmitriy
shelegdmitriy deleted the chore/update-metrics-badge-component branch November 11, 2025 22:00
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