Skip to content

feat: Slides plugin and plugin API 0.26.0 docs - #14

Merged
hamidfzm merged 6 commits into
mainfrom
feat/slides-plugin
Oct 16, 2026
Merged

hamidfzm merged 6 commits into
mainfrom
feat/slides-plugin

Conversation

@hamidfzm

@hamidfzm hamidfzm commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds the official Slides plugin (com.glyph.slides) and documents the plugin API 0.26.0 additions it builds on (hamidfzm/glyph#854, shipped in Glyph 0.26.0).

Closes hamidfzm/glyph#23
Closes hamidfzm/glyph#253

Status: ready to merge. Glyph 0.26.0 is released (v0.26.0 at d5464fa2; the release workflow finished and published the platform packages). Merging here publishes the plugin to the index at once: the release workflow packages official plugins on push to main, writes the real packageUrl and sha256, and regenerates the index. A 0.25.0 app is still offered the plugin but cannot load it until it updates.

Changes

  • plugins/com.glyph.slides/:
    • Start Slide Show (View menu and command palette) presents the open document fullscreen inside Glyph. Arrow keys move between slides, Escape ends the show.
    • File > Export > Slides (reveal.js) writes one self-contained HTML deck that opens offline.
    • Every top-level horizontal rule (---) starts a new slide. Slides are wrapped in .markdown-body, so they keep the app's markdown styles and its light or dark theme.
    • reveal.js 6.0.2 (MIT, LICENSE included) ships as package assets read through ctx.assets; there is no build step.
    • sandbox: false: the slide show mounts into a host overlay, which needs the main context.
    • plugin.json carries a placeholder sha256; the release job rewrites packageUrl and the digest when it packages the zip.
    • package.json only marks the folder as ES modules so node --test can import main.js; it is not part of the package.
  • index.json, index/, and docs/plugin-catalog.md regenerated with scripts/build-index.mjs (the PR check compares them with a fresh run); they carry the same placeholder until the release job rewrites it.
  • docs/api-reference.md: the exporter's document argument, ctx.documents.getRenderedHtml, ctx.ui.openOverlay, how a native menu entry is keyed and when a title is not listed, and exporters in File > Export. Merged with the 0.26.0 docs from docs: plugin API 0.26.0 app state (vault, navigation, Files panel blocks) #13 and docs: plugin API 0.26.0 command shortcuts, workspace writes, and Workspace Settings panels #15: the commands section keeps docs: plugin API 0.26.0 command shortcuts, workspace writes, and Workspace Settings panels #15's shortcut, condition, and menu text, and addWorkspaceSettingsPanel and openOverlay are separate sections.
  • docs/recipes.md: the exporter recipe mentions the File > Export entry.

Testing

  • node --test: 15 passing, 5 of them for the plugin (slide grouping, deck markup, and the assembled deck staying self-contained).
  • node scripts/check-plugins.mjs: registration and manifest agree. A fresh scripts/build-index.mjs leaves the committed index unchanged.
  • Against the app as released (hamidfzm/glyph v0.26.0, d5464fa2), with this branch (300b4d1) as the marketplace and glyph-md/plugin-template main (b03c933): the app's plugin contract job passes in full, both the type comparison and ecosystemContract.test.ts, including "accepts every published marketplace entry" for com.glyph.slides.
  • The plugin itself loaded through that release's plugin host: its apiVersion is accepted, and it registers the slides.start command with menu: "view" and the slides.revealjs exporter. Every API it calls exists in 0.26.0 under the same name.
  • Earlier, in a browser against the app's dev server with the real plugin host modules: the slide show, arrow keys, Escape, and the exported deck in both themes.
  • Not yet run inside a built Glyph window: the native menu entries, the fullscreen transition, and math inside a deck.

Adds the official com.glyph.slides plugin: Start Slide Show presents
the open document fullscreen inside Glyph, and File > Export > Slides
(reveal.js) writes one self-contained HTML deck. Horizontal rules
separate slides, and slides keep the app's markdown styles and theme.
reveal.js 6.0.2 (MIT) ships as package assets.

The API reference documents what the plugin builds on: the exporter's
document argument, ctx.documents.getRenderedHtml, ctx.ui.openOverlay,
menu: "view" commands, and exporters in File > Export.
…the host

Follows the review changes in hamidfzm/glyph#854: native menu entries find their contribution by id and skip labels the menu cannot show, the overlay has a host close button and closes when mount throws, and getRenderedHtml is null when no document is rendered.
…ening

Follows hamidfzm/glyph#854: a command or exporter id only needs to be unique within its plugin, and the host's Escape handling and close button on an overlay are described as protection against bugs, with a note to leave them alone.
The PR check compares the committed index.json, index/ shards, and docs/plugin-catalog.md with a fresh run of scripts/build-index.mjs. The registration still carries a placeholder digest; the release job rewrites packageUrl and sha256 and regenerates these files when it packages the plugin.
One conflict, in the sandbox section of docs/api-reference.md: both the overlay and rendered-document refusals from this branch and the app state refusals from #13 are kept.
Conflicts with #15 in docs/api-reference.md, both sides kept: the commands section takes main's shortcut, condition, and menu text plus this branch's note on how a menu entry is keyed and when a title is not listed; ctx.ui.addWorkspaceSettingsPanel and ctx.ui.openOverlay are separate sections; the sandbox list names both new DOM mounts and the rendered-document refusal. The index needed no regeneration.
@hamidfzm
hamidfzm marked this pull request as ready for review October 14, 2026 15:34
@hamidfzm hamidfzm self-assigned this Oct 16, 2026
@hamidfzm
hamidfzm merged commit 954e7c8 into main Oct 16, 2026
2 checks passed
@hamidfzm
hamidfzm deleted the feat/slides-plugin branch October 16, 2026 09:13
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.

Slides exporter plugin (Markdown → reveal.js deck) Add presentation/slide mode

1 participant