Skip to content

docs: one section per package, with an icon rail and a playground - #50

Merged
vitehub-bot[bot] merged 7 commits into
mainfrom
docs/package-sections
Oct 21, 2026
Merged

vitehub-bot[bot] merged 7 commits into
mainfrom
docs/package-sections

Conversation

@onmax

@onmax onmax commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Stacked on #47. Each package becomes its own docs section, the sidebar works like the one on vitehub.dev, and a playground renders every plugin in the browser.

Sidebar

  • Rail: one icon per section, with its name on hover. Docs and Playground come first, then the packages in the same groups as before (Review blocks, Page behavior, Authoring tools), with a line between groups.
  • Pages column: the current section's name and group, then its pages. The Docs section keeps Overview, Guides, and Recipes.
  • On screens narrower than 60rem, the menu button opens both columns.

Package pages

Each docs/pages/<package>.md is now a folder:

Page Holds
Overview (/annotate/) The installer, the examples, and credits
Getting started Usage, and the agent skill and CLI where a package has them
Components or Syntax Every component and its props
Guides The old Guides section, with each h3 promoted to h2
  • embed and github-callouts: their Guides had only Theming, so Theming moved onto the Syntax page.
  • lint: keeps its Rules on /lint/, because the published comark-lint links to /lint/#comark0001.
  • Every page ends with Previous and Next links within its section.
  • Links that pointed at moved anchors (/annotate/#components-compare, /carousel/#guides-validation, and others) now point at the new pages.

Playground

I checked the comark.dev playground first. It loads only its own 14 plugins and can't load ours, so a prefilled link would render ::screenshot as an unknown tag. /play/ is our own playground:

  • Editor and preview: a Markdown editor, a live preview, and the meta.issues list below the editor.
  • Rendering: it uses annotate, carousel, charts, embed, github-callouts, tabs, and zoom. It leaves out include (which reads files) and Shiki. The preview is an iframe with srcdoc, so each plugin's inline script runs as it would on a real page.
  • Presets: the examples at the top of each package page, listed in the second column.
  • Playground links: each example on every page has a Playground link next to Preview/Code that opens it in the playground.
  • Sharing: Copy link puts the Markdown in the URL hash, compressed with deflate. Nothing is stored on a server.
  • Size: play.js is 528 kB. vega is a 1.8 MB lazy chunk that loads only when a document has a chart.

Checks

  • pnpm check passes. Its two warnings are in an e2e test this PR doesn't change.
  • vp fmt --check, pnpm test (182 tests), and pnpm run doctor (docs lint included) pass.
  • All 40 Playwright e2e tests pass. Two are new, for the playground:
    • a preset renders;
    • an edit reports issues and gives a shareable link;
    • an example's Playground link opens its Markdown.
  • Updated e2e tests:
    • five go to the pages where their examples moved;
    • the zoom group test now hides two of four group items itself. No single page has the same group both visible and inside a closed tab anymore.
    • e2e/serve.ts now sends JS and CSS content types, so the playground's module script loads.

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 30ce37e 2026-10-21T08:15:26.629Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ d9b16ff 2026-10-21T08:11:00.046Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 75ee6cd 2026-10-21T08:04:46.428Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 0dac063 2026-10-21T07:59:02.674Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ c62abac 2026-10-21T07:33:06.941Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 04a324d 2026-10-21T07:08:40.912Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ bae69c9 2026-10-21T06:37:35.645Z Visit the dashboard ↗

@pkg-pr-new

pkg-pr-new Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-annotate@50

comark-carousel

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-carousel@50

comark-charts

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-charts@50

comark-embed

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-embed@50

comark-github-callouts

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-github-callouts@50

comark-include

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-include@50

comark-lint

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-lint@50

comark-tabs

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-tabs@50

comark-zoom

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-zoom@50

commit: 30ce37e

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The playground's share-link flow is not supported in every browser that can otherwise load the docs.

Reviewed changes

This review covers the static docs restructuring, generated navigation and routes, the new browser playground, and the related end-to-end test updates.

  • Docs sections — Split package documentation into overview, getting-started, component or syntax, and guide pages, with updated navigation links and per-section paging.
  • Icon-rail shell — Reworked the generated site layout and responsive menu around a section rail and current-section page column.
  • Playground — Added browser-side parsing/rendering, iframe previews, issue reporting, compressed hash sharing, presets, and links from examples.
  • Verification coverage — Added playground browser tests and updated existing page routes and fixtures for the new generated structure.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread docs/play.ts Outdated

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — one accessibility suggestion is inline.

Reviewed changes

This review covers the new generated docs search flow and the package/example links added since the prior Pullfrog review.

  • Added header search — Generated a /search.json index and a keyboard-accessible dialog for searching pages and headings.
  • Linked playground presets — Added package navigation and example links that open the corresponding playground preset or Markdown.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread docs/build.ts Outdated
@vitehub-bot

vitehub-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Waiting for GitHub merge request 4f8b0095-ead3-4ed5-840c-e964cef56a13.

Session

Pass interrupted; current webhook state retained.

Session

Pass interrupted; current webhook state retained.

Session

Pass interrupted; current webhook state retained.

Session

Pass interrupted; current webhook state retained.

Session

Pass interrupted; current webhook state retained.

Session

Pass interrupted; current webhook state retained.

Session

Pass interrupted; current webhook state retained.

Session

Pass interrupted; current webhook state retained.

Session

Pass interrupted; current webhook state retained.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The new preset thumbnails retain each plugin's attributed <style> block, so the playground page duplicates large CSS payloads and browser style work once per preset.

Reviewed changes

This review covers the changes since the prior Pullfrog review: editor highlighting and server-rendered preset stills in the playground navigation.

  • Added editor highlighting — Loaded Comark's Shiki grammar lazily and painted the Markdown behind the transparent textarea.
  • Rendered preset stills — Generated script-free thumbnail markup, replaced embedded players with placeholders, and collected thumbnail styles for the playground page.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread docs/build.ts Outdated
@vitehub-bot
vitehub-bot Bot changed the base branch from docs/restructure to main October 21, 2026 07:49
@pullfrog

pullfrog Bot commented Oct 21, 2026

Copy link
Copy Markdown

The model never responded, so Pullfrog stopped this run after 2 minutes. The request went out but nothing came back. This is usually temporary, so re-trigger to try again.

Last agent output
timestamp=2026-10-21T07:59:18.940Z level=ERROR run=e89dd646 message="stream error" providerID=openai-compatible modelID=gpt-5.6-sol session.id=ses_ea2892c20ffef4tPbUbkqVIS0e small=false agent=build mode=primary error.error="AI_APICallError: <none>"

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-5.6-sol

onmax and others added 7 commits October 21, 2026 10:09
The sidebar is two columns, as on vitehub.dev: a rail with one icon per
package, and the current package's pages. Each package page splits into
an overview with its examples, getting started, components or syntax, and
guides, with previous and next links between them.

/play/ renders Markdown with every plugin that runs in a browser. Its
presets are the examples at the top of each page, each example has a
Playground link that opens it there, and a shared link carries the
Markdown in its hash. comark.dev's playground can't load these plugins,
so it can't be prefilled with them.
…ayground

A search button in the middle of the header, or Ctrl K, ⌘K, or /, opens a
dialog over every page and heading, read from /search.json the first time
it's needed. Without a script the button stays hidden.

Each package's column ends with Open in playground, which opens its first
example there.
The editor is a transparent textarea over a copy of its text, colored by
Comark's own grammar, the one the docs' code blocks already get from the
Shiki plugin. Shiki's JavaScript regex engine loads after the page, and the
build colors the first preset so it's never plain.

The playground's column shows each preset as a still of its example under
its package's icon: rendered at build time without scripts, with a box for
each embedded player, and inert.
…d's preset

A package's pages open its npmx page; the other pages open the project's.
On the playground the link follows the selected preset, and a shared link
gets the project's, since its Markdown could use any package.
@onmax
onmax force-pushed the docs/package-sections branch from d9b16ff to 30ce37e Compare October 21, 2026 08:13
@onmax
onmax added this pull request to stack #56 October 21, 2026 08:14

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This review covers the visual-only change since the prior Pullfrog review: the annotate section's rail icon was replaced with a custom hand-drawn loop matching its marks.

  • Updated annotate icon — Replaced the generic pen-tool icon with the new scribble-loop SVG in the generated navigation rail.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@vitehub-bot
vitehub-bot Bot merged commit c3a0cc3 into main Oct 21, 2026
8 checks passed

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — one minor sharing fallback remains inline.

Reviewed changes

This review covers the changes since the prior Pullfrog review: sharing capability/error handling, complete removal of styled thumbnail blocks, and synchronization of search combobox state with the dialog.

  • Handled unsupported sharing — Added guarded raw-deflate construction, user-visible errors for compression failures, and consistent handling while loading shared hashes.
  • Removed thumbnail styles — Expanded the thumbnail cleanup to remove attributed <style> elements case-insensitively before collecting their styles once for the playground page.
  • Synchronized search state — Derived aria-expanded from the dialog state and reset it when the dialog closes.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread docs/play.ts
Comment on lines +46 to +49
const Stream = kind === "compress" ? CompressionStream : DecompressionStream;
if (typeof Stream !== "function") throw new Error(sharingUnsupported);
try {
return new Stream("deflate-raw");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typeof Stream does not protect browsers where CompressionStream or DecompressionStream is not defined, because the conditional expression evaluates the selected global before typeof runs and throws a ReferenceError. This leaves the capability fallback reporting an incidental exception instead of sharingUnsupported; look up the constructors through globalThis (or guard each global before selecting it) so edit sharing, Copy link, and loading a shared hash all use the intended unsupported path.

This was referenced Oct 21, 2026
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