-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs/tour/basics: simplicity and tone edit
This and the following ~4 changes each revise one section of the language tour. Their focus is on improving each page's approachability and clarity for the non-technical newcomer. They prioritise making the tour suitable for folks who are evaluating CUE solely on the basis of reading that portion of the front page that sits before the link to this tour, who left the front page upon reaching that link, and are experiencing the tour having never read any other site pages or seen any CUE before. As a baseline, in pursuit of that aim, these changes revise and reword most pages' prose and tone, and also modify the code examples by: - eliminating the "result.txt" header on the right-hand side - moving to TERMINAL blocks on the right-hand side, wherever visibility of the command being executed feels like it benefits the reader - adding and expanding inline comments where they help clarify the code, especially if the code were being read in isolation by prose-averse users Page-specific notes: * json-superset: - include mention of field labels and values - introduce tour examples with info block - code comments added for unquoted field names - field names with capitals included to expand visibility of unquoted field name characteristics - struct added so curly braces are present, to help make sure the "outermost curly braces" convenience is contextualised - math stdlib import is included to allow this very first piece of CUE seen on the tour to whet the appetite of the reader as to its capabilities, but in a way which is believed trivially understandable even before imports/functions/etc are explained - cue command includes the unnecessary `--out json` to make it clear and explicit that the reader is viewing JSON * types-are-values: - page title brought into prose to make it more obvious - linking prose added between first paragraph and examples - examples are re-ordered to flow more naturally from least to most specific constraints, which allows the second half of the page to be tidied up - larger capital city selected for data example * duplicate-fields: - add simple discussion of unification, in a concrete data context, as we don't explicitly introduce it anywhere else - remove all mention of "duplicate" fields, except the page title, so we don't risk embedding the not-a-CUE--concept in readers' understanding - code example is expanded to demonstrate recursive unification in lists * constraints: - introduce "&" operator - allow the example to do double duty: demo both explicit unification of types and values, and a field being templated - example's command updated to focus on the concrete data emission and its simpler specification * definitions: - assorted tidyups * validation: - introduce "cue vet" - assorted tidyups * order-irrelevance: - linking order irrelevance back to duplicate fields helps to hint at CUE's firm theoretical basis - example field names altered to help them "pop" off the page better * folding-structs: - change page title to reflect inclusion of two different syntaxes - lead the page with the a:b:c:value syntax - remove mention of JSON, as its comparison doesn't help the tour reader better understand /CUE/ - demo mix of syntaxes - include a trivially-understood-in-context "fieldA:!fieldB" to whet the appetite for Things To Come, whilst allowing the point to be made that pattern constraints /aren't/ just single line constructs - this is needed because the single line form of a pattern constraint *also* needs to be shown For cue-lang/docs-and-content#78 Preview-Path: /docs/tour/basics/json-superset/ Preview-Path: /docs/tour/basics/types-are-values/ Preview-Path: /docs/tour/basics/duplicate-fields/ Preview-Path: /docs/tour/basics/constraints/ Preview-Path: /docs/tour/basics/definitions/ Preview-Path: /docs/tour/basics/validation/ Preview-Path: /docs/tour/basics/order-irrelevance/ Preview-Path: /docs/tour/basics/folding-structs/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: Ibfd1a731131e181ee51d21d7ac3ce24a0c8ae8a8
- Loading branch information
1 parent
9190dd5
commit 338bbc8
Showing
24 changed files
with
516 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.