Skip to content

LIG-10240 Render grouped sample-tag class distributions#1697

Draft
ikondrat wants to merge 1 commit into
kondrat-lig-10247-frontend-reusable-multi-series-bar-chart-primitivefrom
kondrat-lig-10240-frontend-grouped-multi-series-class-distribution-chart
Draft

LIG-10240 Render grouped sample-tag class distributions#1697
ikondrat wants to merge 1 commit into
kondrat-lig-10247-frontend-reusable-multi-series-bar-chart-primitivefrom
kondrat-lig-10240-frontend-grouped-multi-series-class-distribution-chart

Conversation

@ikondrat

Copy link
Copy Markdown
Contributor

Summary

  • convert grouped backend responses into named sample-tag chart series
  • aggregate selected tag counts only for shared-axis ranking and top-N/manual selection
  • keep each tag's values independent in the rendered bars, including zero counts
  • pass the visible series into both the panel and expanded distribution dialog
  • replace the misleading combined annotation/sample total with a sample-tag count summary
  • preserve the existing single-series and histogram paths

Stack

Testing instructions

  1. Check out this branch with the preceding stack.
  2. Run:
    cd lightly_studio_view
    make static-checks
    npm run test:unit -- --run \
      src/lib/components/DatasetDistributionPanel/DatasetDistributionPanel.test.ts \
      src/lib/components/DatasetDistributionPanel/ExpandDialog/ExpandDialog.test.ts \
      src/lib/components/DatasetDistributionPanel/PanelHeader/PanelHeader.test.ts \
      src/lib/components/DatasetDistributionPanel/selectVisibleCounts.test.ts
  3. Open an image collection with overlapping sample tags and select two or more tags under Compare by.
  4. Verify each tag appears as a separate legend/tooltip series for All types and every available annotation-type group.
  5. Check top-N, manual class selection, count sorting, both orientations, and expanded view.
  6. Verify a missing tag/class value renders as zero and overlapping tags are not combined.
  7. Clear the selection and verify the original single-series distribution and total return unchanged.

Validation

  • make static-checks: passed
  • 46 focused unit tests: passed

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e9529547-15f1-4e83-872a-554b72b3bafa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kondrat-lig-10240-frontend-grouped-multi-series-class-distribution-chart

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant