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

[WIP] Use SnackPlayer for API/Component examples #13646

Closed
wants to merge 1 commit into from
Closed

Conversation

hramos
Copy link
Contributor

@hramos hramos commented Apr 24, 2017

Exploring the possibility of rendering embedded Snack players for each of the examples in the API/Components docs. It works for some components such as ViewPagerAndroid (with warnings), but many other examples fail to load due to the expectation these will be running inside the UIExplorer app.

ViewPagerAndroid

This example works pretty well inside the Snack Player:

screen shot 2017-04-24 at 1 38 22 pm

Warnings

These can be solved by updating all of our examples to use imports.

screen shot 2017-04-24 at 1 40 25 pm

...but we will also need to update the examples to export a class by default:

screen shot 2017-04-24 at 1 43 26 pm

StatusBar

Some examples such as StatusBarExample.js won't load due to the way they export multiple possible examples for use in the UIExplorer app.

screen shot 2017-04-24 at 1 40 10 pm

AlertIOS

These require()s break the example in Snack:

screen shot 2017-04-24 at 1 38 54 pm

See also export warnings.

Next Steps

  • Should we update all examples so that they both work in the UIExplorer app as well as in the Snack Player? Or should we decouple these examples from the UIExplorer?

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Apr 24, 2017
@mkonicek
Copy link
Contributor

Thanks for doing this!

@hramos
Copy link
Contributor Author

hramos commented Apr 25, 2017

With #13606 the new direction is to de-emphasize these as examples. They're part of our testing infrastructure and may not all be fit for instruction.

Let's remove the examples from API/Components all together, and focus on providing more sample code in the full Guides themselves.

@hramos hramos closed this Apr 25, 2017
@hramos hramos deleted the snackplayer branch April 29, 2017 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants