Skip to content

Reorganize examples and demos taxonomy#3127

Merged
caio-pizzol merged 2 commits intomainfrom
caio/sd-2928-examples-demos-reorg
May 4, 2026
Merged

Reorganize examples and demos taxonomy#3127
caio-pizzol merged 2 commits intomainfrom
caio/sd-2928-examples-demos-reorg

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Summary

  • Add public examples and demos manifests with sourceRepo/sourcePath/liveUrl fields for homepage consumption
  • Move extension authoring demos into advanced examples and rename proofing examples to spell-check, with README shims at old paths
  • Remove duplicate starter demo apps from demos/ and point old paths at getting-started examples
  • Update CI smoke matrices and docs links for the moved paths

Verification

  • pnpm install --frozen-lockfile --ignore-scripts --offline
  • pnpm build:superdoc
  • pnpm check:examples-demos
  • pnpm exec prettier --check examples/manifest.json demos/manifest.json examples/README.md demos/README.md .github/workflows/ci-examples.yml .github/workflows/ci-demos.yml apps/docs/editor/spell-check/overview.mdx apps/docs/editor/spell-check/custom-provider.mdx
  • EXAMPLE=advanced/extensions/custom-mark pnpm --dir examples/tests exec playwright test
  • EXAMPLE=advanced/extensions/custom-node pnpm --dir examples/tests exec playwright test

Notes

  • The separate homepage repo still has hardcoded gallery data. This PR creates the manifest source of truth; the gallery should be updated in a follow-up PR after this lands.
  • The separate superdoc-dev/demos repo is not touched here.

@caio-pizzol caio-pizzol requested a review from a team as a code owner May 4, 2026 19:38
@linear
Copy link
Copy Markdown

linear Bot commented May 4, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8081a4da8c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread demos/react/README.md
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…bnail (SD-2928)

- demos/__tests__/playwright.config.ts: default DEMO now points at
  custom-ui (a curated source demo that survives the reorg). The prior
  default was 'react', which is now a README-only shim with no
  package.json, so running the demos smoke suite locally without a
  DEMO override would fail.
- demos/manifest.json: clear thumbnail for custom-ui to null. The
  referenced demos/custom-ui/demo-thumbnail.png does not exist in the
  repo, so a homepage gallery consuming this manifest would render a
  broken image. Other demos already use null when no thumbnail
  exists; this matches that convention.
@caio-pizzol caio-pizzol merged commit e627b28 into main May 4, 2026
69 of 70 checks passed
@caio-pizzol caio-pizzol deleted the caio/sd-2928-examples-demos-reorg branch May 4, 2026 23:36
caio-pizzol added a commit that referenced this pull request May 4, 2026
First focused minimal example under examples/editor/custom-ui/.
Single file (~99 lines) demonstrating the cleaned-up controller
surface from SD-2917 / SD-2918 / SD-2919 / SD-2920:

- createSuperDocUI({ superdoc }) accepts the SuperDoc instance
  directly. No cast.
- ui.createScope() collects every subscription, custom command
  registration, and DOM listener; ui.destroy() cascades into every
  scope so consumers tear everything down with one call.
- Per-command observe(state => ...) so each button only re-renders
  when its own command flips, matching the React useSuperDocCommand
  pattern.
- BUILT_IN_COMMAND_IDS, ui.commands.has(id), and ui.commands.require(id)
  validate a config-driven button list at startup so a typo cannot
  ship silently.
- One custom command via scope.register(...), auto-unregistered on
  scope teardown.

Also surfaced and fixed: PublicToolbarItemId was added to the runtime
exports of superdoc/ui (SD-2920) but never re-exported as a type from
the public sub-entry. This commit threads it through
super-editor/src/ui/index.ts and superdoc/src/ui.d.ts so consumers
can type their config arrays without dipping into the
headless-toolbar entry.

Wired into examples/manifest.json and a new custom-ui CI smoke job.
Stacked on caio/sd-2928-examples-demos-reorg until #3127 merges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants