-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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 sorting #6472
Story sorting #6472
Conversation
It gets called with the right values, but it always returns 'undefined'
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-fork-snowystinger-feature-story-sorting.storybook.now.sh |
@snowystinger Thanks for taking a go at this. I think the issue here is that I think @ndelangen is trying to address this with a unified config that makes configuring the preview and the manager easier. |
@shilman I thought that might be an issue, but got tripped up because the sorting function in config.js is getting called. It's just not returning anything. Where is @ndelangen working on this? I'd like to follow along if possible. |
@snowystinger I could brief you next week if you'd like. I could use some company, possibly some pair programming would do me some good. Tomorrow I'll be at React Amsterdam Conference, weekend I'll be resting, or at the very least trying to rest. |
What do you want to do with this PR? |
@ndelangen happy to help out in any way :) and have time next week. One thought I did have was that I could take out the addParams bit and just auto sort alphabetically, then at least there'd be a deterministic way to deal with this until the sorting is exposed. |
Good job! Thank you! |
Unsure if I should also remove the stuff for addParameters?
@Armanio updated. Should I also remove the logic for pulling it from the parameters object for now? |
No, I think everything is fine. 👍 |
Related to monoconfig |
Issue: #6439
Story sorting now takes place in story_store. This is so that the Object.values returns the correct order and sorting is not needed elsewhere.
What I did
Added a Param to the global params called storySort which takes a sort function. If none is provided then the default alphabetical sort is used.
How to test
If your answer is yes to any of these, please make sure to include it in your PR.