Skip to content

feat(count-aggregator): add AQI badges and wind-direction widgets - #225

Merged
pjeweb merged 5 commits into
mainfrom
feat/count-aggregator-aqi-wind
Aug 27, 2026
Merged

feat(count-aggregator): add AQI badges and wind-direction widgets#225
pjeweb merged 5 commits into
mainfrom
feat/count-aggregator-aqi-wind

Conversation

@pjeweb

@pjeweb pjeweb commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add UBA Luftqualitätsindex band helpers in @mapsight/count-aggregator-api.
  • Add citizen-facing AQI badges and wind-direction widgets in feature-details metrics, plus smart-city icon aliases for the new station types.

@changeset-bot

changeset-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1afe932

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@mapsight/count-aggregator-api Minor
@mapsight/count-aggregator-ui Minor
@mapsight/traffic-style Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Expose UBA Luftqualitätsindex band helpers, citizen-facing metric variants,
and expand smart-city icon aliases for the new station types.
@pjeweb
pjeweb force-pushed the feat/count-aggregator-aqi-wind branch from 0df3d42 to d854b1a Compare August 27, 2026 20:17
@pjeweb
pjeweb requested a lite review from Copilot August 27, 2026 20:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds air-quality index (UBA LQI) classification helpers to the API package and extends the UI’s smart-city metric widgets to render AQI badges and a wind-direction compass variant, plus expands icon alias coverage for the new station types.

Changes:

  • Introduce AQI (UBA LQI) band helpers (band resolution, labels, colors, unit/type predicates) in @mapsight/count-aggregator-api.
  • Add UI rendering variants for AQI (badge + band-colored chart) and wind direction (compass widget), including new formatting helpers and styles.
  • Expand smart-city icon aliases to cover additional air-quality and water-level station types.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/traffic-style/src/meta.json Expands smart-city icon aliases for air-quality and water-level station types; refines icon labels.
packages/count-aggregator-ui/src/lib/wind-direction.ts Adds wind-direction normalization, cardinal mapping, and citizen-facing formatting helpers.
packages/count-aggregator-ui/src/lib/wind-direction.test.ts Adds unit tests for wind-direction helpers.
packages/count-aggregator-ui/src/lib/format-metric-value.ts Adds AQI “index” formatting to UBA band labels based on locale.
packages/count-aggregator-ui/src/lib/format-metric-value.test.ts Adds test coverage for AQI index label formatting.
packages/count-aggregator-ui/src/index.ts Re-exports new AQI helpers/types from the API package and new widget variant type.
packages/count-aggregator-ui/src/feature-details-metrics/types.ts Introduces MetricWidgetVariant and wires it into widget config.
packages/count-aggregator-ui/src/feature-details-metrics/styles.css Adds styling for AQI badge and wind-direction compass widget.
packages/count-aggregator-ui/src/feature-details-metrics/index.ts Re-exports MetricWidgetVariant.
packages/count-aggregator-ui/src/feature-details-metrics/config/metric-widgets.ts Adds default configs and variant resolution for AQI, wind direction, and new station types; adjusts unit/variant derivation from station display.
packages/count-aggregator-ui/src/feature-details-metrics/config/metric-widgets.test.ts Extends tests to cover AQI index, wind-direction, and water underground defaults.
packages/count-aggregator-ui/src/feature-details-metrics/components/wind-direction-display.tsx Adds a wind-direction compass component for the wind-direction variant.
packages/count-aggregator-ui/src/feature-details-metrics/components/time-series-metric-chart.tsx Renders wind-direction variant as compass; renders AQI badge and band-colored series; adapts axis formatting for AQI.
packages/count-aggregator-ui/src/feature-details-metrics/components/air-quality-index-badge.tsx Adds AQI badge component that uses band label + color.
packages/count-aggregator-api/src/lib/air-quality-index-bands.ts Adds UBA AQI band model, band resolution, color/label helpers, and unit/type predicates.
packages/count-aggregator-api/src/lib/air-quality-index-bands.test.ts Adds test coverage for AQI band classification and helpers.
packages/count-aggregator-api/src/index.ts Exports new AQI helpers/types from the API package entrypoint.
.changeset/smart-city-aqi-wind-polish.md Declares version bumps and summarizes the feature additions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/count-aggregator-api/src/lib/air-quality-index-bands.ts Outdated
Comment thread packages/count-aggregator-ui/src/feature-details-metrics/config/metric-widgets.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

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

Comment thread packages/count-aggregator-api/src/lib/air-quality-index-bands.ts
The visible label already names the direction, so a duplicate aria-label on the compass made screen readers announce every value twice.
@pjeweb
pjeweb merged commit 9eb9ff8 into main Aug 27, 2026
21 checks passed
@pjeweb
pjeweb deleted the feat/count-aggregator-aqi-wind branch August 27, 2026 21:18
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.

2 participants