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

Go through CL/server tutorials, report/fix issues #1978

Closed
3 tasks done
kwalrath opened this issue Oct 4, 2019 · 31 comments
Closed
3 tasks done

Go through CL/server tutorials, report/fix issues #1978

kwalrath opened this issue Oct 4, 2019 · 31 comments
Labels
a.tut.tutorial Relates to the Tutorial section of dart.dev e1-hours Can complete in < 8 hours of normal, not dedicated, work p2-medium Necessary but not urgent concern. Resolve when possible.

Comments

@kwalrath
Copy link
Contributor

kwalrath commented Oct 4, 2019

There are 3 tutorials under https://dart.dev/tutorials/server. We'd like a volunteer for each one, to go through and report/fix issues (similar to #1958).

Known issue:

@kwalrath kwalrath added p2-medium Necessary but not urgent concern. Resolve when possible. co.help-wanted Community opportunity to help documentation a.tut.tutorial Relates to the Tutorial section of dart.dev co.beginner Community opportunity to make a small change to documentation e1-hours Can complete in < 8 hours of normal, not dedicated, work labels Oct 4, 2019
@wang-ories
Copy link
Contributor

Hello @kwalrath I can work on this tutorial.

@kwalrath
Copy link
Contributor Author

kwalrath commented Oct 7, 2019

Thanks, @wang-ories! Which one would you like to work on first?

@kwalrath
Copy link
Contributor Author

kwalrath commented Oct 7, 2019

@wang-ories you get your pick... just tell us which one you're doing, so anyone else who's interested can sign up for another tutorial.

@wang-ories
Copy link
Contributor

@kwalrath I take this tutorial : Write command-line apps

@wang-ories
Copy link
Contributor

wang-ories commented Oct 7, 2019

@kwalrath I found two smalls problem in this tutorial:

1 - In this section https://dart.dev/tutorials/server/cmdline#overview-of-the-dcat-app-code : the result of this command $ dart dcat.dart -n quote.txt produces empty output, i.e the file quote.txt must be created first. In the tutorial the output is three quotes from quote.txt.

2 - This link https://api.dart.dev/stable/dart-io/dart-convert-library.html at the end of the page can’t be found. Fixed in #1983.

@kwalrath
Copy link
Contributor Author

kwalrath commented Oct 7, 2019

1 - In this section https://dart.dev/tutorials/server/cmdline#overview-of-the-dcat-app-code : the result of this command $ dart dcat.dart -n quote.txt produces empty output, i.e the file quote.txt must be created first. In the tutorial the output is three quotes from quote.txt.

Ah right, back when this was written, there was an in-page link to all the files, including quote.txt. The source is at https://github.com/dart-lang/site-www/blob/master/examples/misc/test_data/quote.txt. Maybe we should just tell people to download it from that location.

2 - This link https://api.dart.dev/stable/dart-io/dart-convert-library.html at the end of the page can’t be found.

Looks like it should be https://api.dart.dev/stable/dart-convert/dart-convert-library.html.

@wang-ories
Copy link
Contributor

Ok

@wang-ories
Copy link
Contributor

@kwalrath for the link is simple, can I just fix it?

@kwalrath
Copy link
Contributor Author

kwalrath commented Oct 7, 2019

@kwalrath for the link is simple, can I just fix it?

Yep, go ahead.

kwalrath pushed a commit that referenced this issue Oct 8, 2019
@wang-ories
Copy link
Contributor

1 - In this section https://dart.dev/tutorials/server/cmdline#overview-of-the-dcat-app-code : the result of this command $ dart dcat.dart -n quote.txt produces empty output, i.e the file quote.txt must be created first. In the tutorial the output is three quotes from quote.txt.

Ah right, back when this was written, there was an in-page link to all the files, including quote.txt. The source is at https://github.com/dart-lang/site-www/blob/master/examples/misc/test_data/quote.txt. Maybe we should just tell people to download it from that location.

2 - This link https://api.dart.dev/stable/dart-io/dart-convert-library.html at the end of the page can’t be found.

Looks like it should be https://api.dart.dev/stable/dart-convert/dart-convert-library.html.

@kwalrath , I can work on this first problem, if not assigned yet. I will add the link to download and tell people to download.

@kwalrath
Copy link
Contributor Author

kwalrath commented Oct 8, 2019

