Skip to content

Commit 7bf0fa7

Browse files
authored
docs: reorg examples folder under new IA (SD-2881) (#3055)
* docs: reorg examples folder under new IA (SD-2881) Move examples to mirror the docs IA (Editor / Document Engine / AI), matching the post-SD-2873 doc structure. Developers reading a Custom UI or Built-in UI page can now click into a parallel examples folder. Editor: - examples/features/comments to examples/editor/built-in-ui/comments - examples/features/track-changes to examples/editor/built-in-ui/track-changes - examples/features/custom-toolbar to examples/editor/built-in-ui/toolbar - examples/features/theming to examples/editor/theming - examples/features/spell-check to examples/editor/proofing - examples/collaboration/{liveblocks,hocuspocus,superdoc-yjs} to examples/editor/collaboration/providers/* - examples/collaboration/{node-sdk,fastapi} to examples/editor/collaboration/backends/* Document Engine: - examples/features/diffing to examples/document-engine/diffing AI: - examples/features/ai-redlining to examples/ai/redlining - examples/collaboration/ai-node-sdk to examples/ai/collaborative-agent Cascading updates: - examples/__tests__/playwright.config.ts: portMap and useConcurrently list updated to new paths. - pnpm-workspace.yaml: add examples/*/*/*/* glob (collaboration providers are now four levels deep). - Doc cross-references swept to new example paths across editor, proofing, collaboration, and AI pages. - Replace two stale Resources cards in superdoc-yjs.mdx that pointed at examples/collaboration/{production,fastify-server} (never existed) with real targets. - Rewrite examples/README.md as a navigable index that mirrors the new structure. * fix(docs): update FastAPI README cd paths after reorg (SD-2881) Codex flagged that the README in examples/editor/collaboration/backends/fastapi/ still told users to `cd examples/collaboration/fastapi` after the path moved. Following the documented steps would fail with 'No such file or directory'. Update the cd commands in this README and its nested yjs-hub/README.md to the new IA path. * fix(ci+examples): finish reorg cascading updates (SD-2881) Codex review on PR #3055 surfaced four cascading-update gaps the reorg left behind. Fix all four. CI workflow (.github/workflows/ci-examples.yml): - collaboration job: working-directory and EXAMPLE both pointed at examples/collaboration/* (gone). Update to examples/editor/collaboration/providers/*. - features job: split into two jobs that match the new IA. built-in-ui (track-changes, comments, toolbar) targets examples/editor/built-in-ui/*; ai (redlining) targets examples/ai/*. ai-redlining moved to examples/ai/redlining and custom-toolbar to examples/editor/built-in-ui/toolbar in the reorg, so the matrix shape changes too. - validate job needs list updated to the new job names. - headless job working-directory unchanged: examples/headless/ai-redlining still exists at the same path. Workspace globs (pnpm-workspace.yaml): - yjs-hub now sits at examples/editor/collaboration/backends/fastapi/ yjs-hub, five segments below examples/. The previous deepest glob was four. Add an examples/*/*/*/*/* glob so the package is picked up by pnpm install --frozen-lockfile. Liveblocks Python smoke (examples/editor/collaboration/providers/ liveblocks/scripts/smoke-python-sdk.py): - Path(__file__).resolve().parents[4] used to point at the repo root when the script lived three directories below the repo. After the move to providers/liveblocks/scripts, parents[4] now points at examples/editor. Update to parents[6] to keep REPO_ROOT correct. READMEs and prose: - examples/editor/collaboration/backends/node-sdk/README.md: cd commands updated from /examples/collaboration/{node-sdk,fastapi} to /examples/editor/collaboration/backends/{node-sdk,fastapi}. - liveblocks README + smoke script and fastapi README: stale prose references to examples/collaboration/* paths swept to the new locations.
1 parent bf71650 commit 7bf0fa7

180 files changed

Lines changed: 728 additions & 382 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Ž.github/workflows/ci-examples.ymlβ€Ž

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,23 @@ jobs:
104104
key: examples-workspace-${{ github.sha }}
105105

106106
- name: Create .env for cloud providers
107-
working-directory: examples/collaboration/${{ matrix.example }}
107+
working-directory: examples/editor/collaboration/providers/${{ matrix.example }}
108108
run: |
109109
if [ "${{ matrix.example }}" = "liveblocks" ]; then
110110
echo "VITE_LIVEBLOCKS_PUBLIC_KEY=${{ secrets.VITE_LIVEBLOCKS_PUBLIC_KEY }}" > .env
111111
fi
112112
113113
- name: Run smoke test
114114
working-directory: examples/__tests__
115-
run: EXAMPLE=collaboration/${{ matrix.example }} npx playwright test
115+
run: EXAMPLE=editor/collaboration/providers/${{ matrix.example }} npx playwright test
116116

117-
features:
117+
built-in-ui:
118118
needs: build
119119
runs-on: ubuntu-latest
120120
strategy:
121121
fail-fast: false
122122
matrix:
123-
example: [track-changes, ai-redlining, comments, custom-toolbar]
123+
example: [track-changes, comments, toolbar]
124124
steps:
125125
- name: Restore workspace
126126
uses: actions/cache/restore@v4
@@ -132,7 +132,27 @@ jobs:
132132

133133
- name: Run smoke test
134134
working-directory: examples/__tests__
135-
run: EXAMPLE=features/${{ matrix.example }} npx playwright test
135+
run: EXAMPLE=editor/built-in-ui/${{ matrix.example }} npx playwright test
136+
137+
ai:
138+
needs: build
139+
runs-on: ubuntu-latest
140+
strategy:
141+
fail-fast: false
142+
matrix:
143+
example: [redlining]
144+
steps:
145+
- name: Restore workspace
146+
uses: actions/cache/restore@v4
147+
with:
148+
path: |
149+
.
150+
~/.cache/ms-playwright
151+
key: examples-workspace-${{ github.sha }}
152+
153+
- name: Run smoke test
154+
working-directory: examples/__tests__
155+
run: EXAMPLE=ai/${{ matrix.example }} npx playwright test
136156

137157
advanced-headless-toolbar:
138158
needs: build
@@ -173,7 +193,7 @@ jobs:
173193
validate:
174194
name: CI Examples / validate
175195
if: always()
176-
needs: [getting-started, collaboration, features, advanced-headless-toolbar, headless]
196+
needs: [getting-started, collaboration, built-in-ui, ai, advanced-headless-toolbar, headless]
177197
runs-on: ubuntu-latest
178198
steps:
179199
- name: Check results

β€Žapps/docs/editor/built-in-ui/comments.mdxβ€Ž

Lines changed: 1 addition & 1 deletion

β€Žapps/docs/editor/built-in-ui/toolbar.mdxβ€Ž

Lines changed: 1 addition & 1 deletion

β€Žapps/docs/editor/built-in-ui/track-changes.mdxβ€Ž

Lines changed: 1 addition & 1 deletion

β€Žapps/docs/editor/collaboration/quickstart.mdxβ€Ž

Lines changed: 1 addition & 1 deletion

β€Žapps/docs/editor/proofing/custom-provider.mdxβ€Ž

Lines changed: 2 additions & 2 deletions

β€Žapps/docs/editor/proofing/overview.mdxβ€Ž

Lines changed: 4 additions & 4 deletions

β€Žapps/docs/editor/superdoc/configuration.mdxβ€Ž

Lines changed: 1 addition & 1 deletion

β€Žapps/docs/guides/collaboration/hocuspocus.mdxβ€Ž

Lines changed: 1 addition & 1 deletion

β€Žapps/docs/guides/collaboration/liveblocks.mdxβ€Ž

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
Β (0)