fix(ui): one watch-progress colour in app chrome and in the player (#1798)

This commit is contained in:
4gray authored and GitHub committed 2026-10-03 15:11:10 +02:00
1 parent a8dd1eaa97
commit 4adc3ba20f
23 files changed
+441 -20

No files matched your search

@@ -211,7 +211,8 @@ becomes an "Up Next" episode rail (`app-up-next-rail`,
`libs/ui/playback/src/lib/portal-inline-player/up-next-rail.component.ts`).
The rail lists the currently playing episode (highlighted, click-inert)
followed by the rest of its season and a spillover into the following
seasons, with per-episode watch-progress bars from playback positions.
seasons, with per-episode watch-progress bars from playback positions,
drawn in the player's `--pc-progress` like the dock's Up next card.
- Data flow: the hosts (Xtream `SerialDetailsComponent`, Stalker
`StalkerSeriesViewComponent`) build the entries with
@@ -525,6 +525,39 @@ a cache read open and checks text contrast across live theme changes.
Channel preview progress and EPG current-program progress should stay visually aligned.
### Watch progress colour
A title's watch progress (its resume share, `progressPercent`) has exactly one
colour per context, and never a literal of its own:
- **App chrome** — dashboard rail cards and the hero, catalog grids and season
episodes (`app-progress-capsule`, and the season list rows' own fill):
`--app-progress-color`, declared per theme in `apps/web/src/m3-theme.scss`
as that theme's `--app-selection-color`, and declared again inside
`.dark-theme` because a derived custom property resolves where it is
declared. The capsule's green from 90 % marks a finished title; it is a
status, not progress.
- **Over video** — the dock timeline, the Up next card, the Up Next rail and
the fullscreen episode panel: the player's fixed `--pc-progress` (accent
blue `#4f8eff`), never an app token, because the player palette is
theme-independent (see Player And EPG Theme Boundaries). An episode
therefore reads the same in every player surface. The rail and the episode
panel render beside the controls host, outside its `--pc-*` scope, so they
declare the token on their own `:host` with the `progress-token` mixin of
`libs/ui/playback/src/lib/player-controls/_player-palette.scss`.
- ArtPlayer's legacy skin takes a colour string, not a custom property, so it
gets `PLAYER_PROGRESS_COLOR` (`player-palette.ts`), which a spec pins to the
Sass value.
- Live programme progress next to a LIVE marker (the dashboard's live rail and
live hero slides) keeps `--app-live-color`; EPG programme progress keeps the
fill described below.
Specs hold the rule in each owning project: `m3-theme.spec.ts` (web: the token
in both theme contexts), `player-progress.palette.spec.ts` (ui-playback),
`progress-capsule.component.spec.ts` and
`season-container.progress-colour.spec.ts` (components) and
`dashboard-progress-colour.spec.ts` (workspace-dashboard-feature).
### Track
- Height:
@@ -317,6 +317,10 @@ record glyph and the recording status (6.2:1 on the glass over a black
frame). They are literal on purpose: the overlay is
theme-independent (see the UI guidelines' player theme boundary), and the
app's `--app-selection-color` is a different blue that would fight the video.
Watch progress reads `--pc-progress`, the accent blue declared by the
`progress-token` mixin of `_player-palette.scss`; the Up Next rail and the
fullscreen episode panel include the same mixin, so one episode's bar has
one colour in every player surface (UI guidelines, "Watch progress colour").
- **Timeline row**: current time (`--pc-font-mono`, tabular) · drawn track
(`.player-controls__timeline-track` with one segment and an accent fill,
@@ -406,7 +410,7 @@ the native-view legacy dock keeps its plain slider.
Near the end of a series episode the dock shows an **"Up next" card**
(`app-player-up-next-card`, `data-test-id="player-controls-up-next"`) in the
bottom-right corner above the controls: the next episode's still (or its
`S01E03` label as a tile), a 3px accent progress line when it was partly
`S01E03` label as a tile), a 3px `--pc-progress` line when it was partly
watched, "Up next · in 7 min" and the title. The host supplies the item
through the optional `upNext` input (`PlayerUpNextItem { label, title,
thumbnailUrl, progressPercent }`); `ControlsUpNext` decides when it shows —
@@ -879,7 +883,7 @@ be.
rows: a 16:9 still or, without one, a large numeral tile so the no-TMDB
case still looks designed; the `S01E03` label, runtime, watched check or
"Now playing" marker; the title (label as fallback); a 3-line clamped
overview when there is one; a progress bar on the thumbnail. Rows are
overview when there is one; a `--pc-progress` bar on the thumbnail. Rows are
buttons inside `<li>`s of a `<ul>`, so their button role survives for
assistive technology. A loading season shows a spinner row, a loaded empty
one the season-empty copy, and an unanswered one a "could not be loaded"
@@ -1652,6 +1656,8 @@ libs/ui/playback/src/lib/player-controls/
├── player-controls.component.ts
├── player-controls.component.html
├── player-controls.component.scss
├── _player-palette.scss
├── player-palette.ts
├── controls-feedback.ts
├── controls-format.utils.ts
├── controls-layout.ts