@kwalrath , I can work on this first problem, if not assigned yet. I will add the link to download and tell people to download.

That would be great. Thank you!

@wang-ories
Copy link
Contributor

wang-ories commented Oct 9, 2019

@kwalrath , I can work on this first problem, if not assigned yet. I will add the link to download and tell people to download.

That would be great. Thank you!

Ok, I made the changes in a new PR. [#1989]

@foxbit19
Copy link

Hi @kwalrath,
I can take Get started tutorial!

@kwalrath
Copy link
Contributor Author

kwalrath commented Oct 10, 2019

I can take Get started tutorial!

It's yours!

kwalrath pushed a commit that referenced this issue Oct 10, 2019
Tell people to download quote.txt file and add the link to this file.

Contributes to #1978.
@foxbit19
Copy link

I've checked all commands and links into Get started tutorial. Everything seems to work as expected!

@hamidrezabstn
Copy link
Contributor

hi can i pick third one ?

@hamidrezabstn
Copy link
Contributor

:) :?

@kwalrath
Copy link
Contributor Author

@hamidrezabstn the third one is yours. Thanks!

@hamidrezabstn
Copy link
Contributor

@kwalrath
should i send PR or report issues here ?

@hamidrezabstn
Copy link
Contributor

A quick glance at the code

code example is different from github source code
Launch the web server -> in this section user need more info about webdev and installing it then he/she could run it.

Making a POST request from a standalone client

client code sample is differ from github version

Using the http_server package

mini code sample is differ from github version
and beside web site code is working but github sample is not working
basic code sample is differ from github version
static code sample is differ from github version

Using https with bindSecure()

secure code sample is differ from github version

all links are fine

@kwalrath
Copy link
Contributor Author

Thanks very much, @hamidrezabstn. Could you please file one issue for the code sample differences and an issue or PR for the webdev issue? Thanks!

@hamidrezabstn
Copy link
Contributor

@kwalrath
Your welcome!
i will make changes and send PR

@hamidrezabstn
Copy link
Contributor

i made a PR at #2021

@kwalrath kwalrath removed co.beginner Community opportunity to make a small change to documentation co.help-wanted Community opportunity to help documentation labels Oct 21, 2019
@kwalrath
Copy link
Contributor Author

@hamidrezabstn thanks for fixing the sample links! Do you want to take a stab at fixing the webdev issue, or do you want to file an issue about it?

@hamidrezabstn
Copy link
Contributor

@kwalrath i'm really sorry about that i totally forget about it ! i will make a PR for it!

@hamidrezabstn
Copy link
Contributor

@kwalrath Done! #2025

@kwalrath
Copy link
Contributor Author

@hamidrezabstn I just noticed that the names of the source files are down below the snippets. E.g. hello_world_server.dart is displayed beneath the first code excerpt (https://dart.dev/tutorials/server/httpserver#a-quick-glance-at-the-code). It looks odd.

(I tried looking at it in the wayback machine, but it's having issues with that page. I think the filename used to be displayed on top of the code sample, but I'm thinking that isn't really necessary.)

One solution would be to simply remove the lines that have these filenames. E.g. for the first example we might remove this line:

<div class="prettify-filename">hello_world_server.dart</div>

What do you think?

@chalin
Copy link
Contributor

chalin commented Oct 22, 2019

Maybe during site migration some styles were dropped or overridden. I can take a look first before we strip out filenames. WDYT @kwalrath?

@kwalrath
Copy link
Contributor Author

Maybe during site migration some styles were dropped or overridden. I can take a look first before we strip out filenames. WDYT @kwalrath?

Sure, that'd be great @chalin.

@kwalrath
Copy link
Contributor Author

@chalin fixed the filename appearance in #2026, so I think we're good to close this issue. Thank you, everyone!!

@hamidrezabstn
Copy link
Contributor

@kwalrath i think because of file links under each section's title , for example: Example file for this section: hello_world_server.dart. , and referencing that file in different positions in related section, like this

At the command line, run the hello_world_server.dart script:

,that file name below snippets is not necessary .
but if it should be there i think below is better than above. its less disturbing.

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 e1-hours Can complete in < 8 hours of normal, not dedicated, work p2-medium Necessary but not urgent concern. Resolve when possible.
Projects
None yet
Development

No branches or pull requests

5 participants