Esri / arcgis-rest-js

compact, modular JavaScript wrappers for the ArcGIS REST API
https://developers.arcgis.com/arcgis-rest-js/
Apache License 2.0
353 stars 121 forks source link

docs should include link(s) to some kind of coding sandbox (jsBin, codepen, jsFiddle, etc) #340

Open tomwayson opened 6 years ago

tomwayson commented 6 years ago

I think we want to get people from reading docs to typing code in a few clicks as possible. To that end we should have links to (or perhaps embed) a bin/pen/fiddle w/ a hello world for at least each of the broad use cases for the libraries:

Maybe each of those broad categories gets it's own guide page w/ links to related packages, bin/pen/fiddle, related demos. The live bin/pen/fiddles could make it so we could reserve the demos for node and more complicated (auth) browser scenarios.

And/Or maybe we could have a link to a fiddle for the root level pages (example). This could help b/c the CDN snippet currently only shows a <script> tag for that package, but most depend on at least request as well.

Maybe we could go so far as to auto generate a link for each fn that has snippet?

COV-GIS commented 6 years ago

Additionally having the browser demos live at https://esri.github.io/arcgis-rest-js/demos/EACH_EXAMPLE/ would be nice too. Or at least links back to the demos in the repo that pertain to each package. Like the jsapi has for many of the classes and widgets.

tomwayson commented 6 years ago

Good point. I agree that we ought to deploy the browser demos, though it probably won't be as subfolders of the gh-pages docs of this repo. I could see each having a deploy script that publishes to surgh.sh and having all of those run by lerna as part of the deploy script for the docs site.