-
Notifications
You must be signed in to change notification settings - Fork 26.2k
docs: fix code style #45527
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
docs: fix code style #45527
Conversation
|
@Piyush132000
To update, your last commit message you can use this command |
052aa44 to
228febc
Compare
@AlirezaEbrahimkhani thanks sir and I updated the commit message. |
|
@Piyush132000 this has some lint and test failures that should be quick to resolve. If you can get them addressed, this is otherwise green and should be quick to land. |
Sorry for inconvenience, can you please help me how can I remove these failure? |
|
@Piyush132000 The test_aio failure looks like a simple linting issue where you need a space after a |
Thanks @jessicajaniuk |
2068330 to
c7fb01d
Compare
|
Hii @jessicajaniuk, I have fixed lint-related issues. Please verify. |
|
@Piyush132000 Looks like the lint issues are fixed, but you still have some test_docs_examples issues. You can see them here. |
Sorry for the inconvenience, @jessicajaniuk I tried but was not able to fix the failed tests. |
Hii @jessicajaniuk can you please help me more so I can fix these failures. |
|
|
||
| shippingCosts = this.cartService.getShippingPrices(); | ||
| shippingCosts: { type: string , price: number}[] = []; |
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.
This is what's breaking the tests. shippingCosts should be an observable since the cartService getShippingPrices method returns an observable. The error in the tests is this:
error TS2740: Type 'Observable<{ type: string; price: number; }[]>' is missing the following properties from type '{ type: string; price: number; }[]': length, pop, push, concat, and 27 more
This is essentially saying there's a type mismatch between what you've specified here, which is just a simple array of objects, and the actual return value, which is an Observable. This needs to be resolved to fix the tests.
87195b8 to
225b5cd
Compare
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.
Thx for making these improvements, @Piyush132000 👍
I left a couple of suggestions.
aio/content/examples/getting-started/src/app/shipping/shipping.component.ts
Outdated
Show resolved
Hide resolved
aio/content/examples/getting-started/src/app/shipping/shipping.component.ts
Outdated
Show resolved
Hide resolved
8e061a1 to
cc445b9
Compare
|
Hii @jessicajaniuk @gkalpak please check my PR again. Thanks |
|
You can preview 052aa44 at https://pr45527-052aa44.ngbuilds.io/. |
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.
Just a couple of formatting suggestions. Otherwise lgtm 👍
aio/content/examples/getting-started/src/app/shipping/shipping.component.ts
Outdated
Show resolved
Hide resolved
aio/content/examples/getting-started/src/app/shipping/shipping.component.ts
Outdated
Show resolved
Hide resolved
aio/content/examples/getting-started/src/app/shipping/shipping.component.ts
Outdated
Show resolved
Hide resolved
|
You can preview 0da8181 at https://pr45527-0da8181.ngbuilds.io/. |
|
You can preview 16c31df at https://pr45527-16c31df.ngbuilds.io/. |
1f871ef to
4cb7ec8
Compare
|
You can preview 4cb7ec8 at https://pr45527-4cb7ec8.ngbuilds.io/. |
|
Hi @jessicajaniuk, @gkalpak Please review my PR. Thanks |
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 🚀
Thx, @Piyush132000 👍
Reviewed-for: global-docs-approvers
| 1. Define a `shippingCosts` property that sets the `shippingCosts` property using the `getShippingPrices()` method from the `CartService`. | ||
| Initialize the `shippingCosts` property inside `ngOnInit()` method. |
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.
Nit: The indentation does not match the other items here, but not worth blocking this PR over that.
Comments have been addressed (i.e. CI is green).
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 🍪
Thanks for your work and persistence in getting this green, @Piyush132000! 🎉
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.
Hello @Piyush132000
Sorry to kick this back, but when I was going to merge this I noticed this PR is composed of 4 commits, all of which have the same generic title and no description.
Please squash these commits into one, and add a short description describing why we're making these changes.
4cb7ec8 to
77979d9
Compare
|
You can preview 77979d9 at https://pr45527-77979d9.ngbuilds.io/. |
I have removed unnecessary code from the components & i initialize the form in OnInit function (life cycle). I think initilization of forms and getting data from service must be done inside ngOnInit.
77979d9 to
425a619
Compare
|
You can preview 425a619 at https://pr45527-425a619.ngbuilds.io/. |
|
Hii @jessicajaniuk, @gkalpak, and @alxhub any changes required to merge this PR to main? I already squashed the commits. Thanks |
|
This PR was merged into the repository by commit 9ce733a. |
I have removed unnecessary code from the components & i initialize the form in OnInit function (life cycle). I think initilization of forms and getting data from service must be done inside ngOnInit. PR Close #45527
|
Thanks, @jessicajaniuk @gkalpak @alxhub |
|
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. |


I have removed unnecessary code from the components & I initialize the form in the OnInit function (life cycle). I think initialization of forms and getting data from the service must be done inside ngOnInit.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Update the code style of Product-list & Shipping component.
Removed Unnecessary code.
What is the current behavior?
Same behavior as previous
Issue Number: N/A
What is the new behavior?
NA
Does this PR introduce a breaking change?
Other information