[WEB-55] Daily view site change events#553
Open
clintonium-119 wants to merge 4 commits into
Open
Conversation
Render one icon per site-change deviceEvent of the subtype the clinician selected, in the Daily events pool, reusing the Basics sprites and their manufacturer-specific iconography (loop and twiist variants). Site changes within 5 minutes of one another collapse to a single icon, anchored on the last kept icon, per the WEB-55 done criteria. Hovers reuse the deviceEvent tooltip channel so viz's EventTooltip handles them. Wiring: - js/plot/sitechange.js: new, asset-agnostic plot module; the icon URL map is injected via opts so js/ stays free of plugins/ imports. - chartdailyfactory.js: requires the Basics sprites, injects them, and adds the plot to the events pool last (top z-order), gated on options.siteChangeSource. - js/index.js: register tideline.plot.siteChange. Dormant until blip threads options.siteChangeSource. Unit-tested in test/plot/sitechange.test.js.
This was referenced Jun 25, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for rendering infusion site-change events (cannula/tubing/reservoir, including Loop/twiist icon variants) on the Daily view, using the same hover/tooltip channel as existing event icons.
Changes:
- Introduces a new
tideline.plot.siteChangeplot module that filters + dedupes site-changedeviceEvents and renders the appropriate icon. - Wires the new plot into
plugins/blip/chartdailyfactory.js, gated by the Basics site-change source selection and painted last in the events pool. - Adds unit tests covering icon selection, filtering/deduping, rendering gating, and hover payload shape.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/plot/sitechange.test.js | New unit tests for site-change plot behavior (icon mapping, dedupe, rendering, hover callbacks). |
| plugins/blip/chartdailyfactory.js | Loads site-change icon assets and adds the new site-change plot to the Daily events pool when selected. |
| package.json | Bumps package version for the WEB-55 change set. |
| js/plot/sitechange.js | New plot implementation for rendering site-change icons with 5-minute deduplication and tooltip/hover integration. |
| js/index.js | Exposes the new plot as tideline.plot.siteChange. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WEB-55
Related PRs:
tidepool-org/blip#1965
tidepool-org/viz#651