thegreenwebfoundation / thegreenwebfoundation/developer-docs

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

Open
#60 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

gwf-green-code-challenge
Dominant language
JavaScript
Stars
7
Forks
15
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the getting-started-browser tutorial URL and review the code blocks used across the CO2.js tutorials. Document or enable choosing OneByte and Sustainable Web Design Model v4, with the selected model reflected in examples and retained through the rest of the documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.