Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook bugs in csnx #1121

Open
2 of 3 tasks
jamesmockett opened this issue Jan 29, 2024 · 5 comments
Open
2 of 3 tasks

Storybook bugs in csnx #1121

jamesmockett opened this issue Jan 29, 2024 · 5 comments
Assignees
Labels
Bug Something isn't working

Comments

@jamesmockett
Copy link
Contributor

jamesmockett commented Jan 29, 2024

@jamesmockett jamesmockett added the Bug Something isn't working label Jan 29, 2024
@jamesmockett jamesmockett pinned this issue Jan 29, 2024
@joecowton1 joecowton1 changed the title Issues / annoyances with csnx repo Storybook bugs in csnx Feb 7, 2024
@SiAdcock
Copy link
Contributor

SiAdcock commented Mar 28, 2024

All 3 Source packages have the same error in tsconfig.json:

I'm not able to recreate this error, although admittedly I don't know where to look 😅 I've tried:

  • make storybook
  • make validate
  • viewing the tsconfig.json for each Source project in my editor

Stories using the Backgrounds addon may fail colour contrast checks when running locally and the story is first opened.

The linked issue has been resolved, so maybe this has been fixed. I tried to investigate, however the Accessibility pane is currently giving me the following error message for all stories 🤦‍♂️

The accessibility scan encountered an error.
{"name":"TypeError"}

Upgrading Storybook doesn't help.

My hunch, although I might be on the wrong track: the .storybook/main.js has all this weird Webpack jiggery pokery that is hideously complex. It was created to support Storybook v5 back in the day and has been added to ever since... it can probably now be greatly simplified. Hopefully. Might be worth a shot.

jamesmockett added a commit that referenced this issue Apr 2, 2024
## What are you changing?

- upgrade storybook to v8.0.5
- remove [deprecated
`@storybook/addons`](https://www.npmjs.com/package/@storybook/addons)

## Why?

I naively thought an upgrade might fix the [accessibility
scan](#1121 (comment))
issue. Alas it did not. However I took the opportunity to remove a
deprecated package whilst I was here, which was causing version matching
issues.
@sndrs
Copy link
Member

sndrs commented Apr 9, 2024

confirm if this is still an issue

@jamesmockett
Copy link
Contributor Author

I'm no longer seeing the error in tsconfig.json so this seems to be fixed. (I was seeing it in VS Code where the file was highlighted in red to indicate an error and the "path": "./tsconfig.spec.json" line had a red squiggly which would show the error from the description on hover.)

@jamesmockett
Copy link
Contributor Author

The colour contrast check is still an issue. You can see it on the Inline Error component with the Brand theme selected:
https://main--635a6fffacd30d393597c1ff.chromatic.com/index.html?path=/story/inlineerror--inline-error-brand-theme&globals=viewport:responsive

Because the background fades from white to blue the contrast check happens during an intermediate state. If you switch from the Accessibility tab and back again it reruns the check and passes because there's no fade.

@SiAdcock
Copy link
Contributor

Thanks for the explainer @jamesmockett. To me that sounds like a bug in the accessibility plugin rather than something in our setup. What are the next steps? And is this currently blocking anything from our perspective?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants