-
-
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
Sort the PropsTable rows alphabetically #8830
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/storybook/monorepo/6h74r31vp |
What's you thought about this solution @shilman ? |
I think the order of the prop table should be determined by the order of the props in the user's code. If users want to alphabetize their props they should do that themselves – Storybook shouldn't do that for them. That said, I can see how alphabetizing would be useful for documentation consumers. Perhaps we can sort the table when you click on the "Name" table heading. |
@patricklafrance I agree with @domyen. This solution might be an improvement on the current behavior, but alphabetizing feels like a patch-over for some underlying problem in one of the libraries we're using. Can we figure out what's going on under the hood and fix that instead? (That said, thank you @Joseph-Whiunui for providing an improvement on what's there right now! 🙏🙏🙏 ) |
Some props are more used then others, those should get the most attention. The alphabetical order could be an OK opt-in option though.
? |
I like the idea of making the sorting configurable. Instead of having predefined sorts, the PropsTable could accept a sort function? Still need to find the actual problem thought. |
I'd like to focus on "code definition order" as the default and then possibly add an |
No worries guys it was great to get a look at the OSS process! |
@Joseph-Whiunui if you'd like, I've got a a prototype for something pretty revolutionary that could use some help to get finished.. |
@ndelangen Sure, I'm happy to take a look. |
Would you be able to attend an online meeting maybe? tomorrow? I'll show you what I've got and what the concepts & goals are. Are you on our discord yet? https://discord.gg/sMFvFsG |
It will depend on the time. I'm in NZ so I am available after work (5am-8am GMT) and before (5pm-6pm GMT) Yes, username is Joseph-Whiunui#7094 |
Closing this since #8857 has been merged |
Issue: #8539
What I did
How to test
If your answer is yes to any of these, please make sure to include it in your PR.