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

Feat: Add support for Flow to @addons/storysource #4971

Merged
merged 4 commits into from
Dec 14, 2018

Conversation

Nemvts
Copy link

@Nemvts Nemvts commented Dec 11, 2018

Issue: Feat: #4955

What I did

Add Prettier Flow parser to @addons/storysource

flow is now an available option for parser under the loader options

How to test

I added some flow type annotations to a few kitchen sink app stories to ensure that storybook was able to launch and storysource was able to parse Flow's syntax.

  • Is this testable with Jest or Chromatic screenshots?
    Can create a mock file to test the inject decorator with flow stories

  • Does this need a new example in the kitchen sink apps?
    No

  • Does this need an update to the documentation?
    Yes, include flow as an available option.

If your answer is yes to any of these, please make sure to include it in your PR.

@codecov
Copy link

codecov bot commented Dec 11, 2018

Codecov Report

Merging #4971 into next will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #4971      +/-   ##
==========================================
+ Coverage   35.06%   35.11%   +0.04%     
==========================================
  Files         563      564       +1     
  Lines        6975     6978       +3     
  Branches      934      935       +1     
==========================================
+ Hits         2446     2450       +4     
+ Misses       4034     4033       -1     
  Partials      495      495
Impacted Files Coverage Δ
addons/storysource/src/loader/parsers/index.js 85.71% <100%> (+5.71%) ⬆️
...dons/storysource/src/loader/parsers/parser-flow.js 100% <100%> (ø)
addons/storysource/src/loader/parse-helpers.js 88.09% <0%> (+2.38%) ⬆️

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 d3bffb1...1103e6a. Read the comment docs.

Copy link
Member

@igor-dv igor-dv left a comment

Choose a reason for hiding this comment

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

@Nemvts
Copy link
Author

Nemvts commented Dec 14, 2018

I have added unit tests for the flow usecase and the code coverage looks good now.

@igor-dv
Copy link
Member

igor-dv commented Dec 14, 2018

Can you please merge from the next branch. Should solve the CI problems

@ndelangen ndelangen self-assigned this Dec 14, 2018
@ndelangen
Copy link
Member

I merged in next for you

@ndelangen
Copy link
Member

@igor-dv Do you feel strongly about #4971 (review) ?

We could merge this and add the use-case later? I'll leave it up to you to merge.

@igor-dv
Copy link
Member

igor-dv commented Dec 14, 2018

The tests were added so 👌

@igor-dv igor-dv merged commit c404777 into storybookjs:next Dec 14, 2018
@Nemvts Nemvts deleted the 4955-storysource-flow-parser branch December 16, 2018 06:04
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.

3 participants