Skip to content

Conversation

@cgreening
Copy link
Contributor

@cgreening cgreening commented Oct 1, 2025

Summary

Adds the ability to hide and show traxces.

Motivation & Context

Closes #14

Changes

Adds a checkbox to the stats panels that lets you turn traces off and on.

Screenshots / Demos (if UI)

Screenshot 2025-10-01 at 22 29 34

How to Test

  1. Start plotting
  2. Click the checkbox on the stats panel on and off

Checklist

  • I ran npm run lint and fixed any issues
  • I ran npm run typecheck (TypeScript) with no errors
  • I ran npm test and tests pass
  • I ran npm run test:coverage if code paths changed significantly
  • I added/updated tests where appropriate
  • I updated docs/README if needed
  • No breaking changes without clear migration notes

Additional Notes

I thought about doing this in the legend, but felt that might get a bit busy.

@cgreening cgreening requested a review from Copilot October 1, 2025 21:30
@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
web-serial-plotter a288e2c Commit Preview URL

Branch Preview URL
Oct 01 2025, 09:29 PM

Copy link

Copilot AI left a 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 adds the ability to hide and show individual plot traces by introducing a visible property to series data and updating the UI to provide checkboxes in the stats panels. This allows users to selectively display only the traces they want to see.

  • Adds a visible: boolean property to the PlotSeries interface
  • Updates plot rendering logic to skip hidden series in drawing and y-axis calculations
  • Adds checkboxes to stats panels for toggling trace visibility with visual feedback

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/types/plot.ts Adds visible boolean property to PlotSeries interface
src/store/RingStore.ts Implements visibility toggling functionality and excludes hidden series from y-range calculations
src/utils/plotRendering.ts Updates drawing functions to skip hidden series
src/components/StatsPanel.tsx Adds visibility checkboxes and conditional stats computation
src/components/Legend.tsx Filters legend to only show visible series
Test files Updates test data to include the new visible property

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cgreening cgreening merged commit 72d79a9 into main Oct 1, 2025
7 checks passed
@cgreening cgreening deleted the feature/hide-show-traces branch October 1, 2025 21:35
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.

[Feature]: Hide data streams

2 participants