feat: FIT-1433: Consolidate Badge component#9465
feat: FIT-1433: Consolidate Badge component#9465ricardoantoniocm wants to merge 27 commits intodevelopfrom
Conversation
- Add support for semantic variant aliases (primary/info, neutral/secondary/default, etc.) - Add direct accent color support (grape, kale, persimmon, etc.) - Implement style variants: filled, outline, ghost, solid - Add shape variants: square (default), rounded - Add size variants: medium (default), small (with compact fallback) - Add gradient variant with IconSpark icon support - Update Storybook stories with comprehensive examples - Remove deprecated examples from stories Co-authored-by: Cursor <cursoragent@cursor.com>
- Update imports to use new Badge component and types - Change default variant from 'info' to 'primary' - Change default shape from 'squared' to 'square' - Add support for style and size props - Use Tailwind classes instead of inline styles for hiding badges Co-authored-by: Cursor <cursoragent@cursor.com>
- Convert EnterpriseBadge to a wrapper around Badge with variant='gradient' - Add deprecation JSDoc with migration guide - Map EnterpriseBadge props to Badge props (filled/ghost -> style, compact -> size) Co-authored-by: Cursor <cursoragent@cursor.com>
… Badge component - Replace Tag components with Badge for column type indicators - Update Table.jsx columnHeaderExtra to use Badge with primary variant - Update TableHead.jsx dropdown menu to use Badge for type selection - Use square shape and small size for data type badges - Update enterprise badge to use small size instead of deprecated compact Co-authored-by: Cursor <cursoragent@cursor.com>
…component - Replace Tag components with Badge for parent field data types - Replace EnterpriseBadge with Badge variant='gradient' style='ghost' - Use square shape and small size for data type badges - Remove unused Tag import Co-authored-by: Cursor <cursoragent@cursor.com>
- Update FieldsButton to use Badge variant='gradient' style='ghost' - Update ActionsButton to use Badge variant='gradient' style='ghost' - Update OrderButton to use Badge variant='gradient' style='ghost' - Replace EnterpriseBadge references with Badge component Co-authored-by: Cursor <cursoragent@cursor.com>
…onent - Add tooltip to Enterprise badge in GeneralSettings for Uncertainty sampling - Replace EnterpriseBadge with Badge variant='gradient' in storage providers - Update azure_spi, databricks, gcswif, and s3s storage providers Co-authored-by: Cursor <cursoragent@cursor.com>
- Replace styled div tags with Badge component for export format labels - Map tag text to appropriate variants (enterprise->gradient, beta->plum, new->positive) - Use square shape and small size for format type badges Co-authored-by: Cursor <cursoragent@cursor.com>
…tion - Update CreateProject pages to use Badge variant='gradient' - Update Custom tag component to use Badge variant='gradient' - Update enterprise-upgrade-overlay to use Badge variant='gradient' - Remove unused SCSS styles Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… Badges and other color-coded components.
- Use design tokens in spark icon SVG and badge gradient styles - Add optional icon prop to Badge; gradient badge no longer auto-injects IconSpark - Align badge variant colors to subtle/dark palette - Remove shadcn Badge from shadcn re-exports Co-authored-by: Cursor <cursoragent@cursor.com>
… state chips - Add getStateVariant() and STATE_TYPE_VARIANTS in state-registry - Deprecate getStateColorClass() / getStyleClasses() in favor of variant - Annotation, project, and task state chips use variant prop - StateChip (ui) accepts variant instead of className Co-authored-by: Cursor <cursoragent@cursor.com>
- EnterpriseBadge and EnterpriseUpgradeOverlay use Badge + icon - Update deprecation migration guide to include icon - TemplatesList, CreateProject, GeneralSettings, FilterLine, Table, Custom: use Badge variant=gradient with icon=<IconSpark /> for Enterprise Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
✅ Deploy Preview for label-studio-docs-new-theme ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for heartex-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
/git merge
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #9465 +/- ##
===========================================
- Coverage 68.32% 60.74% -7.58%
===========================================
Files 1162 885 -277
Lines 68984 43766 -25218
Branches 11780 11509 -271
===========================================
- Hits 47133 26587 -20546
+ Misses 21844 17172 -4672
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This pull request consolidates Badge component implementations by migrating from a legacy local Badge component to the standardized UI library Badge component across the application, with updated variant naming and styling properties.
Screenshots
This pull request also updates the way "Enterprise" features are visually marked throughout the application by replacing the deprecated
EnterpriseBadgecomponent with the more flexibleBadgecomponent, often enhanced with theIconSparkicon. It also introduces improvements to how feature tags are displayed and updates several color design tokens for consistency and accessibility.Enterprise Badge Replacement and UI Consistency:
Replaced all instances of
EnterpriseBadgewith the newBadgecomponent, using thegradientvariant and theIconSparkicon, in project creation, settings, and storage provider configuration files (CreateProject.jsx,TemplatesList.jsx,GeneralSettings.jsx, and all storage provider files). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]Updated the display of feature tags in export formats to use the
Badgecomponent with dynamic variants (e.g., "Enterprise" usesgradient, "Beta" usesplum, "New" usespositive) for improved clarity and consistency (ExportPage.jsx). (F313ada9L1, web/apps/labelstudio/src/pages/ExportPage/ExportPage.jsxL232-R249)Design Token and Style Enhancements:
Adjusted several accent color tokens in
design-tokens.jsonforgrape,blueberry,kale, andkiwito use new values and added newsubtlervariants for each, improving accessibility and visual consistency across light and dark modes. [1] [2] [3] [4] [5] [6] [7] [8]Minor style tweak for label line height in workspace placeholder for better text alignment (
settings.scss).