Skip to content

fix: keep status page charts legible on narrow screens - #6

Merged
dhamsey3 merged 1 commit into
mainfrom
fix/status-page-narrow
Oct 16, 2026
Merged

dhamsey3 merged 1 commit into
mainfrom
fix/status-page-narrow

Conversation

@dhamsey3

Copy link
Copy Markdown
Owner

The live status page in a 280px-wide view: the price plot shrank to 98px, so the x labels overlapped and the hover read-out ran off the chart. Small phones or larger text settings hit the same thing.

  • Charts size their chrome by their own width (CSS container queries):
    • Below 480px, the end labels give their room to the plot. The legend and the read-out still name every line.
    • Below 300px, every other x label is hidden, leaving 00:00, 12:00 and 24:00.
  • The read-out sits on whichever side of the crosshair fits and never leaves the chart. It truncates series names rather than values.

I checked it with headless Chrome at 280, 320 and 375px against the live data. Tests and lint pass; a new assertion covers the minor-tick markup.

Only src/voltcast/page.py changes, so on merge the status workflow republishes the page. The deploy workflow also runs, but it only updates the Lambda's code hash.

On a 280px-wide view the price plot shrank to 98px: the x labels ran into
each other, and the hover read-out ran off the chart.

Each chart now sizes its chrome by its own width (container queries). Below
480px the end labels give their room to the plot; the legend and read-out
still name every line. Below 300px every other x label is hidden, leaving
00:00, 12:00 and 24:00. The read-out sits on whichever side of the
crosshair fits, never leaves the chart, and truncates series names rather
than values. Checked at 280, 320 and 375px.
@dhamsey3
dhamsey3 merged commit a905108 into main Oct 16, 2026
4 checks passed
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.

1 participant