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

Storyshots addon refactoring #3745

Merged
merged 11 commits into from
Jun 12, 2018
Merged

Storyshots addon refactoring #3745

merged 11 commits into from
Jun 12, 2018

Conversation

igor-dv
Copy link
Member

@igor-dv igor-dv commented Jun 10, 2018

Issue: including changed needed for #2517 (probably for #3152 too)

This PR is rebased on "storyshots-separation" branch because I didn't want to wait for the #3742 to be merged.

What I did

  1. Created and exposed a class called Stories2SnapsConverter in order to map story-files to snapshot-files and vise versa.
  2. Refactored a structure of the addon to make it more maintainable/readable.
  3. Fixed Storyshots with Storybook 4 for React fails with Angular import. #3754

…the snapshot files + extract api to a separate dir structure
@codecov
Copy link

codecov bot commented Jun 10, 2018

Codecov Report

Merging #3745 into master will increase coverage by 0.3%.
The diff coverage is 87.01%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #3745     +/-   ##
=========================================
+ Coverage   41.23%   41.53%   +0.3%     
=========================================
  Files         459      461      +2     
  Lines        5100     5128     +28     
  Branches      860      860             
=========================================
+ Hits         2103     2130     +27     
- Misses       2482     2483      +1     
  Partials      515      515
Impacted Files Coverage Δ
...s/storyshots-core/src/frameworks/vue/renderTree.js 0% <ø> (ø)
...ots-core/src/frameworks/react/renderShallowTree.js 100% <ø> (ø)
.../storyshots-core/src/frameworks/html/renderTree.js 0% <ø> (ø)
...storyshots-core/src/frameworks/react/renderTree.js 100% <ø> (ø)
...ots/storyshots-core/src/api/getIntegrityOptions.js 85.71% <ø> (ø)
...oryshots-core/src/frameworks/angular/renderTree.js 0% <ø> (ø)
.../storyshots-core/src/frameworks/require_context.js 91.66% <ø> (ø)
...yshots/storyshots-core/src/frameworks/rn/loader.js 0% <ø> (ø)
...ts/storyshots-core/src/frameworks/hasDependency.js 50% <ø> (ø)
...s/storyshots-core/src/frameworks/angular/loader.js 12.5% <0%> (ø)
... and 17 more

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 b21660f...3063a77. Read the comment docs.

@Hypnosphi Hypnosphi changed the base branch from storyshots-separation to master June 10, 2018 19:02
@Hypnosphi
Copy link
Member

LMK when it's ready for review

@igor-dv igor-dv added ready and removed in progress labels Jun 10, 2018
@igor-dv
Copy link
Member Author

igor-dv commented Jun 10, 2018

I think it's ready. Will work on other stuff in smaller PRs.

@@ -307,9 +307,32 @@ initStoryshots({

Take a snapshot of a shallow-rendered version of the component. Note that this option will be overriden if you pass a `renderer` option.

### `getSnapshotFileName`
Copy link
Member

Choose a reason for hiding this comment

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

It's probably worth mentioning in MIGRATION.md, as well as puppeteer moving to other package

@igor-dv
Copy link
Member Author

igor-dv commented Jun 12, 2018

@Hypnosphi, can I merge this?

@igor-dv igor-dv merged commit 5180de5 into master Jun 12, 2018
@igor-dv igor-dv deleted the storyshots-refactoring branch June 12, 2018 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants