Skip to content

fix(storybook): preserve legacy data visualization story links - #1422

Closed
liuliu-dev wants to merge 1 commit into
mainfrom
liuliu/fix-datavis-story-links
Closed

liuliu-dev wants to merge 1 commit into
mainfrom
liuliu/fix-datavis-story-links

Conversation

@liuliu-dev

Copy link
Copy Markdown
Contributor

Summary

The published color-datavis--highcharts-accent-colors URL fails with NoStoryMatchError because the legacy stories were replaced with renamed DataVis stories. Restore backward-compatible accent and muted story IDs while preserving the current stories and sidebar.

List of notable changes:

  • added legacy Highcharts accent/muted aliases that reuse the current DataVis renderers and decorators.
  • kept aliases out of the sidebar and automatic test discovery using !dev/!test tags.
  • added eight explicit Playwright regression cases covering legacy/current accent/muted links in light/dark themes, populated tables, and resolved swatch colors.
  • No design tokens or dependencies changed.

What should reviewers focus on?

  • Legacy deep links resolve without duplicating current stories in the sidebar.
  • Current story IDs, token values, and theme behavior remain unchanged.

Steps to test:

  1. Open the Storybook preview with ?path=/story/color-datavis--highcharts-accent-colors&globals=theme%3Alight and verify the accent token table renders.
  2. Repeat with color-datavis--highcharts-muted-colors, then verify both current data-vis-* URLs still work in light and dark themes.
  3. Confirm the sidebar contains only current DataVis stories, not duplicate Highcharts entries.

Validation performed:

  • npm run lint && npm run format && npm run test && npm run build — passed, including 536 unit tests and 9 integration tests; rerun successfully on this isolated PR branch.
  • STORYBOOK_URL=http://localhost:6008 npx playwright test e2e/storybook.test.ts --grep 'data visualization story links' --workers=2 — passed, 8/8 cases.
  • Browser check of the original manager deep link against local Storybook — passed; rendered the accent table with 18 rows.
  • Initial browser attempts encountered missing Chromium and another repository's server on port 6006; installed Chromium and reran successfully against this repository's server on port 6008.

Supporting resources (related issues, external links, etc):

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change
  • Verify the design tokens changed in this PR are expected using the diffing results in this PR

Restore the published Highcharts accent and muted story IDs as hidden aliases of the current DataVis stories. Cover legacy and current URLs in light and dark themes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@liuliu-dev
liuliu-dev requested a review from a team as a code owner October 22, 2026 22:36
@liuliu-dev
liuliu-dev requested review from tay1orjones and a balanced review from Copilot October 22, 2026 22:36
@changeset-bot

changeset-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d22ceea

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The aliases reuse existing rendering behavior, focused regression coverage is included, and no blocking issues were identified.

No open issues 🎉

What changed in this PR

Restores legacy DataVis Storybook links after the story restructuring while preserving current stories and sidebar entries.

Changes:

  • Adds legacy Highcharts accent and muted aliases that reuse the current renderers.
  • Excludes aliases from the sidebar and automatic test discovery.
  • Adds eight Playwright cases covering legacy/current links, light/dark themes, populated tables, and nontransparent swatches.
File Description
e2e/​storybook.test.ts Adds explicit regression coverage for legacy and current DataVis links.
docs/​storybook/​stories/​Color/​Display/​DataVisColors.stories.tsx Adds backward-compatible story aliases without duplicate sidebar entries.

Review effort: Balanced

@liuliu-dev liuliu-dev added the skip changeset Apply to PRs that should not result in a version bump. label Oct 22, 2026
@liuliu-dev

Copy link
Copy Markdown
Contributor Author

fix in primer-docs instead https://github.com/github/primer-docs/pull/1395

@liuliu-dev liuliu-dev closed this Oct 22, 2026

This branch was successfully deployed

2 active deployments
Preview (Storybook) — d22ceeae Deployed Oct 22, 2026 by github-actions[bot]
github-pages — d22ceeae Deployed Oct 22, 2026 by liuliu-dev via Build and deploy / Deploy #4378
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changeset Apply to PRs that should not result in a version bump.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants