-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Story Hierarchy improved UI #1356
Conversation
Conflicts: lib/ui/package.json
…hy to resolveStoryHierarchyNamespace
Add left panel hierarchy support
Codecov Report
@@ Coverage Diff @@
## release/3.2 #1356 +/- ##
===============================================
+ Coverage 14.35% 15.29% +0.94%
===============================================
Files 201 202 +1
Lines 4613 4706 +93
Branches 602 508 -94
===============================================
+ Hits 662 720 +58
- Misses 3447 3563 +116
+ Partials 504 423 -81
Continue to review full report at Codecov.
|
lib/ui/src/modules/api/index.js
Outdated
@@ -8,6 +8,7 @@ export default { | |||
name: 'STORYBOOK', | |||
url: 'https://github.com/storybooks/storybook', | |||
sortStoriesByKind: false, | |||
resolveStoryHierarchy: storyName => [storyName], |
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.
I guess we'll lose a serialized function after passing through the channel.
We can consider options:
- pass only JSON data here
- provide this API on the
manager
side (it'll be available inaddons.js
)
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.
I think I'll just change it to be symbol/regex.
hierarchySeparator: '/'
or hierarchySeparator: '.'
Ok. (Beside the thing I need to fix with what @usulpro pointed on) Here is the experimental use of react-treebeard (because of this) There are warnings because of this, but it looks very promising. |
@@ -177,16 +177,16 @@ storiesOf('component.Button') | |||
|
|||
// Atomic | |||
|
|||
storiesOf('Atoms.Molecules.Cells.simple', module) | |||
storiesOf('Atoms¯\\_(ツ)_/¯Molecules.Cells/simple', module) |
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.
awesome ❤️
Some updates for the new version I've added Ionicons from the react-icons. |
Looks great! If we got this package in dependencies I can switch to it in #981 as well |
I thought it would be great to have it integrated to theming api too |
@@ -15,8 +15,7 @@ module.exports = latestVersion('@storybook/react-native').then(version => { | |||
packageJson.devDependencies['@storybook/react-native'] = `^${version}`; | |||
|
|||
if (!packageJson.dependencies['react-dom'] && !packageJson.devDependencies['react-dom']) { | |||
const reactVersion = packageJson.dependencies.react; | |||
packageJson.devDependencies['react-dom'] = reactVersion; | |||
packageJson.devDependencies['react-dom'] = '^15.5.4'; |
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.
hmm?
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.
idk what is this ¯\(ツ)/¯ ? Maybe it was somehow merged from the previous PR ?
@@ -31,8 +31,7 @@ module.exports = latestVersion('@storybook/react-native').then(version => { | |||
packageJson.devDependencies['@storybook/react-native'] = `^${version}`; | |||
|
|||
if (!packageJson.dependencies['react-dom'] && !packageJson.devDependencies['react-dom']) { | |||
const reactVersion = packageJson.dependencies.react; | |||
packageJson.devDependencies['react-dom'] = reactVersion; | |||
packageJson.devDependencies['react-dom'] = '^15.5.4'; |
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.
hmm?
|
||
// Atomic | ||
|
||
storiesOf('Atoms¯\\_(ツ)_/¯Molecules.Cells/simple', module) |
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.
should be cells/molecules/atoms
? current order doesn't make sense to me?
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.
I'll fix it.
package.json
Outdated
@@ -58,7 +58,7 @@ | |||
"jest": "^20.0.4", | |||
"jest-enzyme": "^3.2.0", | |||
"lerna": "2.0.0-rc.5", | |||
"lint-staged": "^4.0.0", | |||
"lint-staged": "^3.5.1", |
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.
downgrade?
…archy Conflicts: addons/info/README.md
Yeah, it's green now =) |
Is it ready to check out? |
'storiesHierarchy', | ||
'selectedKind', | ||
'selectedHierarchy', | ||
'selectedStory', |
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.
Don't we need to have selectedStory
and selectedKind
in propTypes
?
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.
I think linter cries that they are not in use in here. these props just passed further to stories.js where they are actually defined in prop types.
I think it's ready, but non of the reviewers acepted the PR ... |
@igor-dv I guess we will wait to merge the treebeard improvements until after the new version is ready on NPM? |
@shilman , yes, I think so. I'll merge this one and then will open a new PR for the improvements. |
Issue: #151
What I did
Continuation of #1329, but in the main storybook repo
How to test
Run
cra-kitchen-sink
(see #1329)