Skip to content

feat: Add color preview circles to annotation group items#344

Merged
igoroctaviano merged 2 commits intomasterfrom
feat/319
Oct 23, 2025
Merged

feat: Add color preview circles to annotation group items#344
igoroctaviano merged 2 commits intomasterfrom
feat/319

Conversation

@igoroctaviano
Copy link
Collaborator

@igoroctaviano igoroctaviano commented Oct 23, 2025

Screenshot 2025-10-23 at 16 45 00

Summary

This PR adds color preview circles to annotation group items in the UI, providing visual indicators for each annotation group's color. This matches the existing design pattern used for segmentation items and improves user experience by making it easier to identify different annotation groups at a glance.

Changes

  • Enhanced AnnotationGroupItem component: Added color preview functionality
  • Updated AnnotationGroupControls component:
    • Added color parameter and color preview circle
    • Fixed alignment to center all controls (eye switch, settings button, color preview)
  • Imported color utilities: Added rgbToHex import from segmentColors.ts for consistent color formatting
  • Maintained design consistency: Follows the same pattern as SegmentItem color previews

Technical Details

  • Added 20px circular color indicator with:
    • Subtle border styling (1px solid #d9d9d9)
    • Tooltip showing hex color value
    • Proper alignment with other controls
  • Updated component interfaces to include color parameter
  • Color preview automatically reflects the current annotation group color (including colors extracted from DICOM metadata)

UI Improvements

  • Visual consistency: Color previews match the design pattern used for segmentation items
  • Better alignment: All controls (switch, settings button, color preview) are properly centered and aligned
  • Enhanced usability: Users can quickly identify annotation group colors without opening settings
  • Accessibility: Color previews include descriptive tooltips with hex color values

Benefits

  • Improved visual hierarchy: Users can distinguish between annotation groups more easily
  • Consistent UX: Aligns annotation group UI with existing segmentation item design
  • Better accessibility: Clear visual indicators for color information
  • Enhanced workflow: Faster identification of annotation groups during annotation review

Testing

  • No linting errors introduced
  • Component compiles successfully
  • Color previews display correctly with proper alignment
  • Tooltips show accurate color information

@deepsource-io
Copy link

deepsource-io bot commented Oct 23, 2025

Here's the code health analysis summary for commits aaf7bf5..45bfb56. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@sonarqubecloud
Copy link

@igoroctaviano igoroctaviano merged commit eb61284 into master Oct 23, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant