react-cosmos / rfcs

Change requests for React Cosmos
MIT License
1 stars 2 forks source link

Edit in CodeSandbox button #6

Open avocadowastaken opened 4 years ago

avocadowastaken commented 4 years ago

What's up?

React-Cosmos already has an Open fixture button in dev mode, but this functionality is missed in production.

Mkay, tell me more...

I've implemented this using babel plugin with cosmos decorator already: https://github.com/superdispatch/ui/pull/32. It's fine for now, but it's hacky and can break after internal changes in react-cosmos.

ovidiuch commented 4 years ago

Impressive 🤔.

This is a good use case for a React Cosmos plugin. Unfortunately it's too early for me to prepare and document the new plugin API, and I don't want to send you down dark alleys because the current undocumented plugin API will possibly change even if you manage to understand it on your own.

But I will get back to you once the time is right. Hopefully you'll still be interested. Thanks for sharing!

jamiebuilds commented 4 years ago

There is already a tool called codesandboxer that does this (See Docs)

You can see it in action on the Atlaskit website (Up in the top-right corner with the CodeSandbox logo).