Skip to content

v4.2.0

Choose a tag to compare

@alexandermccormick alexandermccormick released this 12 Oct 23:48
· 13 commits to main since this release
d8e97ad

The monitor detail panel loads its own monitor, the lazy routes entry shows the load screen, and load failures can be retried (#113–#122).

Changes

  • Monitor detail panel: /monitor/:id now works whatever pollutant the map is showing, with no ?pollutant= parameter. The panel shows the map's pollutant when the monitor reports it, otherwise the one it does report. Inactive monitors get a panel with their past data; an unknown id shows "Monitor not found."
  • Chart refresh: the chart picks up new points on the 2-minute refresh, in the background, while its date range is live. A past range no longer makes timed requests.
  • @sjvair/monitor-map/routes: the load screen shows while the map and the monitor panel load, including on a cold deep link, with a retry if a chunk fails.
  • monitorsManager.init(pollutant, { autoUpdate: false }): loads monitor data without starting the 2-minute poll, for hosts that preload without showing the map.
  • MapShell loadError snippet: renders on the load screen; MonitorMapLayout uses it to offer Try again when the monitors fail to load.
  • Bug fixes:
    • A failed monitors request no longer leaves the load screen up with no way out.
    • A basemap that fails to load falls back to the previous one instead of leaving a blank, unresponsive map.
    • Toggling Marker Clusters during startup no longer leaves cluster layers beside the unclustered layer.
    • Toolbar dropdown rows are reachable by keyboard: Enter or Space opens a menu, Tab walks its rows, Escape closes it.
    • An empty chart shows "No Data Available For Selected Date Range" instead of a blank area.

Upgrading

No changes are required.

  • Hosts that preload monitor data can pass { autoUpdate: false } to init().
  • Links to a monitor no longer need ?pollutant=pm25.
  • With @sjvair/monitor-map/routes, sv-router's preload() no longer warms the map chunks.

Known limitation

For PurpleAir monitors the panel's PM2.5 value is the API's cleaned value, while the map marker shows the EPA-calibrated one, so the two differ until the API returns the same stage from every endpoint.