Repository navigation
Story: Generate SVG support timelines with Node.js #126
Copy link
Copy link
Milestone
Description
Parent Epic: #125
As a documentation maintainer,
I want a Node.js function that generates an SVG timeline from roadmap data,
so that library release schedules are represented consistently and reproducibly.
Context
Follow the calendar structure of PHP's Supported Versions page: one row per branch, a shared time axis, colored periods, and a legend. Use LongitudeOne's site colors. Generate the SVG at build time without requiring daily updates.
Acceptance Criteria
- A function callable from Node.js returns a standalone SVG from library branch data and the global display window.
- Each branch has a labeled row; the time axis has annual graduations and period positions and lengths reflect their dates.
- Future releases, active support, and security-fixes-only periods are visually distinct and explained in a legend.
- Colors follow the site's palette; text and periods remain readable in light and dark themes.
- No relative duration or countdown appears.
- Missing or unannounced information never produces invented dates or periods; roadmaps without stable releases remain representable.
- Invalid dates and inconsistent period ordering produce diagnostics identifying the affected library and branch.
- The SVG includes an accessible title and description and scales without truncating information.
- Identical data and parameters produce identical output.
- Input supports one JSON file per library and a site-wide time-window configuration.
- Each branch has a version and an explicit
plannedorreleasedstatus; passing a planned date never automatically changes that status. -
plannedReleaseDateis distinct fromreleaseDate; released branches require an actual release date. - A future branch with a known planned date has a marker at that date; support periods are drawn only when announced.
- Release and support dates use
YYYY-MM-DD; unknown values arenull. - Support end dates are explicitly configured, not derived from a fixed support duration; their chronological order is validated against the applicable release date.
- Timelines respect the common display bounds and indicate periods continuing beyond those bounds.
Constraints
- Use Node.js, compatible with the repository runtime requirements (Node.js 20+, with Node.js 24 in CI).
- Produce a standalone SVG image without MDX or client-side JavaScript required for display.
- Share the input contract with the integration Story so the table and timeline consume the same data.
- Do not implicitly apply PHP's support durations to LongitudeOne libraries.
- Roadmap configuration does not replace existing Packagist-based documentation version classification.
Definition of Done
The project's common Definition of Done applies.
- Document the input contract, parameters, errors, and a configuration example.
- Document
library,branches,version,status,plannedReleaseDate,releaseDate,activeSupportUntil,securitySupportUntil,php, andnotes, together with the global window bounds. - Tests cover period placement, transitions, missing data, SVG escaping, invalid dates, and chronological validation.
- Representative SVGs are visually checked at small and large widths in both themes.
-
npm test,npm run build, and applicable Markdown lint checks pass. - Common
composer test-localandcomposer qualitychecks apply only if defined in the repository; otherwise record them as not applicable to this Node.js project.
Metadata
Metadata
Assignees
Labels
No labels
Activity