Skip to content

Renderer Spike — M0 Evidence ​

Date: 2026-11-10 Gate: RD-05/RD-06 renderer evidence gate (requirements AR #11, #12, #36, #57) Verdict: PASSED WITH NOTES — HTML/CSS is the canonical renderer; SVG remains an optional internal shape/selection plane. No public renderer switch. Evidence harness: spike/renderer/ (pnpm build && pnpm measure) Raw measurements: spike/renderer/evidence/measurements.json


Purpose ​

The requirements deliberately do not choose HTML or SVG by ideology. This spike compares four rendering strategies on the same classic 14-month view and the same sample intervals, then records the evidence that drives the M2 renderer choice.

The spike is throwaway evidence. It is not the product entry point, it is not published, and it exposes no renderer prop.

Compared variants ​

VariantCells and labelsRibbonsItem proxiesOptional SVG
html-onlyHTMLHTML buttonsThe ribbon button itselfNone
html-svgHTMLSVG pathsTransparent HTML buttons over the shapesRibbon/selection plane
svg-shapesSVG rectangles and textSVG pathsTransparent HTML buttonsCell/ribbon plane
full-svg-rowHTML except February 2027, which is fully SVGSVG pathsTransparent HTML buttonsOne full month row

Sample data: cross-month interval, cross-year interval, three overlaps, a one-day interval, a long multi-month interval, and a selected range. The layout is 14 months × 37 fixed columns (427 dated cells plus 91 blank slots).

Method ​

spike/renderer/measure.mjs:

  1. Builds a static site with Vite and serves it locally.
  2. Opens every variant in Chromium, Firefox and WebKit at 2040 × 1400.
  3. Counts rows, slots, dated cells, ribbons and proxies.
  4. Measures each ribbon/proxy against its first and last date-cell bounds.
  5. Exercises keyboard focus on a date cell and on the SVG February row.
  6. Runs axe-core 4.14 with resultTypes: ["violations"].
  7. Captures full-page screenshots.
  8. Generates an A3 PDF in Chromium and reads it with pdfinfo.
  9. Reads the Vite manifest for gzip sizes and counts source lines.

Results ​

Geometry, keyboard and accessibility ​

All 12 combinations (3 browsers × 4 variants) produced identical counts:

MeasurementResult
Month rows14
Day slots518 (14 × 37)
Dated cells427
Ribbon fragments13
Rendered proxies13 for SVG variants, 0 extra for HTML-only
DOM nodes1,228–1,231
Alignment0 misaligned; max deviation 0 px (Chromium/WebKit) and 0.5 px (Firefox SVG variants)
Date keyboard2026-12-01 → ArrowRight → 2026-12-02 in all variants and browsers
SVG row keyboard2027-02-01 → ArrowRight → 2027-02-02 in all variants and browsers
axe serious/critical0 in all 12 combinations
Cross-month identity2 fragments, rows 2027-01 and 2027-02, one item ID
VariantPagesPage size
html-only11191.12 × 842.88 pt (A3 landscape)
html-svg11191.12 × 842.88 pt (A3 landscape)
svg-shapes11191.12 × 842.88 pt (A3 landscape)
full-svg-row11191.12 × 842.88 pt (A3 landscape)

Firefox and WebKit were not used for PDF generation because Playwright only supports page.pdf() in Chromium. Their screen rendering, focus and axe results are included.

Size ​

The spike uses one shared engine with a strategy configuration, so the Vite chunks measure the shared harness, not an isolated production renderer:

VariantJS gzipCSS gzipTotal route gzip
html-only7.05 kB1.22 kB8.27 kB
html-svg7.05 kB1.22 kB8.27 kB
svg-shapes7.05 kB1.22 kB8.27 kB
full-svg-row7.08 kB1.22 kB8.30 kB

Source size of the shared harness: grid.ts 244 lines, render.ts 589 lines, and four 16–17-line variant modules. The near-identical route sizes are expected: all variants share the DOM helpers and sample data. An isolated production bundle would be smaller; the difference between strategies is not large enough to decide the gate.

Observations ​

  • HTML-only is the smallest conceptual surface: one coordinate system, one focusable element per ribbon, and no overlay/proxy alignment problem. Rectangular month-row fragments do not need vector shapes.
  • HTML + SVG adds selection outlines and optional connectors cleanly, but introduces a second coordinate system and transparent proxy overlays. All measured geometry still aligned exactly because both layers use the same prefix widths.
  • SVG shapes forced every cell, date label and focus target into SVG. It passed in all three tested browsers, but it increases the accessibility surface and makes custom React content, resize handles and annotation slots harder to compose.
  • Full-SVG row gave no measured advantage over the hybrid. It is the highest risk for host content and screen-reader behavior.
  • Connectors are easy to draw but easy to mislead: an unconstrained line between a December fragment ending at the right edge and a January fragment starting at the left edge crosses the whole grid. The spike now draws a connector only when the horizontal gap is at most 120 px. This supports the requirements' default connectorMode: 'none'.
  • The selection rectangle is the clearest SVG value: arbitrary marquee and focus outlines are natural vector shapes, while ribbons are rectangles.

Decision ​

QuestionDecision
Default cell/label rendererHTML/CSS
Default ribbon rendererHTML elements positioned from the pure layout
SVG useOptional internal shape plane for marquee/selection outlines and constrained connectors
Full-SVG layoutNot adopted
Public renderer propNot exposed
Core layoutRemains renderer-agnostic data
Connector defaultnone
Revisit triggerA future requirement for non-rectangular shapes or exported vector art

Limitations ​

  • The spike uses plain DOM, not React; Fluent UI/MUI content nesting is not measured. The hybrid's HTML proxies are the intended integration point.
  • The spike does not have a full item inspector or a roving item-proxy tab stop.
  • Only date-cell keyboard navigation is measured.
  • No manual screen-reader audit was performed; axe is automated evidence only.
  • PDF output is Chromium-only; Firefox/WebKit print output is unverified.
  • Bundle sizes are shared-harness sizes, not isolated production budgets.
  • One window (2027) and one theme are measured.

Artifacts ​

ArtifactPath
Harnessspike/renderer/
Measurementsspike/renderer/evidence/measurements.json
Screenshotsspike/renderer/evidence/*.png
A3 PDFsspike/renderer/evidence/*-a3.pdf
ADRdocs/adr/0001-renderer-strategy.md

Free for internal use. Built with VitePress, Storybook and TypeDoc.