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

issue #4174 : support the tagConstructor option #4258

Merged
merged 1 commit into from
Oct 3, 2018

Conversation

libetl
Copy link
Member

@libetl libetl commented Oct 1, 2018

Issue:

What I did

added the support for configuring a specific tagConstuctor in a story
See #4174

How to test

Is this testable with Jest or Chromatic screenshots? yes
Does this need a new example in the kitchen sink apps? yes
Does this need an update to the documentation? no

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

@@ -49,7 +50,13 @@ function renderStringified({
eval(getRidOfRiotNoise(`${compiled}`)); // eslint-disable-line no-eval
});
const sourceCode = `<root>${template}</root>`;
if (template !== '<root/>') eval(getRidOfRiotNoise(`${compiler.compile(sourceCode, {})}`)); // eslint-disable-line no-eval
const compiledRootSource = !tagConstructor
Copy link
Member

Choose a reason for hiding this comment

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

Can you please extract this to a separate function? I think riot rendering in storybook is kinda complicated (comparing to other apps), so having it as clear and granular as possible will be helpful =)

Copy link
Member Author

Choose a reason for hiding this comment

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

okay. This evening after my workday.

Copy link
Member Author

@libetl libetl Oct 2, 2018

Choose a reason for hiding this comment

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

refactored (code moved but not changed)

@libetl libetl force-pushed the feature/riot-use-constructor-in-stories-js branch from c24d992 to 73ea7bc Compare October 2, 2018 21:18
@codecov
Copy link

codecov bot commented Oct 2, 2018

Codecov Report

Merging #4258 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4258      +/-   ##
==========================================
+ Coverage   40.61%   40.62%   +0.01%     
==========================================
  Files         495      495              
  Lines        5875     5876       +1     
  Branches      784      785       +1     
==========================================
+ Hits         2386     2387       +1     
  Misses       3111     3111              
  Partials      378      378
Impacted Files Coverage Δ
app/riot/src/client/preview/render-riot.js 100% <100%> (ø) ⬆️

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 c62a571...73ea7bc. Read the comment docs.

@igor-dv igor-dv merged commit e8bd830 into master Oct 3, 2018
@igor-dv igor-dv deleted the feature/riot-use-constructor-in-stories-js branch October 3, 2018 07:16
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