-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Milestone
Description
Is your feature request related to a problem? Please describe
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- I have some object properties that are long/nested/hard to read when displayed as unformatted text using the current "textbox" in storybook.
- I'd like to have a more organized way to navigate my JSON properties as an option. (It doesn't need to replace the existing text option, it would just be good to have 1 more choice).
Describe the solution you'd like
A clear and concise description of what you want to happen.
- A control that formats my JSON/object properties in a way that respects indentation/level of depth in the object tree. Any extra controls (expand/collapse, filter, search, etc) are nice-to-have but non critical.
react-cosmoshandles this nicely:- Demo: https://cosmos.flatris.space/?fixtureId=%7B%22path%22%3A%22components%2Fshared%2FGamePanel%2FGamePanel.fixture.js%22%2C%22name%22%3Anull%7D
- Custom editable TreeView component source
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
- Pretty-printing the JSON string prior to putting it into the textbox so it isn't all squashed onto 1 line
- Instead of implementing something custom, using an existing JsonEditor component
Are you able to assist to bring the feature to reality?
no | yes, I can...
- I can help with testing, or possibly implementation with some pointers about what region of code to modify, assuming that this new control is something that matches Storybook's goals.
Additional context
Add any other context or screenshots about the feature request here.
- Example GIF from the cosmos tree editor: https://a.cl.ly/kpuwBXvm
trivigy, wadehammes, yannbf, zaharzagrava, axelv and 13 more
