fix(renderer): make the Gantt gap options work (audit C5) #70
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!70
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/audit-c5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Audit C5, present since the Gantt was added.
toGanttHTMLdocuments two options,gapThresholdMinutesandcompressedGapSize; measured on a recipe with a 2 h rest:compressedGapSize: ignored everywhere (getVirtualTimewas always called with its default 20): 5, 20 and 60 gave the same 528 px chartgapThresholdMinutes: used for the axis gaps but not bybuildTracks, which recomputed its own gaps with the default. The chart's width and the blocks' percentages were then computed from different gaps: with a threshold above the wait (no compression wanted) the blocks ran to 279.5% of the chart (the passive block was 272.7% wide)Fix: one
resolveGapOptionsyields the two numbers (missing, NaN or negative -> default;Infinityis valid and means never compress), andbuildTracks,computeVisualGaps,computeTimeTicksand the blocks'getVirtualTimecalls intoGanttHTMLall take them from it.getVirtualTimealso never lets a gap grow: a size above the gap's own length would have stretched it.Checked: the default output is byte-identical to main (3 recipes x 2 schedules); the new tests (7) fail 3 on the previous code, including the 272.7% block. Docs EN/FR say what
Infinityand the clamp do. New patch changeset for the renderer (visible vs 1.3.0). ci (1342 tests) and conformance 98/98 pass.