Skip to content

feat: BROS-44: Add MultiChannel tag support for TimeSeries #7669

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

Merged
merged 38 commits into from
Jun 9, 2025

Conversation

Gondragos
Copy link
Collaborator

@Gondragos Gondragos commented Jun 2, 2025

Add the ability to group channels into one plot.

Before

image

After

Screen Recording 2025-06-02 at 07 41 47


Summary of the Pull Request

This PR introduces key updates designed to enhance the functionality of the TimeSeries component through new features.

Feature Flags:

Added FF_MULTICHANNEL_TS feature flag to enable multi-channel visualization for TimeSeries.

New Features:

  • Introduction of TimeSeriesVisualizer Component: A React-based D3-powered visualization component to support single-channel and multi-channel TimeSeries data rendering. Based on Channel renderer with the addition of the ability to handle more than one channel at the same plot.
  • MultiChannel Support: Added MultiChannel tag for grouped rendering of multiple channels in TimeSeries with interactions for individual channel highlighting, hiding, and customization (ChannelLegend added for UI).
  • Add legend to MultiChanel, that allows highlighting and hiding specific channels.
  • Dynamic adjusting default colors for channels based on their index in MultiChannel or Timeseries

Feature Enhancements:

  • Modified TimeSeries tag and Channel to support grouped multi-channel visualization.
  • Added new computed properties (channelsMap, channels) for efficient channel management.

Rollout Strategy:

The critical changes are gated under the FF_MULTICHANNEL_TS feature flag.

Gondragos added 3 commits June 2, 2025 07:20
- Introduced a feature flag `FF_MULTICHANNEL_TS` to enable multi-channel functionality in the TimeSeries component.
- Added new tag `MultiChannel` for grouping channels on one plot.
- Added `ChannelLegend` and `TimeSeriesVisualizer` components for improved visualization and interaction.
- Updated the `Channel` model and several associated functionalities to support multi-channel rendering.
@Gondragos Gondragos requested review from a team, hlomzik and nick-skriabin as code owners June 2, 2025 06:29
Copy link

netlify bot commented Jun 2, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit e6fc826
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/6846ef10040e8100086bb8b4

Copy link

netlify bot commented Jun 2, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit e6fc826
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/6846ef10af08160008364110
😎 Deploy Preview https://deploy-preview-7669--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Jun 2, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit e6fc826
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/6846ef1026fe72000863e641

@github-actions github-actions bot added the feat label Jun 2, 2025
Copy link

netlify bot commented Jun 2, 2025

Deploy Preview for label-studio-playground ready!

Name Link
🔨 Latest commit e6fc826
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/6846ef103bd8ce00083803e4
😎 Deploy Preview https://deploy-preview-7669--label-studio-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

- Introduced a palette of color tokens for consistent styling.
- Added functionality to assign colors dynamically to stroke and marker properties of channels.
- Updated `MultiChannel` and `TimeSeries` components to utilize the new dynamic color logic.
@Gondragos Gondragos marked this pull request as draft June 2, 2025 08:26
@Gondragos Gondragos marked this pull request as ready for review June 2, 2025 08:26
@Gondragos Gondragos enabled auto-merge (squash) June 3, 2025 17:39
@Gondragos Gondragos disabled auto-merge June 3, 2025 17:39
@Gondragos
Copy link
Collaborator Author

Gondragos commented Jun 5, 2025

/git merge

Workflow run
Successfully merged: rename web/libs/{datamanager/src => core/src/lib}/utils/urlJSON.ts (100%)

Copy link

codecov bot commented Jun 6, 2025

Codecov Report

Attention: Patch coverage is 6.89655% with 27 lines in your changes missing coverage. Please review.

Project coverage is 78.84%. Comparing base (a351c5f) to head (e6fc826).
Report is 3 commits behind head on develop.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
label_studio/core/label_config.py 6.89% 27 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7669      +/-   ##
===========================================
- Coverage    78.94%   78.84%   -0.11%     
===========================================
  Files          205      205              
  Lines        16314    16336      +22     
===========================================
+ Hits         12879    12880       +1     
- Misses        3435     3456      +21     
Flag Coverage Δ
pytests 78.84% <6.89%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Gondragos added 6 commits June 6, 2025 08:30
Added fallback logic to set `value_type` as "url" when not specified for TimeSeries. This ensures proper handling of cases where the `valueType` is undefined, improving consistency in processing.
Updated `MultiChannel` and `TimeSeriesVisualizer` components to correctly respect the `fixedscale` property when defined at various levels. Added logic to handle inheritance of the `fixedscale` value to ensure proper scaling behavior within nested structures.
Corrected the equality check for `value_type` from `== None` to `is None`. This change ensures adherence to Python best practices and improves code reliability.
…nto develop

# Conflicts:
#	web/libs/core/src/lib/utils/feature-flags/flags.ts
@hlomzik hlomzik requested review from makseq, bmartel and niklub June 9, 2025 08:33
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These colours won't be dark mode compatible as they are from the primitive colour collections.

We have a dark mode compatible collection accent of the colours here:

https://labelstud.io/storybook/?path=/story/design-tokens--tokens-catalog

We should likely aim for base of each color type, with sand using bold

Copy link
Contributor

@bmartel bmartel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the colours need to be updated to be dark mode compatible which I left suggestions for each, rest looks awesome!

Fix colors

Co-authored-by: bmartel <[email protected]>
@Gondragos
Copy link
Collaborator Author

Gondragos commented Jun 9, 2025

/fmt

Workflow run

@makseq makseq enabled auto-merge (squash) June 9, 2025 14:42
@makseq makseq merged commit 75d219a into develop Jun 9, 2025
53 of 55 checks passed
@makseq makseq deleted the fb-BROS-44/multichannel branch June 9, 2025 14:44
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.

6 participants