The first example app (Todo) in https://dart.dev/tutorials/web/low-level-html/add-elements is missing. You should see a DartPad, but instead, you see "Example goes here..."
The example disappeared when we moved the web tutorials to webdev.dartlang.org. (The basic web tutorials have since moved back to dart.dev.)
You can see what it originally looked like here, back when it ran in the page:
http://web.archive.org/web/20130318084500/http://www.dartlang.org:80/docs/tutorials/add-elements
The latest www.dartlang.org version (which uses DartPad) is here:
http://web.archive.org/web/20160702202609/https://www.dartlang.org/docs/tutorials/add-elements/
The first webdev.dartlang.org version is here:
http://web.archive.org/web/20160926070243/https://webdev.dartlang.org/tutorials/low-level-html/add-elements
The good news is that the first app in https://dart.dev/tutorials/web/low-level-html/remove-elements is working — and that app is based on the one in add-elements. So it's just a matter of locating the source code, creating a new gist if necessary, and adding the DartPad to add-elements.
So it's just a matter of locating the source code . . .
@kwalrath I’d like to help fix this. Any ideas of where to look for the source code?
The only difference between the app in https://dart.dev/tutorials/web/low-level-html/remove-elements and the missing one appears to be the addition of a delete button. If I can’t find the source code, I presume this could be fixed by copying the code in the remove-elements tutorial into another gist and then removing the code for the delete button; any reasons why that wouldn’t work?
I think this might be it:
https://github.com/dart-lang/dart-tutorials-samples/tree/master/todo
I think this might be it:
https://github.com/dart-lang/dart-tutorials-samples/tree/master/todo
Great, thanks!
Currently, I'm not sure how to create the necessary gist[1] for the add-elements page (I've never done this before). This is the part I'm not sure about, in the dart-tutorials-samples README:
Run "gist generate". See the readme for information on available options. If you are updating, or creating, gist files rather than generating a test gist, or performing a dry run of the gist generator, you'll need to provide a Gist token. (See the project lead for info on obtaining an existing Gist token.)
Will I need a Gist token to generate the gist for the add-elements page, or am I on the wrong track here?
We can ignore gist generate... I don't know if it works any more, and I think we can just do it by hand. Take a look here to see how a contributor is fixing a similar case:
https://github.com/dart-lang/site-www/issues/1800#issuecomment-536180384
I think you should just fork an existing gist and make the changes. The embedded DartPad URL in remove-elements is https://dartpad.dev/embed-html.html?id=582b9a8d36786566ba08, which means that the gist is at https://gist.github.com/Sfshaza/582b9a8d36786566ba08.
Fork that, view your fork in DartPad, figure out which edits are needed, and save your changes to the gist.
Once we have the right code, I'll fork your gist again, and you can update the .md file to link to my fork. Someday it'll be easier. :/ But until that day...
Thank you very much for your work on this!
We can ignore
gist generate... I don't know if it works any more, and I think we can just do it by hand.
Yeah, it didn't work with my version of Dart (2.6-ish). The project is 4 years old, so that's understandable; perhaps the dart-tutorials-samples README needs an update?
As an aside, do you have any interest in a maintained fork of the gist-generate project (or maybe something similar)? I'd be glad to help with the automation of this sort of process (if possible).
Take a look here to see how a contributor is fixing a similar case:
#1800 (comment)
Thank you! That clears up the process.
I think you should just fork an existing gist and make the changes. The embedded DartPad URL in remove-elements is https://dartpad.dev/embed-html.html?id=582b9a8d36786566ba08, which means that the gist is at https://gist.github.com/Sfshaza/582b9a8d36786566ba08.
Fork that, view your fork in DartPad, figure out which edits are needed, and save your changes to the gist.
Will do! Should be able to get that done either later today or tomorrow.
Thank you very much for your work on this!
No problem! Thank you for all of the help and a great website!
As an aside, do you have any interest in a maintained fork of the
gist-generateproject (or maybe something similar)? I'd be glad to help with the automation of this sort of process (if possible).
Ooh, tempting... gist-generate might not be relevant once DartPad supports real repos (dart-lang/dart-pad#1096) — and I'm not sure we'll keep dart-tutorials-samples around — but there are always process automation tasks that we could/should have. Some of them are filed as infrastructure issues.
Do any of those issues appeal to you?
. . . but there are always process automation tasks that we could/should have. Some of them are filed as infrastructure issues.
Do any of those issues appeal to you?
Yes, here are some of the ones I'd be interested in helping with (whichever you prefer):
Please note that I am not well-versed in how this site works atm, so I may not be able to help with all of these issues.
@kwalrath Here’s the new gist: https://gist.github.com/smolck/46cdc15290ede948ea9e310d773cd95f
@kwalrath Here’s the new gist: https://gist.github.com/smolck/46cdc15290ede948ea9e310d773cd95f
Looks good! I've forked it to https://gist.github.com/kwalrath/aab6ad8c04d161458d32161ea6e87a97.
I'd love it if you could take on any of the following:
- #1336. Seems fairly straightforward, although I'm not sure I know exactly what needs to be done there.
I think all that needs to be done is to delete the directory and any references to it. You could probably do this without getting the site build working, and just let Travis do your testing.
- #1108. Not sure how this could be done, but can investigate.
I'd love it if you could investigate this. I don't know whether it's easily fixable, but just knowing whether it is or not would be helpful.
- #1820.
As long as this doesn't clash with any work by @chalin, I'd really like to have this fixed. It might be quite easy, and since it's a Travis-centric issue, it should be fixable without having to get the whole site build working.
Sounds good! I think I’ll tackle them in the order you listed them (after I get a PR for this issue). Thanks again for all of your help!
Most helpful comment
Sounds good! I think I’ll tackle them in the order you listed them (after I get a PR for this issue). Thanks again for all of your help!