-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Conversation
@@ -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 |
There was a problem hiding this comment.
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 =)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
c24d992
to
73ea7bc
Compare
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
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.