-
Notifications
You must be signed in to change notification settings - Fork 122
3495 - Replace badges in Shared & Core Components #3537
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
base: master
Are you sure you want to change the base?
Conversation
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 migrates badge components from the old @/components/ui/badge implementation to the new @/components/Badge/Badge component as part of fixing issue #3495. The changes update the API from the old variant prop to the new styleType and label props while maintaining the same visual appearance.
- Replaced Badge imports in EnvironmentBadge and WorkflowExecutionBadge components
- Updated prop API from
varianttostyleTypewith appropriate style mappings - Added
weight="semibold"to EnvironmentBadge to preserve original font weight
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| client/src/shared/components/EnvironmentBadge.tsx | Migrated to new Badge component with outline-outline and secondary-filled styles, added semibold weight |
| client/src/shared/components/workflow-executions/WorkflowExecutionBadge.tsx | Migrated to new Badge component with success-outline, destructive-filled, and secondary-filled styles based on execution status |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
client/src/shared/components/workflow-executions/WorkflowExecutionBadge.tsx
Outdated
Show resolved
Hide resolved
client/src/components/JsonSchemaBuilder/components/SchemaControls.tsx
Outdated
Show resolved
Hide resolved
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.
switch/case je bolji pristup nego ovaj getter.
ode imaš situaciju da deklariraš funkciju getStyleType koja konzumira status iz djelokruga komponente, a može se dogoditi (slučajno, radi bug-a, ili race condition-a) da vrijednost statusa nije dobro sinkronizirana. Pravilno bi bilo da getStyleType prima status argument (i da bude memoizirano ili u useCallback-u) tako da svako izvršavanje getStyleType funkcije ima pravilan status.
red flag ti može biti kad primjetiš invokaciju funkcije unutar propa (styleType={getStyleType()}) - ovo ne radimo u pravilu na ovaj način
…orkflowExecutionBadge.tsx
|


Description
Fixes #3495
Files: