Skip to content
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

[Documentation]: Improve visibility of argTypesEnhancers and argsEnhancers #30749

Open
mrginglymus opened this issue Mar 4, 2025 · 2 comments

Comments

@mrginglymus
Copy link
Contributor

Describe the problem

I've recently discovered these two parts of the preview API in my efforts to speed up and simplify my automatic storybook controls. I actually raised a discussion (#30082) where I suggested adding an API matching their behaviour before I had found them!

They are very powerful yet simple tools that allow users and plugin developers to provide control information without excessive boilerplate, and so I think storybook would benefit from having them documented more visibly.

I had considered a PR to add some documentation, but I couldn't even begin to work out where it would go (:

Additional context

No response

@shilman
Copy link
Member

shilman commented Mar 6, 2025

It is an intentionally undocumented API. Today we use experimentalX as a naming convention for stuff like this, but we didn't back when we added those APIs. I think if we were doing it today we would've called it experimentalArgTypesEnhancers and it probably would stay experimental for a long time.

@mrginglymus
Copy link
Contributor Author

mrginglymus commented Mar 6, 2025

edit: obligatory xkcd#1172

There are some orphaned documentation files referencing it still:

which may want tidying up then (unless those are internal docs...)


I suppose my question then becomes either

  1. Is there anything that can be done to stablise the API

or -

  1. Is there a plan for an equivalent (or better) new API e.g. in CSF factories

Either of which I'd be keen to contribute towards, as these existing apis have so far proven extremely useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants