Skip to content

Track remaining Storybook and Vitest warning cleanup #83611

Description

@ciampo

Goal

Remove the avoidable Storybook and Vitest warnings while keeping useful diagnostics. Each unchecked item is the scope of one PR. Keep fixes for independent causes in separate PRs; do not add broad warning filters, global aliases, blanket polyfills, or weaker assertions.

Baseline

After #83569 and #83602 merged, the Storybook build and smoke run passed 233 files and 875 stories. It still logged 74 E2E docgen skips, one animation docgen failure, 230 browser-externalization messages, 15 deprecation messages, and 10 duplicate-registration messages. The Browser Mode run passed 122 files and logged one vitest:mocks:interceptor warning and one PostCSS missing-from warning. These counts are occurrences in the logs, not distinct root causes. The widget dynamic-import and native config-loader warnings are gone. The retained legacy-component stories intentionally emit their deprecation warnings; they need no cleanup PR.

Gutenberg PRs

Note

All first-party fixes are applied, the remaning tasks depend on the various upstream fixes to be released first

  • Link upstream blockers in code: PR #83632. In one focused Gutenberg PR, add concise references where they explain the current warnings or workarounds: react-docgen-typescript #529 beside Storybook docgen setup, postcss-modules #173 beside the Storybook CSS source fallback, and Vitest #11377 beside the affected Vitest Browser Mode configuration while its fix remains unreleased. Confirm the existing comments for Vite #23512 and Vite #15410 remain next to the PostCSS resolver. State when to revisit or remove each temporary comment or workaround, and remove stale references in the later adoption PRs.
  • E2E Storybook docgen scope: PR #83634. Make the docgen plugin include source files when Vite's root is test/storybook-playwright. Remove the 74 skipped-file warnings and verify generated component descriptions, controls, and ignored props.
  • Storybook PostCSS browser resolution: PR #83635. Reuse the existing PostCSS-only resolver from Browser Mode in Storybook's dependency optimization. Remove the browser-externalization messages without changing diagnostics for unrelated Node imports. Link Vite #23512 in the temporary resolver's comment.
  • Duplicate core/block-editor store registration: PR #83636. Trace the source and built module identities used by the affected stories, then fix the double initialization. Verify story navigation and the absence of duplicate-store errors; keep the registry's error intact.
  • Duplicate core/footnote format registration: PR #83637. Give playground core-block initialization one owner so remounting stories does not register the format again. Verify all four playground stories and navigation between them.
  • BlockPopover fixture API version: PR #83642. Register storybook/example with API version 3 and verify the story in its iframe. Remove its incidental block-version deprecation.
  • Vitest interceptor release adoption: Once a release includes Vitest #11377, update the aligned Vitest packages in one targeted dependency PR and rerun Browser Mode and Storybook smoke checks. The fix is merged upstream but is not in the currently installed 5.0.0 or latest published 5.0.2.
  • Docgen parser fix adoption: After the upstream parser fix is released, update the Storybook docgen dependency in one targeted PR. Verify components/src/animation/index.tsx extracts without a warning and that the design-system manifest and prop descriptions are unchanged.
  • PostCSS source metadata fix adoption: After the upstream correction is released, update the affected dependency in one targeted PR. Add or retain coverage for composed CSS with relative assets in separate directories. Remove the Storybook source fallback only if that coverage proves it unnecessary.
  • Remove the PostCSS browser resolver: After Vite fixes #23512, update Vite and remove the temporary resolver from both Storybook and Browser Mode in one cleanup PR. Keep regression coverage that detects a return of the warning.

Upstream PRs that unblock the Gutenberg PRs

  • react-docgen-typescript parser PR: PR #553. Fix the missing call-signature handling in #529, with a regression case for an @public call signature. Gutenberg reproduces the crash while parsing its animation re-export.
  • postcss-modules source metadata PR: Finish and merge #173, preserving the original file for declarations pulled in by composes and testing relative asset URLs.
  • Vite browser-mapping PR: PR #23590. Resolve #23512 so imports explicitly set to false by a package's browser mapping do not produce browser-externalization warnings. Keep warnings for unsupported Node imports without such a mapping.

The broader experimental Storybook docgen server PR #80697 is open, but its manifest and @ignore behavior need separate review. It should not be adopted solely to silence the parser warning.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    StorybookStorybook and its stories for components[Status] BlockedUsed to indicate that a current effort isn't able to move forward[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions