fix(schedule): give the HTML export a constant week pitch - #91
Merged
Conversation
Exported week rows were only as tall as their contents, so the grid's rhythm changed from week to week and a row holding a bar towered over an empty one. The on-screen grid already gives every day cell a minimum height; the export did not. Restructure a week row into a single seven-column table, one cell per day, with the bars floating over it as an overlay (they span columns, so they cannot live inside a cell) and milestones pushed below them by a spacer sized to the week's lane count. Day cells get a minimum height, column rules, and whole-cell non-working shading. Element geometry is still exactly buildLayout's output; only the space around it changed. Taller rows fit fewer weeks per printed page (~12 -> 6-7 on A4 landscape), traded for readability. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The schedule's HTML export laid a week row out as three stacked blocks (day
numbers, bar lanes, milestone row) with no height of its own, so every week
was as tall as whatever it happened to hold. A week with a bar towered over an
empty one and the calendar lost its rhythm — the complaint behind T-0099.
The on-screen grid has given each day cell a minimum height all along; only
the export was missing it.
How
tdper day, holding thedate line, a spacer sized to the week's lane count, and that day's
milestones. Bars and arrows span columns, so they stay an absolutely
positioned overlay across the whole week.
heightis a minimum, soa week with more lanes than fit still grows), vertical column rules, and
non-working shading over the whole cell rather than behind the date alone.
at the same offset in every cell.
rules sit a few px off from the ones in the rows below.
Element geometry is untouched: it is still exactly
buildLayout's output, as§8.2 of the design note requires.
Trade-off
Taller rows fit fewer weeks per printed page — roughly 12 before, 6–7 now on
A4 landscape. Accepted for readability; recorded as §16.12 in the vault design
note.
Verification
testschedule and measured the output: all week rows97px, header and body column rules aligned to the pixel, bars at the head
offset and milestones one lane below with no overlap.
npx vitest run(124 passed) andnpm run buildgreen. One existing testasserted the old
daynum ... todayclass arrangement and was updated to thenew
daycell ... today.🤖 Generated with Claude Code