-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
Support skip via story parameters #228
Merged
+82,370
−53,464
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
|
||
const Box = ({ color }) => ( | ||
<div style={{ width: 100, height: 100, background: color }} /> | ||
); | ||
|
||
export default { | ||
component: Box, | ||
title: 'CSF', | ||
}; | ||
|
||
export const Error404 = () => <Box color="blue" />; | ||
|
||
Error404.story = { | ||
name: '404 Error', | ||
}; | ||
|
||
export const TODO = () => <Box color="green" />; | ||
|
||
TODO.story = { | ||
name: '@TODO', | ||
}; | ||
|
||
export const Skipped = () => <Box color="red" />; | ||
|
||
Skipped.story = { | ||
parameters: { loki: { skip: true } }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,74 @@ | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Storybook</title><meta name="viewport" content="width=device-width,initial-scale=1"><base target="_parent"><style>:not(.sb-show-main) > .sb-main, | ||
:not(.sb-show-nopreview) > .sb-nopreview, | ||
:not(.sb-show-errordisplay) > .sb-errordisplay { | ||
display: none; | ||
} | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<script> | ||
if (window.parent !== window) { | ||
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; | ||
} | ||
</script> | ||
<title>Storybook</title> | ||
|
||
|
||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<div id="error-display"></div> | ||
<script src="static/preview.bundle.js"></script> | ||
</body> | ||
</html> | ||
|
||
.sb-wrapper { | ||
position: fixed; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
padding: 20px; | ||
font-family: "Nunito Sans", -apple-system, ".SFNSText-Regular", "San Francisco", BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
overflow: auto; | ||
} | ||
|
||
.sb-heading { | ||
font-size: 14px; | ||
font-weight: 600; | ||
letter-spacing: 0.2px; | ||
margin: 10px 0; | ||
padding-right: 25px; | ||
} | ||
|
||
.sb-nopreview { | ||
display: flex; | ||
align-content: center; | ||
justify-content: center; | ||
} | ||
|
||
.sb-nopreview_main { | ||
margin: auto; | ||
padding: 30px; | ||
border-radius: 10px; | ||
background: rgba(0,0,0,0.03); | ||
} | ||
|
||
.sb-nopreview_heading { | ||
text-align: center; | ||
} | ||
|
||
.sb-errordisplay { | ||
border: 20px solid rgb(187, 49, 49); | ||
background: #222; | ||
color: #fff; | ||
z-index: 999999; | ||
} | ||
|
||
.sb-errordisplay_code { | ||
padding: 10px; | ||
background: #000; | ||
color: #eee; | ||
font-family: "Operator Mono", "Fira Code Retina", "Fira Code", "FiraCode-Retina", "Andale Mono", "Lucida Console", Consolas, Monaco, monospace; | ||
} | ||
|
||
.sb-errordisplay pre { | ||
white-space: pre-wrap; | ||
}</style><script>/* globals window */ | ||
/* eslint-disable no-underscore-dangle */ | ||
try { | ||
if (window.top !== window) { | ||
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.top.__REACT_DEVTOOLS_GLOBAL_HOOK__; | ||
window.__VUE_DEVTOOLS_GLOBAL_HOOK__ = window.top.__VUE_DEVTOOLS_GLOBAL_HOOK__; | ||
window.top.__VUE_DEVTOOLS_CONTEXT__ = window.document; | ||
} | ||
} catch (e) { | ||
// eslint-disable-next-line no-console | ||
console.warn('unable to connect to top frame for connecting dev tools'); | ||
}</script><style>#root[hidden], | ||
#docs-root[hidden] { | ||
display: none !important; | ||
}</style></head><body><div class="sb-nopreview sb-wrapper"><div class="sb-nopreview_main"><h1 class="sb-nopreview_heading sb-heading">No Preview</h1><p>Sorry, but you either have no stories or none are selected somehow.</p><ul><li>Please check the Storybook config.</li><li>Try reloading the page.</li></ul><p>If the problem persists, check the browser console, or the terminal you've run Storybook from.</p></div></div><div class="sb-errordisplay sb-wrapper"><pre id="error-message" class="sb-heading"></pre><pre class="sb-errordisplay_code"><code id="error-stack"></code></pre></div><div id="root"></div><div id="docs-root"></div><script src="runtime~main.cf4424013badd87a0545.bundle.js"></script><script src="vendors~main.cf4424013badd87a0545.bundle.js"></script><script src="main.cf4424013badd87a0545.bundle.js"></script></body></html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
So
lokiSkip
will continue to exist and behave likeadd
?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.
Yeah, i'll add warnings for now and remove it some time in the future.