Skip to content

v4.0.0

Choose a tag to compare

@alexandermccormick alexandermccormick released this 06 Oct 00:42
· 69 commits to main since this release
58046ee

New options toolbar/panel and unified legend (#106).

Breaking changes

  • Removed the old display-options menu and legend components and their exports: Menu, MonitorsDisplayOptions, EvStationsDisplayOptions, MapLayersDisplayOptions, MapStyleDisplayOptions, ToggleSwitch and SegmentedControl. Build menus from the new exports instead: OptionsBar, OptionsGroup, OptionsMenu, the row components, the PollutantMenu/MonitorsMenu/LayersMenu/OverlaysMenu/SettingsMenu components, Legend/LegendBar, resetMapOptions and mapStyleState.
  • Monitor display options are now split by vendor. There is a new airgradient option, purpleair covers all PurpleAirs, and sjvair (non-FEM) is removed.
  • EV stations are off by default, with Level 2 and Level 3 on.

Changes

  • Options: a dropdown toolbar at 768px and wider, and a full-screen "Map Options" panel below that.
    • Pollutant: PM2.5, Ozone or the new None (?pollutant=none).
    • Monitors: Reference-grade and Low-cost groups with select-all.
    • Layers: Fire & Smoke and EV Chargers.
    • Overlays: Wind.
    • Settings: Marker Clusters, Basemap and Theme, with the theme carried over between basemaps, plus Reset Map Options.
  • Legend: a single collapsible legend. The pollutant gradient comes from the monitor metadata levels, and the fire and smoke colors are shared with the map layers.
  • Markers: all low-cost monitors (AirGradient, PurpleAir, VOZbox) now render as circles.
  • MapShell: gains an optional search snippet.
  • Bug fixes:
    • Disabled layers no longer reappear after data refreshes.
    • No more "Style is not done loading" errors during basemap changes and Reset.
    • Hover tooltips work again after a layer is re-applied.
  • Tooling: added Vitest (npm test).

Upgrading

Consuming apps need to bump to ^4.0.0 explicitly; a ^3.x range won't pick it up.