Skip to content

Point the HTML example at a real published sheet - #14

Merged
odiwr merged 1 commit into
mainfrom
docs/live-sheet-example
Aug 30, 2026
Merged

odiwr merged 1 commit into
mainfrom
docs/live-sheet-example

Conversation

@odiwr

@odiwr odiwr commented Aug 30, 2026

Copy link
Copy Markdown
Owner

What this changes

The HTML example loaded inline CSV. That proved the rendering worked but not the thing the project exists for. It now loads a real published Google Sheet through a plain src attribute, with no JavaScript on the page at all.

End-to-end verification against Google's live endpoint

This was the last untested part of the project — everything before it used hand-written fixtures.

URL rewrite /pubhtml → /pub?output=csv
Response 200 text/csv, 5,043 bytes, 588 ms
Parsed 22 events, 0 unparseable
Spans 3 — two exact from End, one inferred from prose
Media 6 links, all embeddable
Rendered 22 markers, 8 lanes, 0 overlapping labels, 20 ticks
Span bars 3 drawn, 1 hollow (the inferred one)
Media pane Wikipedia lead image fetched and shown

The live sheet and the same data as a local CSV parse identically.

A trap worth documenting

The element follows the reader's prefers-color-scheme, not the host page's. On a light-only page a visitor with dark mode gets a dark timeline against a white background — which is exactly what happened while testing.

theme="light" pins it, and the README now says so in the theming section, since this will bite anyone embedding on a fixed-palette site.

Notes

The roadmap example keeps its inline data on purpose, so the page still demonstrates a timeline that works with no network.


  • npm test passes
  • npm run build passes
  • Behaviour changes in packages/core have a test — n/a, examples and docs only

The example demonstrated the library with inline CSV, which proved the
rendering but not the thing the project is actually for. It now loads a real
Google Sheet published with File > Share > Publish to web, through a plain src
attribute and no JavaScript at all -- which is the headline use case and should
be the first thing anyone sees.

Verified end to end against Google's live endpoint:

  toCsvUrl rewrote /pubhtml -> /pub?output=csv
  200 text/csv, 5,043 bytes, fetched in 588ms
  22 events parsed, 0 unparseable
  3 spans (2 exact from End, 1 inferred from prose), 6 media links
  Rendered: 22 markers over 8 lanes, 0 overlapping labels, 20 ticks,
  3 span bars of which 1 hollow, Wikipedia lead image fetched

Also documents a real trap found while testing: the element follows the
reader's prefers-color-scheme by default, so it turns dark on a light-only
page for anyone with dark mode on. theme="light" pins it, and the README now
says so where someone will actually read it.

The roadmap example keeps its inline data, so the page still demonstrates a
timeline that works with no network.
@odiwr
odiwr merged commit d269670 into main Aug 30, 2026
3 checks passed
@odiwr
odiwr deleted the docs/live-sheet-example branch August 30, 2026 00:41
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