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

Update amending example #491

Merged
merged 2 commits into from
May 17, 2024
Merged

Update amending example #491

merged 2 commits into from
May 17, 2024

Conversation

nirinchev
Copy link
Contributor

Looking through the Ammending section of the "Filling out a template" tutorial, it seemed like the code snippets and the textual explanation didn't align nicely. I've updated the code snippets to match the text surrounding them as it seemed like the text was the correct one. Here's a summary of changes:

  1. Swapped out the relationship between stock and wood pigeon - it appeared like wood pigeon should be amending stock pigeon rather than the other way around.
  2. Added kingdom, clade, and order to stockPigeon.taxonomy as the text was referencing those fields, but those were missing from the code snippet.
  3. Updated the output snippet to reflect the code reorganization.

Copy link
Contributor

@holzensp holzensp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One (important) nit, but otherwise; looks good! Thanks for the contribution.

@@ -103,35 +106,44 @@ dodo = (stockPigeon) { // <2>
<3> New fields can be added to objects when amending.

Notice how you only have to change `taxonomy.species`.
In this example, `bird.taxonomy` has `kingdom`, `clade`, `order` and `species`.
In this example, `stockPigeon.taxonomy` has `kingdom`, `clade`, `order` and `species`.
You are amending `stockPigeon`, to define `woodPigeon`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^ see ;)

Co-authored-by: Philip K.F. Hölzenspies <holzensp@gmail.com>
@nirinchev nirinchev requested a review from holzensp May 15, 2024 17:23
@holzensp holzensp merged commit c1949a9 into apple:main May 17, 2024
4 checks passed
@nirinchev nirinchev deleted the ni/ammend-tutorial branch May 17, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants