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

Addon Panel UI for mocked Apollo data #4

Closed
brendanrygus opened this issue Sep 15, 2020 · 5 comments · Fixed by #8
Closed

Addon Panel UI for mocked Apollo data #4

brendanrygus opened this issue Sep 15, 2020 · 5 comments · Fixed by #8
Labels
enhancement New feature or request

Comments

@brendanrygus
Copy link
Contributor

Hi @lifeiscontent, thanks for your work on upgrading, it looks like this is now the leading Apollo addon in the v3 ecosystem.

Background

I recently started a new Apollo project and observed that the Dev Tools struggle with mocked data and Storybook iframes.

Proposed Changes

I believe it would improve the DX for Apollo-connected components if developers could visualize the mocked Apollo data while using Storybook. I've been prototyping some addon panel UI to display the mocks and metadata driving each Story.

Example: Demo video

Themes-Req
Themes-Resp

Is there any interest in adding this to storybook-addon-apollo-client until the official Dev Tools support Storybook?
I'd be happy to put up a draft PR for discussion.

Further Comments

Might be worth mentioning that I merged a couple of related PRs into Storybook recently:

@lifeiscontent
Copy link
Owner

@brendanrygus Hey thanks for reaching out!

This looks like an awesome addition, would you have time to work on it / pair on it together?

If not, I'll see if I can put something together when I have some free time during the weekend.

@lifeiscontent lifeiscontent added the enhancement New feature or request label Sep 15, 2020
@brendanrygus
Copy link
Contributor Author

Sweet, thanks for the lightning-quick reply.
I'll set up a branch in the next couple of days and copy over the work I've done in our project repo. It's only a few files.

Maybe we can test it against some components from the realworld app. So far my test data set has been pretty small - only a couple of components with queries - so I'm interested to see what kind of edge cases are left to be uncovered.

@lifeiscontent
Copy link
Owner

@brendanrygus sounds good, I'd like to add this feature so it works for storybook 5 and 6, and apollo 2 and 3 so we can start with the version you have and backport accordingly so other developers can benefit from these awesome changes 🎉

go ahead and create a PR, then we can move forward on how to backport from there. 👍

brendanrygus added a commit to brendanrygus/storybook-addon-apollo-client that referenced this issue Sep 16, 2020
@brendanrygus
Copy link
Contributor Author

@lifeiscontent Put up the first PR and tested setting it up as a local dependency on my machine. Please give it a shot against some of your own Apollo-connected stories!

@lifeiscontent
Copy link
Owner

lifeiscontent commented Sep 17, 2020

@brendanrygus Cool will take a look this weekend, thanks for putting this together!

brendanrygus added a commit to brendanrygus/storybook-addon-apollo-client that referenced this issue Sep 24, 2020
brendanrygus added a commit to brendanrygus/storybook-addon-apollo-client that referenced this issue Sep 24, 2020
@lifeiscontent lifeiscontent linked a pull request Nov 28, 2020 that will close this issue
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants