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

Todo app missing in "Add elements to the DOM" #1807

Closed
kwalrath opened this issue Aug 2, 2019 · 12 comments
Closed

Todo app missing in "Add elements to the DOM" #1807

kwalrath opened this issue Aug 2, 2019 · 12 comments
Assignees
Labels
a.tut.tutorial Relates to the Tutorial section of dart.dev co.help-wanted Community opportunity to help documentation e1-hours Can complete in < 8 hours of normal, not dedicated, work fix.examples Adds or changes example p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. target.web Target apps on the web platform

Comments

@kwalrath
Copy link
Contributor

kwalrath commented Aug 2, 2019

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

@kwalrath kwalrath added p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. co.help-wanted Community opportunity to help documentation a.tut.tutorial Relates to the Tutorial section of dart.dev fix.examples Adds or changes example labels Aug 2, 2019
@kwalrath
Copy link
Contributor Author

kwalrath commented Aug 2, 2019

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.

@kwalrath kwalrath added the target.web Target apps on the web platform label Aug 26, 2019
@kwalrath kwalrath added the e1-hours Can complete in < 8 hours of normal, not dedicated, work label Sep 21, 2019
@smolck
Copy link
Contributor

smolck commented Oct 1, 2019

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?

@kwalrath
Copy link
Contributor Author

kwalrath commented Oct 1, 2019

I think this might be it:

https://github.com/dart-lang/dart-tutorials-samples/tree/master/todo

@smolck
Copy link
Contributor

smolck commented Oct 1, 2019

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?

[1]: I'm assuming I need to create a new gist for this (I may be wrong).

@kwalrath
Copy link
Contributor Author

kwalrath commented Oct 1, 2019

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:

#1800 (comment)

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!

@smolck
Copy link
Contributor

smolck commented Oct 1, 2019

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!

@kwalrath
Copy link
Contributor Author

kwalrath commented Oct 1, 2019

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).

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?

@smolck
Copy link
Contributor

smolck commented Oct 2, 2019

. . . 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.

@smolck
Copy link
Contributor

smolck commented Oct 2, 2019

@kwalrath
Copy link
Contributor Author

kwalrath commented Oct 2, 2019

@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.

@kwalrath
Copy link
Contributor Author

kwalrath commented Oct 2, 2019

I'd love it if you could take on any of the following:

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.

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.

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.

@smolck
Copy link
Contributor

smolck commented Oct 2, 2019

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a.tut.tutorial Relates to the Tutorial section of dart.dev co.help-wanted Community opportunity to help documentation e1-hours Can complete in < 8 hours of normal, not dedicated, work fix.examples Adds or changes example p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. target.web Target apps on the web platform
Projects
None yet
Development

No branches or pull requests

2 participants