Tutorial: preview the unreleased kolay (docs() plugin rework) - #2200
Merged
NullVoxPopuli merged 2 commits intoJul 27, 2026
Merged
Conversation
kolay's next release reworks the plugin API (universal-ember/kolay#323). Preview it here the way ember-primitives#794 does: a pnpm override resolves kolay to the built package contents kolay pushes to its dist branch on every commit to main. Migration off the 4.x options: - kolay({src, exclude, onlyDirectories, packages}) -> docs('docs', {src: import.meta.resolve('./public/docs')}); the manifest is file-based (each lesson's prose.md is the page) - addRoutes(this, 'docs') mounts the group at the root URL space, so all tutorial URLs are unchanged - optimizeDeps.exclude kolay: the scoped-route registry is stateful, the router and docs service must share one module instance - lessonPath() maps manifest paths (/docs/**/prose.md) to lesson URLs - isHidden takes over what exclude/onlyDirectories did: x-* segments and stray .md notes hidden everywhere, keyed-each-blocks dev-only - setupKolay's empty resolve option is gone (it's modules now) - cssTarget keeps light-dark() out of lightningcss downleveling Depends on universal-ember/kolay#350 (top-level scoped mounts registered the wrong route name); verified locally with that fix applied to the resolved dist copy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
Collaborator
Author
|
CI confirms the dependency called out above: the only failures are the tutorial "Visiting" tests (the scoped root mount), against a dist kolay that predates universal-ember/kolay#350. Every other suite passes. Once #350 merges and dist updates, I'll re-pin with |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Footnotes
|
NullVoxPopuli
approved these changes
Jul 27, 2026
Merged
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.
Previews the unreleased kolay (the plugin rework, universal-ember/kolay#323) on the tutorial app before the release — same mechanism as universal-ember/ember-primitives#794: a root
pnpm.overridesentry resolveskolaytogithub:universal-ember/kolay#dist(the built package contents kolay pushes on every commit tomain), soapps/tutorialkeeps its declared range. When kolay releases, the override goes away and the range gets bumped instead.Migration (kolay 4.x → next)
kolay({ src, exclude, onlyDirectories, packages })→docs('docs', { src: import.meta.resolve('./public/docs') }). The manifest is file-based now (each lesson'sprose.mdis the page; the app already normalized/prose.mdoff paths).import.meta.resolveis required — a relativesrcproduces broken/@fsimports (noted on Top-level scoped mounts register the real route name ('page', not 'application.page') universal-ember/kolay#350).addRoutes(this, 'docs')— a scoped mount serving the group from the root URL space, so all tutorial URLs are unchanged (/1-introduction/1-basics, …).optimizeDeps.exclude: ['kolay']: the scoped-route registry is stateful, so the router and the docs service must share one module instance (kolay's own docs-app does the same).lessonPath()util maps manifest paths (/docs/**/prose.md) to lesson URLs;selection,docs,selected, andnextPagego through it.excludeoption is gone.x-*chapters were already hidden app-side (isHidden, with the?showHiddenescape hatch); the check is segment-based now sox-*files inside chapters stay hidden too, andkeyed-each-blockskeeps its dev-only visibility viaimport.meta.env.PRODin the same place. Net behavior change: hidden chapters are now routable by direct URL in prod (they 404'd via manifest-absence before) — their content was always fetchable from/docs/**anyway.onlyDirectoriesis gone too, so the stray.mdnotes sitting next to lesson directories (8 of them under7-form-data/) would become broken nav entries (noprompt.gjs/prose.mdbeneath them).isHiddennow admits only lesson directories (via theirprose.md), matching the old manifest exactly: 14 chapters / 68 lessons in prod, +keyed-each-blocksin dev.setupKolay: the emptyresolve: {}option is gone (it'smodulesnow).cssTarget: vite 8's default downlevelslight-dark()into space-toggle vars whose:rootdefinitions don't survive chunking, invalidating kolay's colors (found on ember-primitives#794); target browsers that support it natively.Depends on
'application.page'instead of'page'(ember's DSL reports the map root's parent as'application'), so the mount is never detected. Verified locally with that fix applied to the resolved dist copy; once #350 merges,pnpm update kolayhere re-pins dist and this PR goes green.Verification
x-*hidden,keyed-each-blocksvisible in dev), prev/next navigation, prose + editor + live output all work; URLs identical to production todaylint:typespasses; the visitable application test suite passes locallylight-dark()preserved in CSS;keyed-each-blockshidden🤖 Generated with Claude Code