site-www
site-www copied to clipboard
Open Tour Section Code Snippets Should Open in Editor
The code snippets should open in an editor so Dart newbies can see exactly how they function. For some learners, it is better if they see how the code works and have the ability to manipulate it rather than being told how it is supposed to work.
Agreed. This is about https://www.dartlang.org/guides/language/language-tour, right? It predates DartPad (and, in fact, was published as a book first) but we should update everything to have a DartPad and, perhaps, use print instead of assert.
Yes. It is about the tour.
Current thinking is that making everything a DartPad would be rather overwhelming, and that we should instead make the first one an embedded DartPad. After that, we'd use DartPads wherever we want to encourage people to play with the feature.
I tried using a DartPad for the first example in the language tour, but unfortunately there's a lag when you first load the page. Bad experience.
I'll leave this open, since it's something we should continue to keep in mind.
I'm going to close this in favor of https://github.com/dart-lang/site-www/issues/3934 as the Language Tour is meant to be used as a reference and DartPad in its current state won't allow this to be performant if we use it across the page. The alternative would be a proper interactive tour or a more broken up language tour which is also being explored.
Thanks again for the suggestion!