Skip to content

refactor(agenda): revert measured info-card widths and gate lane compaction - #44

Merged
PurpleRain-PR merged 1 commit into
mainfrom
feat/ui-refine
Dec 1, 2026
Merged

PurpleRain-PR merged 1 commit into
mainfrom
feat/ui-refine

Conversation

@PurpleRain-PR

Copy link
Copy Markdown
Collaborator

Why

The lane reservation rework in #v0.7.0-dev made two behaviours couple into
every part of the timeline: event/exam information cards started to reserve
per-entry widths measured with TextPainter (re-measured on window width,
font scale and locale changes, and piped through the layout as
paintedWidthDays), and the trailing-lane folding became unconditional.
Both made lane assignment depend on rendered text metrics and viewport
state, which is more machinery than the fixed-width card design needs.
This PR removes the measured-width machinery entirely and puts the folding
behind a developer option. Live-exam-first tiers, same-course lane
clusters, the three-day default tails and the 4-to-null tail migration are
deliberately kept.

What this PR does

1. Information cards go back to fixed-width reservations.
DDLs, events and exams reserve their full tail again
([dueAt − D days, realDueAt], events [startsAt − D days, endsAt]) and
paint at the minimum-zoom D − 0.25 day card width, independent of their
title text. compactTimelineLanes keeps working on this old paint
geometry: it only reads paintStart/paintEnd, so folding and the width
model stay orthogonal. Card leading padding returns to 0.37 of the card
width, and the cell-width/font-scale/locale relayout triggers disappear.
2. Lane compaction becomes an opt-out developer option.
A new Timeline lane compaction switch in the developer options section
(persisted as agendaLaneCompaction, on by default — the shipped
behaviour is unchanged). Turning it off bypasses the collapse completely:
every lane keeps a fixed full height, exactly the pre-folding flat stack,
and the change takes effect live without a restart.

Tests

  • Width-derived expectations in the layout tests revert to the full-tail
    formulas; 3.75/4-day constants track the kept three-day default.
  • The four compaction/cluster tests from the original change are kept; the
    cluster test's MOOC wave moved from 12/13 to 12/12 so its reservations
    no longer phantom-overlap the exam's full-tail reservation.
  • New widget test: with the developer option off the vertical range never
    collapses while panning, and re-enabling collapses trailing empty lanes
    immediately.
    CI on this branch: all six build jobs green, including flutter analyze
    (info-as-fatal, x64 + arm) and flutter test (linux).

…action

Restore the full-tail lane reservation and the D-0.25 fixed card width for
DDLs, events and exams, remove the TextPainter-measured information widths
and their cell-width/font-scale/locale relayout triggers, and return the
card's leading padding from 0.22 to 0.37. Lane compaction stays enabled by
default but a new developer option disables it completely, pinning every
lane to a fixed height. Live-exam-first tiers, same-course lane clusters,
the three-day default tails and the 4-to-null tail migration are unchanged.
@PurpleRain-PR
PurpleRain-PR marked this pull request as ready for review December 1, 2026 07:41
@PurpleRain-PR
PurpleRain-PR merged commit 1f307cb into main Dec 1, 2026
11 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