OriginProtocol/origin-docs-archived

Improve CodePen Examples

Closed this issue ยท 4 comments

Now that CodePen examples have been added, they need to be less fragile. They currently detect whether or not the reader has a web3-enabled browser and, if not, suggest MetaMask. They don't, however, detect whether or not a MetaMask user is signed in, or validate the currently-selected network. To resolve this issue, fork each of our CodePens and add the following:

  • Move web3 detection into another Pen that is added as an "external resource" in each forked Pen
  • In the external Pen, detect that web3 is set to the Rinkeby network validation and serve an appropriate message if it is not
  • In the external Pen, detect that a web3 account is available and serve an appropriate message if it is not

@micahalcorn I could probably get this issue pretty close to resolved, but may need some help if you want me to give it a shot, let me know.

@DanielVF are we still going to have the CodePen examples in our new docs, or will this no longer be relevant?

I don't think so. It seems like they are really easy to get out of date.

๐Ÿ†— I'll close this for now and revisit the idea once our platform is more stable. Thanks @jpvajda for bringing this one to our attention.