Skip to content

FSHSP-208 feat(preview): overview page, dark mode toggle and search - #141

Merged
LBU4SH merged 1 commit into
mainfrom
feat/FSHSP-208-preview-overview-dark-search
Sep 14, 2026
Merged

LBU4SH merged 1 commit into
mainfrom
feat/FSHSP-208-preview-overview-dark-search

Conversation

@LBU4SH

@LBU4SH LBU4SH commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

The throwaway Storybook laid down the kit's pages but nothing to find one's way around them. Three additions, all inside .ui-kit-preview/ — nothing is written outside the disposable folder, which is this mode's whole promise.

  • Overview: the catalogue at a glance, one live sample per component. It is the monorepo's own page, reused verbatim — descriptions, samples and family counts are already written and maintained there, and a second copy would be a second thing to keep true. Only its imports are retargeted, and its version badge speaks of the INSTALLED package.
  • Light/dark toggle: sets data-theme on exactly as ThemeService does in the application, so both modes are judged on the project's own tokens. A manager.ts carries the chrome along — without it, switching to light left a dark sidebar around a light page.
  • Full-text search, down to the section, with scroll-to-anchor.

writeSearchIndex() now takes its roots and its output, and the text-search preset takes them as preset options. With the constants hard-coded, the search swept the PROJECT's MDX files and wrote into its storybook/public/ — measured. Called without options, nothing changes.

The empty index written at scaffold time is not a placeholder for its own sake: Storybook validates staticDirs before webpack ever runs the addon, and stopped dead on a missing public/ — measured, the preview did not start at all.

Verified end to end by mounting the generated folder on this repo's own Storybook: Overview as the landing page, the toggle driving both chrome and tokens, and 64 pages / 748 sections indexed inside the folder.

The throwaway Storybook laid down the kit's pages but nothing to find one's
way around them. Three additions, all inside `.ui-kit-preview/` — nothing is
written outside the disposable folder, which is this mode's whole promise.

- `Overview`: the catalogue at a glance, one live sample per component. It is
  the monorepo's own page, reused verbatim — descriptions, samples and family
  counts are already written and maintained there, and a second copy would be
  a second thing to keep true. Only its imports are retargeted, and its version
  badge speaks of the INSTALLED package.
- Light/dark toggle: sets `data-theme` on <html> exactly as `ThemeService` does
  in the application, so both modes are judged on the project's own tokens. A
  `manager.ts` carries the chrome along — without it, switching to light left a
  dark sidebar around a light page.
- Full-text search, down to the section, with scroll-to-anchor.

`writeSearchIndex()` now takes its roots and its output, and the `text-search`
preset takes them as preset options. With the constants hard-coded, the search
swept the PROJECT's MDX files and wrote into its `storybook/public/` — measured.
Called without options, nothing changes.

The empty index written at scaffold time is not a placeholder for its own sake:
Storybook validates `staticDirs` before webpack ever runs the addon, and
stopped dead on a missing `public/` — measured, the preview did not start at
all.

Verified end to end by mounting the generated folder on this repo's own
Storybook: Overview as the landing page, the toggle driving both chrome and
tokens, and 64 pages / 748 sections indexed inside the folder.
@LBU4SH
LBU4SH force-pushed the feat/FSHSP-208-preview-overview-dark-search branch from 9a5bf4c to a35f7c4 Compare September 14, 2026 11:55
@LBU4SH
LBU4SH merged commit 95dc9b4 into main Sep 14, 2026
3 checks passed
@LBU4SH
LBU4SH deleted the feat/FSHSP-208-preview-overview-dark-search branch September 14, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant