Skip to content

Report docs previews dropped for a missing example file - #65

Open
ryoaonetsuki wants to merge 1 commit into
deeplethe:devfrom
ryoaonetsuki:fix/report-dropped-previews
Open

ryoaonetsuki wants to merge 1 commit into
deeplethe:devfrom
ryoaonetsuki:fix/report-dropped-previews

Conversation

@ryoaonetsuki

Copy link
Copy Markdown

Why

scripts/build-docs.mjs silently drops a <ComponentPreview> whose example
file does not exist. Today that hides 11 previews: bubble-variants,
calendar-hijri, and 8 on the Message Scroller page (message-scroller-demo,
-anchoring, -previous-context, -streaming, -load-history, -animation,
-commands, -visibility, -scrollable). A section that says "in the example
below" then shows no example, and nobody finds out from the build.

What changes

build-docs now prints every dropped preview to stderr, with its page, at the
end of a successful run. Names ending in -rtl are exempt: those examples are
never files, and the RTL heading they sit under is skipped anyway, so nothing
is lost there.

This is a warning, not a failure, on purpose: those 11 drops already ship, and
failing here would block the build until each missing example is written. The
list is the work to do, not a reason to stop.

How it was checked

  • node scripts/build-docs.mjs prints exactly the 11 drops above, no -rtl
    names, and exits 0; the generated pages are otherwise unchanged.
  • node --test scripts/block-metadata.test.mjs (8 pass), npm run typecheck,
    and npm run build pass; registry.json is unchanged.

Signed-off-by: ryoaonetsuki <ryoaonetsuki@users.noreply.github.com>

This branch has not been deployed

No deployments
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