-
Notifications
You must be signed in to change notification settings - Fork 673
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
Code excerpts should be auto-updated and tested #407
Comments
These are the original source files, unchanged, from up-and-running repo's `code` folder. These are the source files used in the language and library tours. Contributes to dart-lang#407
These are the original source files, unchanged, from up-and-running repo's code folder. These are the sources of the language and library tours. Contributes to #407
…our sources (#414) **Reviewers**: You'll probably want to focus your review efforts on **[`src/_guides/language/language-tour.md` while ignoring whitespace diffs](https://github.com/dart-lang/site-www/pull/414/files?w=1#diff-cd4b0043d2416c7c2db7fe09bba74060)**: - The code diffs that you will see are the result of having refreshed the code excerpts from their originating sources. (After this PR is merged, I'll set this up so that it happens automatically.) - In very few places I adjusted the Tour prose and/or examples -- but usually only after discussing the proposed change with you via email. TL;DR The purpose of this PR has been to adapt the **Language Tour**, and its example sources, so that we can use the [code_excerpt_updater](https://github.com/chalin/code_excerpt_updater) to auto-refresh code excerpts in the Language Tour markdown. For the most part, the language tour markdown already contained embedded paths to the source files it uses, and the source files contained some form of code excerpt markers. Consequently, most changes made in this PR are "lexical" and minor: - Sources under `examples/language-tour`: changed code excerpt marker syntax from - `BEGIN`/`END` to - `#docregion`/`#enddocregion`. - `src/_guides/language/language-tour.md`: changed inline code excerpt comments - `<!-- path/to/source -->` to - `<?code-excerpt? "path/to/source"?>` processing instructions. Doc regions were manually adjusted to ensure that the code excerpts remained unchanged (except for genuine updates done to the code since the markdown was written). In a few cases files were relocated because they were in a wrong folder (e.g., deprecated was moved to metadata). Contributes to #407 What is left to do: I haven't touched code excepts that are in the Gists used with DartPad.
* chore: adjust Travis setup in preparation for example testing Contributes to #407 * Get SDK channel from data file (don't assume that it is `stable`) * Update link to API pages in the docs
- See `examples/README.md` for details. Essentially, `examples` is now a Dart package from which all sample tests will be run. - A few tests are run in chrome, so Travis setup has been adapted so that chrome is installed and configured to run tests. - Also added highlights to some code excerpts (more will be added later). **Note**: Eventually the "original" example sources (`examples/language_tour ` and `examples/library_tour `) will be deleted, once we are sure that all relevant parts (including some that are only in Gists) have been integrated into the new package. Contributes to #407 and #416.
- See `examples/README.md` for details. Essentially, `examples` is now a Dart package from which all sample tests will be run. - A few tests are run in chrome, so Travis setup has been adapted so that chrome is installed and configured to run tests. - Also added highlights to some code excerpts (more will be added later). **Note**: Eventually the "original" example sources (`examples/language_tour ` and `examples/library_tour `) will be deleted, once we are sure that all relevant parts (including some that are only in Gists) have been integrated into the new package. Contributes to #407 and #416.
- See `examples/README.md` for details. Essentially, `examples` is now a Dart package from which all sample tests will be run. - A few tests are run in chrome, so Travis setup has been adapted so that chrome is installed and configured to run tests. - Also added highlights to some code excerpts (more will be added later). **Note**: Eventually the "original" example sources (`examples/language_tour ` and `examples/library_tour `) will be deleted, once we are sure that all relevant parts (including some that are only in Gists) have been integrated into the new package. Contributes to #407 and #416.
- See `examples/README.md` for details. Essentially, `examples` is now a Dart package from which all sample tests will be run. - A few tests are run in chrome, so Travis setup has been adapted so that chrome is installed and configured to run tests. - Also added highlights to some code excerpts (more will be added later). **Note**: Eventually the "original" example sources (`examples/language_tour ` and `examples/library_tour `) will be deleted, once we are sure that all relevant parts (including some that are only in Gists) have been integrated into the new package. Contributes to #407 and #416.
- See `examples/README.md` for details. Essentially, `examples` is now a Dart package from which all sample tests will be run. - A few tests are run in chrome, so Travis setup has been adapted so that chrome is installed and configured to run tests. - Also added highlights to some code excerpts (more will be added later). **Note**: Eventually the "original" example sources (`examples/language_tour ` and `examples/library_tour `) will be deleted, once we are sure that all relevant parts (including some that are only in Gists) have been integrated into the new package. Contributes to #407 and #416.
* Language tour example tests + Travis test job setup - See `examples/README.md` for details. Essentially, `examples` is now a Dart package from which all sample tests will be run. - A few tests are run in chrome, so Travis setup has been adapted so that chrome is installed and configured to run tests. - Also added highlights to some code excerpts (more will be added later). **Note**: Eventually the "original" example sources (`examples/language_tour ` and `examples/library_tour `) will be deleted, once we are sure that all relevant parts (including some that are only in Gists) have been integrated into the new package. Contributes to #407 and #416. * Post-review edits
Contributes to dart-lang#407 and dart-lang#416.
Contributes to dart-lang#407 and dart-lang#416. Continuation of dart-lang#440
Contributes to dart-lang#407 and dart-lang#416. Continuation of dart-lang#440
Contributes to dart-lang#407 and dart-lang#416. Continuation of dart-lang#440
* Strong mode code excerpt tests for fix-it page Contributes to #407 Staged at https://dartlang-org-staging-0.firebaseapp.com/guides/language/sound-problems * Don't make "Fix" bold * Tweak canvas example code; add dynamic example * Section title change * Other misc post-review edits
I just took a look at analytics for the past week, when we've gotten a lot of new visitors, and here are my conclusions:
Here are the details on how things have changed (look for the bold font):
|
Thanks for the updated analytics! |
Somehow we missed Synonyms. At no.99, however, it's probably not a high priority, and it's complicated because we'd only be testing the Dart excerpts, not the other languages. |
* Updates to Dart VM, Get Started Contributes to #407 * Feedback from Kathy
Closed in favor of #1803. |
... and ideally, as part of every build, similar to what is done for https://github.com/dart-lang/site-webdev.
Eventually, all code excerpts in the site should be subject to testing. We'll be progressively covering site pages (so that the code excerpts they contain are tested). Here is an ordered list provided by @kwalrath in a separate thread:
Cookbook: Dart by Example (no.42 [-> no.31])Update samples page, remove cookbook #687waiting on Consider consolidation of pages covering asynchrony/generator support #512- Tutorial(streams): update for Dart 2 and analayze/test code #813Possibly related issues:
The text was updated successfully, but these errors were encountered: