question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Addon-controls: Custom sort function

See original GitHub issue

šŸ‘‹ great stuff! huge fan. love the automatic-ness of the new features in v6, especially with typescript. it’s the documentalist’s dream!

Is your feature request related to a problem? Please describe. I use Storybook with React and Typescript. The ordering of props in the ArgsTable seems somewhat based on declaration in the interface with a healthy does of ā€œwhy are you here.ā€ This is quite confusing for a long list of props.

I would like to sort them all alphabetically, but I can’t seem to find an option to do this.

Describe the solution you’d like

// preview.js
export const parameters = {
  controls: { alphabetize: true },
};

just like https://storybook.js.org/docs/react/essentials/controls#show-full-documentation-for-each-property

Describe alternatives you’ve considered I’ve looked through all the docs and react-docgen-typescript and can’t find anything to control the actual ordering of the controls.

Are you able to assist bring the feature to reality? yes, with guidance / directions in the codebase.

Additional context current state of things (this isn’t even the full list):

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:14
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
astorijecommented, Sep 11, 2020

Hey stale bot, I think this would still be very valuable! Especially when using auto-generated controls: when doing so, manually configuring some controls will always position these at the top, even if the configuration is simply to disable the controls, so all auto-generated controls we disabled appear at the top.

2reactions
stale[bot]commented, Sep 11, 2020

Hi everyone! Seems like there hasn’t been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don’t have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Controls - Storybook - JS.ORG
By default, controls are unsorted and use whatever order the args data is processed in ( none ). Additionally, you can sort them...
Read more >
Next-level component showcasing with Storybook controls
Learn about controls, a new Storybook addon that lets you dynamically interact with your React components for demo and testing purposes.
Read more >
ArkInventory (How to use Categories/Basics of Custom Rule ...
WoW Addon Tutorial: ArkInventory (How to use Categories/Basics of Custom Rule Writing). 9.2K views 1 year ago.
Read more >
Create custom toolbar items using global types - YouTube
With Storybook you can build custom DevTools in seconds. And they're immediately shared with your whole team!
Read more >
@storybook/addon-controls | Yarn - Package Manager
Storybook Controls Addon. Storybook Controls gives you a graphical UI to interact with a component's arguments dynamically, without needing to code.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found