-
Notifications
You must be signed in to change notification settings - Fork 26.7k
Updated tutorial part 2 for clarity #19715
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
Conversation
aio/content/tutorial/toh-pt2.md
Outdated
|
|
||
| ### Expose heroes | ||
| Create a public property in `AppComponent` that exposes the heroes for binding. | ||
| Create a public property in `AppComponent` (between the existing `title` and `hero` properties) that exposes the heroes for binding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in #19714, the order of properties doesn't make any difference. This change makes it sound as if there are more constraints than there actually are. IMO "create a public property in AppComponent" is adequately describing what needs to be done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kapunahelewong and I were just discusssing. What about something like this: Create a public property in 'AppComponent' that exposes the heroes for binding. To make it easier to read your code, keep all public properties together. For this tutorial, define [create? put?] the 'heroes' property between the existing 'title' and 'hero' properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dogeared We could also expand the docregion for the example code to show it in context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the PR per your suggestions.
|
No disagreement on order. In other places, the tutorial is explicit about
where to place things as it makes it more clear. For instance:
https://angular.io/tutorial/toh-pt1#hero-object
It's not technically critical that the new Hero class goes right below the
import statement. But, it does make it more clear for Angular newbies.
==============================================
Micah Silverman, CSM <http://bit.ly/WikiScrum>
Phone: 631.606.8928
Co-Author: Mastering Enterprise Javabeans 3.0 <http://bit.ly/MasteringEJB3>
==============================================
"Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as
possible, you are, by definition, not smart enough to debug
it." by Brian Kernighan
==============================================
[image: Namez]
<http://namez.com/profiles/1720-micah-silverman/?autoPlay=true>
…On Mon, Oct 16, 2017 at 5:48 AM, George Kalpakas ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In aio/content/tutorial/toh-pt2.md
<#19715 (comment)>:
> @@ -122,7 +122,7 @@ Eventually this app will fetch the list of heroes from a web service, but for no
you can display mock heroes.
### Expose heroes
-Create a public property in `AppComponent` that exposes the heroes for binding.
+Create a public property in `AppComponent` (between the existing `title` and `hero` properties) that exposes the heroes for binding.
As discussed in #19714 <#19714>,
the order of properties doesn't make any difference. This change makes it
sound as if there are more constraints than there actually are. IMO *"create
a public property in AppComponent"* is adequately describing what needs
to be done.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#19715 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAWQEqLWjTh4hHhs5ItQcLm4W01czvyKks5ssyZrgaJpZM4P5JGh>
.
|
|
can words be a little bit softer? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It is actually critical. Since that file only contains The new wording is fine by me. Just for the recond, imo making it sound like there are more limitations than necessary tends to confuse newcomers down the road. 👍 for expanding the docregions. In fact, I think it might be useful to introduce a new feature for context in docregions that show adding to or modifying an existing file. I.e. 1-2 lines above and below the affected lines would appear grayed-out (to show what was there before the change), while the affected lines would be highlighted in color as usual. |
|
Hello? Don't want to hassle you. Sure you're busy. But this PR has some merge conflicts that you probably ought to resolve. |
1 similar comment
|
Hello? Don't want to hassle you. Sure you're busy. But this PR has some merge conflicts that you probably ought to resolve. |
|
@dogeared : Hi. First, let me apologize for this sitting so long. I agree that this change is very helpful to readers. Would you be willing to resolve the merge conflicts? We'd be super appreciative, and if you tag me when you're done, I'll make sure to get it merged. :-) |
|
@dogeared Hi. I investigated this some more. It's still a great idea, and I like your wording. Things have moved around a bit since you submitted this PR. We're happy to incorporate your change into another PR we're working on (#24445). Or...if you'd prefer to update this PR, we'll help you move it forward this time. Thanks again for this submission, and making us aware of a general theme we should be better about: where to do things. Thanks again. |
|
Also, I opened a new issue for the larger question of how can we show more context in code regions. Thx also to @gkalpak |
|
Closing as no longer applicable |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Issue Number: #19714
What is the new behavior?
Adds a little descriptive text in the
Expose heroessection of part 2 of the tutorialDoes this PR introduce a breaking change?