Skip to content

fix(widgets): readable HARD in light mode, explicit tyre stints - #39

Merged
JustMaris merged 2 commits into
masterfrom
fix/tyre-widget-light-mode
Sep 24, 2026
Merged

JustMaris merged 2 commits into
masterfrom
fix/tyre-widget-light-mode

Conversation

@JustMaris

Copy link
Copy Markdown
Member

Summary

  • HARD was invisible on a light theme: it was hard-coded #f0f0f0 (white). It now uses Glance's theme-aware color-highlight, same as the driver codes.
  • Stints are now explicit: each chip is one stint, in the order run, with a hover tooltip ("Stint 2: HARD, 4 laps") and a legend saying the numbers are laps and that a stint is the time between pit-lane visits - so the same compound can repeat.
  • Considered grouping consecutive same-compound stints (HARD×12+4) but that hides the run order, which is the useful part, so the final version keeps one chip per stint.

OpenF1 can't reliably say whether repeated stints are the same tyre set: tyre_age_at_start only proves reuse when non-zero (0 means new or unknown). The wording avoids claiming anything about sets.

Test plan

  • Rendered on Glance v0.8.6 against a live paddock-api with real FP1 data: chips in order, tooltips read correctly (incl. singular "1 lap"), no template errors
  • Light-theme readability not viewed directly here; HARD now shares the driver codes' class, which is readable in a light theme

- HARD was hard-coded #f0f0f0 (white), invisible on a light theme. It now
  uses Glance's theme-aware color-highlight, same as the driver codes.
- Each entry is a stint (time between pit-lane visits), not a tyre set -
  a driver can pit for a lap and go back out on the same set, so the same
  compound repeats. Consecutive same-compound stints are now grouped
  (HARD×12+4 = two HARD stints), and a legend says the numbers are laps
  and what a stint is. OpenF1's tyre_age_at_start only proves reuse when
  non-zero (0 can mean new or unknown), so sets can't be told apart
  reliably; the wording says "possibly the same set" rather than claiming.
Grouping same-compound stints hid the order they were run in, which is
the useful part. Back to one chip per stint, in order, with a hover
tooltip per stint ("Stint 2: HARD, 4 laps") and a legend saying numbers
are laps and that a stint is the time between pit-lane visits (so the
same compound can repeat, possibly on the same set - OpenF1 only proves
reuse via a non-zero tyre_age_at_start, so sets cannot be told apart
reliably). Render-tested on Glance 0.8.6 against a live paddock-api.
@JustMaris
JustMaris merged commit cc9aa6f into master Sep 24, 2026
7 checks passed
@JustMaris
JustMaris deleted the fix/tyre-widget-light-mode branch September 24, 2026 11:04
@dnb-robot dnb-robot Bot mentioned this pull request Sep 24, 2026
JustMaris added a commit that referenced this pull request Sep 26, 2026
* fix(widgets): readable HARD in light mode, make tyre stints explicit

- HARD was hard-coded #f0f0f0 (white), invisible on a light theme. It now
  uses Glance's theme-aware color-highlight, same as the driver codes.
- Each entry is a stint (time between pit-lane visits), not a tyre set -
  a driver can pit for a lap and go back out on the same set, so the same
  compound repeats. Consecutive same-compound stints are now grouped
  (HARD×12+4 = two HARD stints), and a legend says the numbers are laps
  and what a stint is. OpenF1's tyre_age_at_start only proves reuse when
  non-zero (0 can mean new or unknown), so sets can't be told apart
  reliably; the wording says "possibly the same set" rather than claiming.

* fix(widgets): keep stint order, add per-stint hover detail

Grouping same-compound stints hid the order they were run in, which is
the useful part. Back to one chip per stint, in order, with a hover
tooltip per stint ("Stint 2: HARD, 4 laps") and a legend saying numbers
are laps and that a stint is the time between pit-lane visits (so the
same compound can repeat, possibly on the same set - OpenF1 only proves
reuse via a non-zero tyre_age_at_start, so sets cannot be told apart
reliably). Render-tested on Glance 0.8.6 against a live paddock-api.
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