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

Make sure all code examples are runnable #7293

Open
bmuenzenmeyer opened this issue Nov 29, 2024 · 6 comments
Open

Make sure all code examples are runnable #7293

bmuenzenmeyer opened this issue Nov 29, 2024 · 6 comments
Labels
learn Issues/pr concerning the learn section

Comments

@bmuenzenmeyer
Copy link
Collaborator

Broken out of #7197

At Collab Summit we discussed that there have been instances of the code examples not being runnable snippets.

There are many ways we could approach this, but they all have the same characteristics:

  • execute the code samples against ACTIVE version of Node.js
  • display the code samples on the website

Whether or not the authoritative source code remains on the website or elsewhere represents work and pros/cons for website maintenance and approachability.

@bnb had some more thoughts on how to accomplish this, but I don't think we have any concrete approaches yet.

@bmuenzenmeyer bmuenzenmeyer added the learn Issues/pr concerning the learn section label Nov 29, 2024
@AugustinMauroy
Copy link
Member

execute the code samples against ACTIVE version of Node.js

Shouldn't we use the LTS because that's what's recommended on the home page?

@ovflowd
Copy link
Member

ovflowd commented Nov 29, 2024

Maybe we should add a tag on each snippet called version="current" or version="lts" so we know which version to run the snippet against.

And then we can also visually add the label with a tooltip so people know if the latest lts or current version support said feature

@bmuenzenmeyer
Copy link
Collaborator Author

The home page recommends 22 right now, which is ACTIVE.

@ovflowd
Copy link
Member

ovflowd commented Nov 30, 2024

The home page recommends 22 right now, which is ACTIVE.

Wdym with active? 22 is LTS.

@bmuenzenmeyer
Copy link
Collaborator Author

Screenshot_20241129_214005_Chrome.jpg

ACTIVE

@AugustinMauroy
Copy link
Member

If we go back to the idea of having the version for which the document was designed in metadata. This makes it possible to keep the code functional on a given version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
learn Issues/pr concerning the learn section
Projects
None yet
Development

No branches or pull requests

3 participants