Reorganize examples and demos taxonomy#3127
Merged
caio-pizzol merged 2 commits intomainfrom May 4, 2026
Merged
Conversation
Contributor
|
📖 Docs preview: https://superdoc-caio-sd-2928-examples-demos-reorg.mintlify.app |
There was a problem hiding this comment.
💡 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".
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.
This was referenced May 4, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
Notes