Repository navigation
Add weather checkboxes to live drive completion form - #17
Conversation
Checking a common weather type (rainy, cloudy, sunny, snowy, windy, icy) appends it to the weather notes field; unchecking removes it. The field stays freely editable so uncommon conditions can still be typed in alongside the checkbox-driven ones.
These match the values already common in the database, replacing sunny/snowy/windy/icy which don't occur as often.
|
The weather notes text field should display within the "Weather" panel along with the boxes. The boxes don't interact with typed text well. For instance, if I type "Foggy" then immediate check "rainy", the weather text turns into "rainy", losing what I typed. I think the biggest problem is if I type one of the words the checkboxes themselves insert, they get confused. I'm not sure if capitalization is considered. If I type one of the words from the checkboxes, the checkbox corresponding to that word ought to check itself, correctly indicating that the weather is in the note. |
Move the weather notes input inside the Weather fieldset so it renders in the same panel as the checkboxes. Sync checkboxes from the typed text (case-insensitively) as well as text from checkboxes, so typing a common word like "Foggy" checks its box and survives later checkbox toggles instead of being silently dropped.
|
Pushed a fix for both issues in 8669c7b:
Verified with a Playwright walkthrough of exactly the scenario you described, plus a case-insensitivity check (typing "CLOUDY" checks the cloudy box), and reran the full CI suite (lint, mypy, pytest w/ coverage, browser test) — all passing. Generated by Claude Code |
Extract the weather checkbox/text markup into _weather_picker.html so the live-drive completion form and the add/edit drive form (used when editing a past drive) render the same picker instead of drifting apart. Match checkbox labels by prefix instead of exact string, so typing "rain" checks "rainy" (and unchecking removes the "rain" text) rather than requiring the full word. Run an initial sync on load so editing a drive with existing weather text pre-checks the right boxes. Also drop the card-like background/border/radius from the drive history "N drives · duration" totals summary, which made it look like a drive-row card instead of a lightweight summary line.
|
Pushed ea08883 addressing all three: 1. "rain" auto-checks "rainy", uncheck removes "rain" 2. Checkboxes missing on the past-drive edit screen 3. "totals" summary looked like a drive card Verified all three with a Playwright walkthrough (typing "rain", editing a drive with saved "rain, cloudy" weather, and checking the computed style of the totals bar has no border/radius), plus reran the full CI suite (lint, mypy, pytest w/ coverage, browser test) — all passing. Generated by Claude Code |
Summary
Test plan
ruff check .ruff format --check .mypypytest -m "not browser" --cov --cov-fail-under=95(88 passed, 95.63% coverage)pytest -m browservia the project's local-chromium fallback (WebKit unavailable in this environment) — confirms no horizontal overflow on a 320px mobile viewportGenerated by Claude Code