docs(core): document PageScrollLockController like other 2nd-gen controllers - #6534
docs(core): document PageScrollLockController like other 2nd-gen controllers#6534rubencarvalho wants to merge 2 commits into
Conversation
…rollers Move the controller from a bare file into the standard controller folder layout (index.ts, src/, stories/, test/, .mdx) so it gets Storybook docs and demo stories like every other 2nd-gen controller. Wires the new export path into core/package.json.
|
📚 Branch Preview Links🔍 Gen1 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Drop the separate status readout component and the two-host stacked-locks story. One host with a lock/unlock toggle is enough to demonstrate the controller, which has no host interface requirement of its own.
Description
Restructures
PageScrollLockControllerfrom a bare file (controllers/page-scroll-lock.ts) into the standard 2nd-gen controller folder layout used by every other controller (color-controller,hover-controller,placement-controller,pending-controller, etc.):controllers/page-scroll-lock-controller/{index.ts,src/,stories/,test/,page-scroll-lock-controller.mdx}.No behavioral change to the controller itself (
src/page-scroll-lock.tsis an unmodified move). Adds:page-scroll-lock-controller.mdx) covering usage, the reference-counted lock/unlock behavior, and accessibility guidance (it only togglesoverflowondocument.documentElementand does not manage focus).Playground,Overview,Lock and unlock,Accessibility) so the controller is visible in the Storybook controller docs like its siblings. The controller has no host interface requirement, so one plain-LitElementdemo is enough to show it../controllers/page-scroll-lock-controller.jsexport entry incore/package.json.Motivation and context
PageScrollLockControllerwas the only 2nd-gen controller without its own folder, stories, or.mdxdoc page, so it had no Storybook documentation and was easy to overlook compared to the rest of the controllers.Related issue(s)
Screenshots (if appropriate)
N/A — Storybook docs page addition, no visual production component change.
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Controller docs page renders
Controllers/Page scroll lock controllerLock/unlock toggle behavior
overflowvalue is backDevice review
Accessibility testing checklist
Keyboard (required — document steps below)
<button>PageScrollLockController(e.g.swc-popover), since the controller itself is unchangedScreen reader (required — document steps below)
swc-popover) are unaffected sincePopover.base.tscontinues to importPageScrollLockControllerfrom the same package barrel