storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.68k stars 9.32k forks source link

fix(addon-a11y): Addon-a11y displays visual bug when running the tests #29552

Open JohannesFischer opened 1 week ago

JohannesFischer commented 1 week ago

Closes #24450

What I did

  1. Removed dynamic useResizeDetector styling from global highlight checkbox
  2. Moved GlobalToggle into List

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

Manual testing

  1. Run a sandbox with addon-a11y enabled
  2. Open Storybook in your browser
  3. Access a story and open the Accessibility addon panel
  4. In a story with violations (e.g. Examples / Button / Primary), click "Tests completed" button to rerun tests
  5. Verify that the highlight results checkbox no longer shifts when fetching results
  6. Reduce browser window to < 440px and verify that global checkbox wraps as expected

Mobile viewport Screen Shot 2024-11-06 at 01 00 57

Fetching results Screencast From 2024-11-06 01-00-04.webm

Documentation

Checklist for Maintainers

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

_core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>_

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 78.2 MB 78.2 MB 0 B 1.38 0%
initSize 143 MB 143 MB 0 B 1.19 0%
diffSize 65.2 MB 65.2 MB 0 B 0.49 0%
buildSize 6.88 MB 6.88 MB 0 B 1.97 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B 0.42 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.9 MB 1.9 MB 0 B 2 0%
buildSbPreviewSize 271 kB 271 kB 0 B - 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.88 MB 3.88 MB 0 B 1.97 0%
buildPreviewSize 3 MB 3 MB 0 B - 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 19.4s 6.9s -12s -514ms -1.19 -180.5%
generateTime 20.5s 20.4s -99ms -0.55 -0.5%
initTime 14.5s 14.3s -219ms -0.98 -1.5%
buildTime 9s 7.7s -1s -272ms -1.01 -16.4%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.2s 5.6s 394ms -0.27 7%
devManagerResponsive 3.2s 3.3s 90ms -0.63 2.7%
devManagerHeaderVisible 479ms 510ms 31ms -0.9 6.1%
devManagerIndexVisible 512ms 575ms 63ms -0.78 11%
devStoryVisibleUncached 880ms 901ms 21ms -0.98 2.3%
devStoryVisible 511ms 573ms 62ms -0.63 10.8%
devAutodocsVisible 441ms 460ms 19ms -0.82 4.1%
devMDXVisible 452ms 492ms 40ms -0.34 8.1%
buildManagerHeaderVisible 501ms 509ms 8ms -0.82 1.6%
buildManagerIndexVisible 518ms 521ms 3ms -0.86 0.6%
buildStoryVisible 510ms 504ms -6ms -0.87 -1.2%
buildAutodocsVisible 483ms 412ms -71ms -0.95 -17.2%
buildMDXVisible 382ms 408ms 26ms -0.65 6.4%

Greptile Summary

Fixed visual bug in addon-a11y's highlight results checkbox by simplifying the GlobalToggle component layout and improving responsiveness.

nx-cloud[bot] commented 1 week ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 88a1ad2a032163062b9985834c57671728b318ae. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target - [`nx run-many -t build --parallel=3`](https://cloud.nx.app/runs/hK1kMgXeih?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.