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

Add visual tests with Storybook & Chromatic #1236

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

mattxwang
Copy link
Member

@mattxwang mattxwang commented Apr 24, 2023

This PR:

  • sets up the basic framework for Storybook
  • adds two UI component tests for buttons and labels (intentionally picked trivial examples)
  • adds action to publish chromatic on push
  • (out of code) sets up a Chromatic account for just the docs, which is synced to all GitHub collaborators

Draft for now as I'm tinkering around; major blockers are:

  • importing "raw" HTML files with relative paths from _site
  • dealing with theme changes
  • JS-based functionality

Related to #805.

@mattxwang mattxwang force-pushed the add-chromatic branch 4 times, most recently from 8b6820b to 322fd68 Compare April 24, 2023 21:43
@mattxwang
Copy link
Member Author

@pdmosses at your convenience, do you want to take a look at this PR? You should have access to our Chromatic account through GitHub OAuth; you should be able to deny/approve the change I made in 3c816ce (changing the color of a purple button).

If you think this UI/service supports the use-case you've described better than Percy, I can then work on adding more components, etc. and getting this merged in. On top of the simple cases I've added, we can also load some JS (ex for search/copy code), add some interactive workflows, etc. - chromatic's website has a few product use-cases (which are mostly free for us to use).

@pdmosses
Copy link
Contributor

pdmosses commented Sep 3, 2023

@pdmosses at your convenience, do you want to take a look at this PR?

I'm afraid I'm unlikely to have much time at all for JTD this month, and I need to prioritise submitting a PR to fix #1323, so I'll have to defer looking at this.

@mattxwang
Copy link
Member Author

No worries at all; this isn't urgent!

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.

None yet

2 participants