-
-
Notifications
You must be signed in to change notification settings - Fork 86
Node Badges #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node Badges #347
Conversation
✅ Deploy Preview for reagraph ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
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 introduces a new Badge component for displaying overlay information on graph nodes, such as counts or status indicators. The Badge component is designed to be positioned relative to nodes and supports customizable styling and animations.
- Adds a new Badge component with configurable colors, sizes, and positioning
- Creates comprehensive Storybook demos showcasing different Badge configurations
- Updates demo data to include count values for testing Badge functionality
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/symbols/nodes/Badge.tsx | Main Badge component implementation with dynamic sizing and positioning |
| src/symbols/nodes/index.ts | Exports the new Badge component |
| stories/demos/Badge.story.tsx | Storybook demos showing Badge usage scenarios |
| stories/assets/demo.ts | Adds count data to demo nodes for Badge testing |
Comments suppressed due to low confidence (1)
src/symbols/nodes/Badge.tsx:42
- The default value of 1.5 for badgeSize is misleading since the prop description says it's a 'size multiplier relative to the node size', but looking at line 78, it's actually used as a multiplier. Consider renaming to 'sizeMultiplier' or updating the default to a more intuitive value like 0.25.
badgeSize = 1.5,
Uh oh!
There was an error while loading. Please reload this page.