Repository navigation
fix issues related to tutorial - #24445
sreevani-ship-it wants to merge 1 commit into
Conversation
|
You can preview e26ba71 at https://pr24445-e26ba71.ngbuilds.io/. |
|
You can preview a2e9887 at https://pr24445-a2e9887.ngbuilds.io/. |
|
You can preview d0e800f at https://pr24445-d0e800f.ngbuilds.io/. |
|
You can preview 7d12e9d at https://pr24445-7d12e9d.ngbuilds.io/. |
|
You can preview aad2f9a at https://pr24445-aad2f9a.ngbuilds.io/. |
|
@chembu Would you be willing to add one more fix to this PR? This PR #19715 contains a suggestion that is still relevant, although things have moved around a bit. Location: Current doc: The other PR is about providing more context about where this code goes. The suggestion against an older doc was to add this: "To make it easier to read your code, keep all public properties together. For this tutorial, define the Will you look at where the example code puts this line of code, and then add a bit more context in the doc. You could also expand the docregion to show more of the code, such as the lines immediately before and/or after this property definition. If you can include a fix in this PR, then I'll close that other one. Thanks! |
|
You can preview b6af21d at https://pr24445-b6af21d.ngbuilds.io/. |
jenniferfell
left a comment
There was a problem hiding this comment.
This looks pretty good. Some minor requests. Thanks.
There was a problem hiding this comment.
We're already in that file, because we just did the import, so this
In the HeroesComponent class (in the same file), define a component property called heroes to expose the HEROES array for binding.
There was a problem hiding this comment.
Would it also work to add text recommended by PR 19715, such as: "It is common practice to keep all public properties together. For this tutorial, define the heroes property between the existing title and hero properties."
Or have we already said something like that earlier in the tutorial?
There was a problem hiding this comment.
Since we normally isolate properties when displaying how they are added, I don't think its going to make a difference here. In the final code review, the properties should be grouped together.
There was a problem hiding this comment.
I like that you're trying to include lots of context, but this feels like an odd ending. It's not the end of the class definition, but it also maybe more than needed below the heroes= line. Maybe just these 3 lines. And does the coding style allow for closing up some blank lines?
export class HeroesComponent implements OnInit {
heroes = HEROES;
selectedHero: Hero;
There was a problem hiding this comment.
I think the only thing that needs to be displayed here is the export line, the heroes line and the closing curly braces. The selectedHero isn't mentioned until later in this section.
export class HeroesComponent implements OnInit {
heroes = HEROES;
}
You will have to remove some of the blank lines in the example file so there isn't so much space in between areas.
There was a problem hiding this comment.
Add . at end of sentence
There was a problem hiding this comment.
Initial cap for each bullet
- A css file...
There was a problem hiding this comment.
Good. Two minor changes.
- I would move "(such as
api/heroes/11)" to be after this second paragraph. - Minor editorial: "Here, the base URL is the heroesURL defined in the Heroes and HTTP section (api/heroes), and the id is the id number of the hero that you want to retrieve. For example,
api/heroes/11.
There was a problem hiding this comment.
I recommend beginning with why this method is here. Then keep description of what it returns.
"Overrides the genId method to ensure that a Hero always has an id."
There was a problem hiding this comment.
Also add a line break above line 21
There was a problem hiding this comment.
Editorial recommendation:
// If the heroes array is empty, the method below returns the initial number (11).
// If the heroes array is not empty, the method below returns
// the max number of ids plus 1.
There was a problem hiding this comment.
I would clarify to say it returns the highest hero id plus + 1
There was a problem hiding this comment.
Can we show the app.module.ts file here? Or is that too distracting?
Minimally please add app.module.ts to the final code review, so all files changed in this tutorial section are listed, even if they are changed by the CLI and not manually. Thx.
There was a problem hiding this comment.
Added app.module.ts to the final code review.
|
Minor requests/recommendations Not addressed by this PR, so either add or just remove it from the description and fix in separate PR later:
|
|
@brandonroberts Hi. Do you feel comfortable giving this a review for technical accuracy? It's a collection of small issues. Most had very good descriptions and recommendations in the original issues. (We need a pull approver, and you're in the right group.) |
|
@jenniferfell yes, I'll take care of the review |
There was a problem hiding this comment.
I think the only thing that needs to be displayed here is the export line, the heroes line and the closing curly braces. The selectedHero isn't mentioned until later in this section.
export class HeroesComponent implements OnInit {
heroes = HEROES;
}
You will have to remove some of the blank lines in the example file so there isn't so much space in between areas.
There was a problem hiding this comment.
The description for the test spec file is missing
There was a problem hiding this comment.
We say four files are generated, but only list three below. The test spec file is the other file.
There was a problem hiding this comment.
Also add a line break above line 21
There was a problem hiding this comment.
I would clarify to say it returns the highest hero id plus + 1
There was a problem hiding this comment.
Earlier in the file on line 61, it says Add the HttpClientInMemoryWebApiModule to the @NgModule.imports array— after importing the HttpClient
HttpClient should be HttpClientModule
There was a problem hiding this comment.
Since we normally isolate properties when displaying how they are added, I don't think its going to make a difference here. In the final code review, the properties should be grouped together.
|
You can preview e4b7707 at https://pr24445-e4b7707.ngbuilds.io/. |
e4b7707 to
f190141
Compare
|
You can preview f190141 at https://pr24445-f190141.ngbuilds.io/. |
|
You can preview 4917d11 at https://pr24445-4917d11.ngbuilds.io/. |
|
Changes LGTM. Commit messages need updating though |
|
@brandonroberts Thanks for catching the commit message. @chembu https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit docs(tutorial): fix minor issues with clarity and example code snippets |
4917d11 to
2f6707d
Compare
|
You can preview 2f6707d at https://pr24445-2f6707d.ngbuilds.io/. |
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
|
You can preview ca01b88 at https://pr24445-ca01b88.ngbuilds.io/. |
There was a problem hiding this comment.
Couple of small fixes to this sentence;
If the heroes array is not empty, the method below returns the highest
if -> If the
heighest -> highest
ca01b88 to
9dd2213
Compare
|
CLAs look good, thanks! |
|
You can preview 9dd2213 at https://pr24445-9dd2213.ngbuilds.io/. |
|
You can preview 14ee7ac at https://pr24445-14ee7ac.ngbuilds.io/. |
14ee7ac to
eac67a9
Compare
|
You can preview eac67a9 at https://pr24445-eac67a9.ngbuilds.io/. |
|
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. |
docs(tutorial): fix issues related to tutorial.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #18078
#23747
#22120
#23865
#18869
#19714
What is the new behavior?
Fixed code snippets to reflect the code changes in final review.
Does this PR introduce a breaking change?
Other information