thegreenwebfoundation / developer-docs

The developer documentation site for The Green Web Foundations open source libraries.
https://developers.thegreenwebfoundation.org
Apache License 2.0
5 stars 13 forks source link

Missing explainer for using other models/model versions in CO2.js tutorials #60

Open fershad opened 3 months ago

fershad commented 3 months ago

Describe the bug Currently, the CO2.js tutorials only show how to perform actions using the default implementation (Sustainable Web Design Model v3). At the very least, it would be helpful to show how to run each tutorial using other models/versions - like OneByte and Sustainable Web Design Model v4.

To Reproduce Steps to reproduce the behavior:

  1. Got to a CO2.js tutorial (e.g. https://developers.thegreenwebfoundation.org/co2js/tutorials/getting-started-browser/)
  2. Scroll to a code block showing CO2.js being used
  3. Notice that there is no mention of changing models, or alternate models/versions available.

Expected behavior It would be good to allow users to interact with code blocks, and change the model or model version they wish to use. This can be reflected in the code example they're presented & persisted through the rest of the docs.

Screenshots

image
fershad commented 3 months ago

The seven-minute-tabs (https://github.com/zachleat/seven-minute-tabs) web component is used in other parts of the site (like the Greencheck API page). This would be a great thing to use for this as well.