Skip to content

fix(air-quality): use rounded chips in the legend - #1107

Merged
PranshulGG merged 1 commit into
PranshulGG:mainfrom
RakshithBhat03:feature/air-quality-legend-1106
Aug 28, 2026
Merged

PranshulGG merged 1 commit into
PranshulGG:mainfrom
RakshithBhat03:feature/air-quality-legend-1106

Conversation

@RakshithBhat03

@RakshithBhat03 RakshithBhat03 commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1106.

What's happening

The category legend at the top of the detailed Air Quality screen renders as touching rectangular color blocks. Once the labels wrap, the connected strip breaks across two lines and no longer reads as a continuous AQI scale. It also looks unrelated to the rounded label treatment used elsewhere in WeatherMaster.

The legend uses the default rectangular shape from Surface, has no spacing between entries, and relies on the default text style with broad horizontal padding.

Implementation

  • Use the same compact, rounded treatment as the non-interactive alert metadata chips, so this screen follows an existing app pattern.
  • Add spacing in both directions to keep wrapped labels visually separate.
  • Use labelLarge with the alert chip's padding instead of the default text treatment.

The AQI category order, semantic colors, contrast colors, and chart data remain unchanged. The labels are informational, so they remain plain Surfaces rather than interactive Material filter or assist chips. The change is limited to the legend on the detailed Air Quality screen.

Testing

  • Ran ./gradlew clean assembleDebug with JDK 21 successfully.
  • Installed the debug APK on a Pixel 7 Android 16 API 36 arm64 AVD at 1080 x 2400.
  • Loaded live Open-Meteo data for Mendocino County, opened the detailed Air Quality screen, and confirmed that all six categories render with the intended colors, spacing, typography, and wrapping in both light and dark themes.
  • Cold-started the app after each theme change and confirmed that all labels remain visible without clipping at 1080 x 2400.
  • Confirmed that the hourly AQI and pollutant charts still render below the legend.

I did not verify every translated label. Languages with substantially longer category names may wrap differently. This change preserves the existing AQI foreground and background colors; the existing Moderate and Poor color pairs remain below the WCAG 4.5:1 contrast target for normal-sized text.

Screenshots

Current Dark theme Light theme
Current legend Updated legend in dark theme Updated legend in light theme

AI disclosure

OpenAI GPT-5.6 Sol through the Codex harness in T3 Code was used to inspect the existing UI patterns, implement the Compose styling change, run the build and emulator checks, and draft this description. I reviewed the diff and rendered result and take responsibility for the submitted change.

Co-authored-by: OpenAI GPT-5.6 Sol <noreply@openai.com>
@RakshithBhat03 RakshithBhat03 changed the title Match the air quality legend to the app's chip style Use rounded chips in the air quality legend Aug 28, 2026
@RakshithBhat03 RakshithBhat03 changed the title Use rounded chips in the air quality legend fix(air-quality): use rounded chips in the legend Aug 28, 2026
@PranshulGG

PranshulGG commented Aug 28, 2026 •

Copy link
Copy Markdown
Owner

Pretty small UI change. Wouldn't call it a bug, but okay, I guess. Shouldn't cause any issues, even if ai did it

@PranshulGG
PranshulGG merged commit 421077a into PranshulGG:main Aug 28, 2026
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.

Use rounded chips for the air quality legend

2 participants