Skip to content

Conversation

walaura
Copy link
Contributor

@walaura walaura commented Dec 21, 2019

This PR adds storybook and theme-ui to support the development of the redesign. there's some WIP components in new-components but they are more to test that storybook actually works than actual components at this stage so don't look at 'em too much.

this is how this looks like:

Screenshot 2019-12-21 at 10 39 57

@acao
Copy link
Member

acao commented Dec 21, 2019

merged #1107 and a few dependabot PRs, but it looks like its just a minor yarn.lock conflict here!

@walaura walaura changed the title [do not merge] add storybook+theme-ui for the new design Add storybook+theme-ui for the new design Dec 22, 2019
@walaura
Copy link
Contributor Author

walaura commented Dec 22, 2019

we good on this end!

@acao
Copy link
Member

acao commented Dec 22, 2019

@walaura so do you want to add this to the netlify build? you’ll just want to add build-storybook to a new “build-demo” script in “packages/graphiql” that builds to somewhere like packages/graphiql/storybook (will need to be gitignored). Then netlify will build it as the last step. Then yoll be able to see it in the deploy preview on each commit

@codecov
Copy link

codecov bot commented Dec 22, 2019

Codecov Report

Merging #1145 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1145   +/-   ##
=======================================
  Coverage   46.22%   46.22%           
=======================================
  Files          64       64           
  Lines        3003     3003           
  Branches      650      650           
=======================================
  Hits         1388     1388           
  Misses       1363     1363           
  Partials      252      252

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e90f243...e16a318. Read the comment docs.

@acao
Copy link
Member

acao commented Dec 22, 2019

eyyyyy
https://deploy-preview-1145--graphiql-test.netlify.com/storybook/

looking nice!

@walaura
Copy link
Contributor Author

walaura commented Dec 22, 2019

yasss!!! whats shall we do about codecov? I can do snapshots for the components as they are now but I really don't think they'll last more than 2 PRs

@acao
Copy link
Member

acao commented Dec 22, 2019

good question! i think we can exclude stories and the theme from coverage. as for components, snapshots make sense. codecov is annoying sometimes haha

@walaura
Copy link
Contributor Author

walaura commented Dec 22, 2019

@acao anything i should do on my end to make that happen?

@acao
Copy link
Member

acao commented Dec 22, 2019

as for excluding coverage, you can just add more lines with exclamation points to the jest.config.js
for snapshots, there seems to be a few guides to using storybook 2 with jest snapshot testing, but also some RTL tests sound good if that makes sense? there is so little to test yet, haha

@walaura
Copy link
Contributor Author

walaura commented Dec 22, 2019

really can't imagine a use for real tests right now so what i can do is we either ignore this or I can delete some of the scrap components?

@acao
Copy link
Member

acao commented Dec 22, 2019

lets just ignore all of new components and everything storybook related in the jest config. i agree this is where blocking on coverage seems unnecessary. also if its ready i can merge it anyways after doing a quick review?

@walaura
Copy link
Contributor Author

walaura commented Dec 22, 2019

yes! go for it ^^ i added snaps and blocked the theme and stories from coverage so this last build might actually go green. if it doesn't feel free to ignore the whole folder for now?

@acao
Copy link
Member

acao commented Dec 22, 2019

ah, so close! can you just tweak that one jest config line to ignore the whole new-components for now? if not I can still force merge and create another PR to ignore the folder since I can't commit to this one

@acao
Copy link
Member

acao commented Dec 22, 2019

oh also some kinda funky bug:
Screen Shot 2019-12-22 at 11 49 40 AM
strange because there is definitely a theme.colors.border... hmm!

@walaura
Copy link
Contributor Author

walaura commented Dec 22, 2019

ooooh, gotta add the context inside the testing scaffold i guess! lemme figure this out on monday. also find out where's the 'allow contributors to push' checkbox

@walaura
Copy link
Contributor Author

walaura commented Dec 22, 2019

oh yeah you should be good to edit?
Screenshot 2019-12-22 at 17 42 48

@acao
Copy link
Member

acao commented Dec 22, 2019 via email

@walaura
Copy link
Contributor Author

walaura commented Dec 23, 2019

oh awesome! thank you! i didnt know about that, handy! would you like me to take care of that today? jest ignore and context? monday is fine too, whatever’s clever

kinda wanna look at context in tests myself! never done it before and i'm curious to see how jest handles this idiomatically. So I guess yeah let's do it on Monday!

@acao
Copy link
Member

acao commented Dec 23, 2019 via email

Copy link
Member

@acao acao left a comment

Choose a reason for hiding this comment

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

Looks great for getting things set up!

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.

2 participants