FetchTimeseries: feature clicks to chart-series events - #294
Open
BhattaraiSijan wants to merge 11 commits into
Open
FetchTimeseries: feature clicks to chart-series events#294BhattaraiSijan wants to merge 11 commits into
BhattaraiSijan wants to merge 11 commits into
Conversation
This was referenced Aug 10, 2026
…he click
{lon}/{lat} fall back to the event latlng (vector-tile features carry empty geometry, so the placeholders threw on every click); {properties.*} takes nested dot-paths and rejects non-scalars. Wrong configured keys blame the config, not the API; paginated responses mark the title with first-N-of-M; xType is configurable so year columns stop charting as 1970; colliding slugs get suffixed ids; parallel arrays work at the response root as documented; container detection prefers populated arrays and key sampling skips leading metadata rows.
seriesReady drops its envelope to match the #293 contract. Fetches time out after 30s; destroy() emits seriesCleared so no spinner or stale card is stranded (the contract's first real seriesCleared emitter); the async click handler is caught and layers:getConfig goes through a hasHandler-guarded typed wrapper, so clicks during mission load are silent no-ops instead of unhandled rejections. First tests for the tool's I/O layer (mock bus + fetch): supersede, timeout, teardown, HTTP/template errors.
on:true in the profile, plus metadata startHidden/modernLayoutSupport so the no-UI tool loads and subscribes without rendering a blank tool card. With #293's enable, the end-to-end click-to-chart path now runs from a clean checkout. Config descriptions corrected alongside.
Collaborator
Author
|
Addressed the review findings on this PR (branch re-based-by-merge on the updated feat/series-chart):
|
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.
Summary
Adds FetchTimeseries, a no-UI plugin bridging
feature:clickto the chart-series contract: on a vector feature click it reads the layer'svariables.timeseriesblock over the bus (layers:getConfig), templates the fetch URL from the clicked feature ({properties.<key>},{id},{lon},{lat}— unresolvable placeholders surface as named errors, not silent no-ops), fetches with abort-on-supersede, normalizes the response, and emitsplugin:fetch-timeseries:*events for SeriesChart.Normalization handles both response shapes the VEDA features API serves under content negotiation — GeoJSON FeatureCollections and flat rows — via loose
properties.-prefix path resolution, plusgroupBy(one series per parameter),unitKey, and auto-detected time/value keys.Layers opt in per mission config; clicks on layers without the block do nothing.
enabled: falsedisables without deleting. Charts persist until the next click replaces them (singlechartId). The README documents the config schema and a working EPA AQS demo.Merge order
feature:clickcore event — merge before this PR (runtime dependency; no compile dependency)Testing
tests/unit/fetchTimeseries.spec.js(31 cases): config gating incl.enabled:false, URL templating and its error cases, response mapping for both API shapes, grouping/units, payload building. Full unit suite green.Manual: add the README's
timeseriesblock to the AQS layer in Configure, click a station — loading → chart with the parameter picker. Station54-39-20("Dixie St.") exercises 15 parameters across 5 units.