Skip to content

Commit d8ecfac

Browse files
committed
fix: many grammar tweaks
Fix some typos. Follow some non-obvious English punctuation rules. remove duplicate md files for 50. Add some links for Angular Testing Library Remove inconsistent colons after "Constraints" headers Fix a broken link on 9. Chrome's tab is "Elements", not "source" Add missing challenges to the performance page Similar changes
1 parent 61fd418 commit d8ecfac

40 files changed

+112
-116
lines changed

docs/src/content/docs/challenges/angular/10-utility-wrapper-pipe.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ sidebar:
1414

1515
## Information
1616

17-
This is the third of three `@Pipe()` challenges, the goal of this series is to master **pipes** in Angular.
17+
This is the third of three `@Pipe()` challenges. The goal of this series is to master **pipes** in Angular.
1818

19-
Pipes are a very powerful way to transform data in your template. The difference between calling a function and a pipe is that pure pipes are memoized. So they won't be recalculated every change detection cycle if their inputs haven't changed.
19+
Pipes are a very powerful way to transform data in your template. The difference between calling a function and a pipe is that pure pipes are memoized. So, they won't be recalculated every change detection cycle if their inputs haven't changed.
2020

21-
Pipes are designed to be efficient and optimized for performance. They use change detection mechanisms to only recalculate the value if the input changes, to minimize unnecessary calculations and improving rendering performance.
21+
Pipes are designed to be efficient and optimized for performance. They use change detection mechanisms to only recalculate the value if the input changes, to minimize unnecessary calculations and improve rendering performance.
2222

23-
By default a pipe is pure, you should be aware that setting `pure` to false is prone to be inefficient, because it increases the amount of rerenders.
23+
By default, a pipe is pure. You should be aware that setting `pure` to false is prone to be inefficient, because it increases the amount of rerenders.
2424

2525
:::note
2626
A **pure** pipe is only called when the value changes.\
@@ -31,7 +31,7 @@ There are some useful predefined pipes like the DatePipe, UpperCasePipe and Curr
3131

3232
## Statement
3333

34-
In this exercise, you want to access utils functions. Currently you cannot access them directly from your template. The goal is to create a specific pipe for this utils file, where you will need to pass the name of the function you want to call and the needed arguments.
34+
In this exercise, you want to access utils functions. Currently, you cannot access them directly from your template. The goal is to create a specific pipe for this utils file, where you will need to pass the name of the function you want to call and the needed arguments.
3535

3636
## Constraints
3737

docs/src/content/docs/challenges/angular/13-highly-customizable-css.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sidebar:
1414

1515
## Information
1616

17-
Styling is an important aspect of a frontend developer's day job, but it is often underestimated. In Angular applications, I frequently see people using `@Input()` to customize the style of their components. However, `@Input()` should only be used for logic. Other techniques, such as **CSS variables** and **host-context** should be used for styling.
17+
Styling is an important aspect of a frontend developer's day job, but it is often underestimated. In Angular applications, I frequently see people using `@Input()` to customize the style of their components. However, `@Input()` should only be used for logic. Other techniques, such as **CSS variables** and **host-context**, should be used for styling.
1818

1919
In this challenge, you will need to use both CSS variables and `:host-context` to remove all `@Input()` from your code.
2020

docs/src/content/docs/challenges/angular/22-router-input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 🟢 @RouterInput()
3-
description: Challenge 22 is about using the @Input decorator to retreive router params.
3+
description: Challenge 22 is about using the @Input decorator to retrieve router params.
44
author: thomas-laforge
55
contributors:
66
- tomalaforge

docs/src/content/docs/challenges/angular/3-directive-enhancement.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ This exercise can feel obsolete with the new control flow and the empty block in
2020

2121
## Information
2222

23-
Directive is a very powerful tool only offered by the Angular framework. You can apply the DRY principle by having shared logic inside a directive and applying it to any component you want.
23+
Directives are a very powerful tool only offered by the Angular framework. You can apply the DRY principle by having shared logic inside a directive and applying it to any component you want.
2424

25-
But the real power is that you can enhance an already existing directive which moreover doesn't **belong** to you.
25+
But the real power is that you can enhance an already-existing directive, which moreover doesn't **belong** to you.
2626

2727
## Statement
2828

2929
In this exercise, we have a want to display a list of persons. If the list is empty, you must display _" the list is empty !! "_.
3030

31-
Currently we have:
31+
Currently, we have:
3232

3333
```typescript
3434
<ng-container *ngIf="persons.length > 0; else emptyList">

docs/src/content/docs/challenges/angular/32-change-detection-bug.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This challenge is inspired by a real-life example that I simplified to create th
1919

2020
## Information
2121

22-
In this small application, we have a navigation menu to route our application to either `BarComponent` or `FooComponent`. However our application is not loading and no errors are displayed inside the console.
22+
In this small application, we have a navigation menu to route our application to either `BarComponent` or `FooComponent`. However, our application is not loading and no errors are displayed inside the console.
2323

2424
## Statement
2525

docs/src/content/docs/challenges/angular/33-decoupling-components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ sidebar:
1818

1919
The goal of this challenge is to separate the behavior of a component from its style. For the purpose of this challenge, we will be working on a button element. When we click on it, we will toggle a _disabled_ property which will change the style of the element. This is quite useless in real life but the challenge aims to demonstrate a useful concept.
2020

21-
The behavior of the component (referred to as the _brain_ in the Spartan stack) is located in the brain library. The styling part (referred to as the _helmet_) is located inside the helmet library. Both libraries cannot depend on each other because we want to be able to publish them separately. To help us address the issue, we are using the Nx enforce eslint rule. You can find more details [here](https://nx.dev/core-features/enforce-module-boundaries).
21+
The behavior of the component (referred to as the _brain_ in the Spartan stack) is located in the brain library. The styling part (referred to as the _helmet_) is located inside the helmet library. Both libraries cannot depend on each other because we want to be able to publish them separately. To help us address the issue, we are using the Nx `enforce-module-boundaries` eslint rule. You can find more details [here](https://nx.dev/core-features/enforce-module-boundaries).
2222

23-
However the button's helmet needs to access the state of the component to style the button differently based on its state. As mention above, we cannot import the `BtnDisabledDirective` directly into the helmet library as done currently. If you go to [`BtnHelmetDirective`](../../libs/decoupling/helmet/src/lib/btn-style.directive.ts), you will encounter a linting error. **A project tagged with `type:hlm` can only depend on libs tagged with `type:core`**.
23+
However, the button's helmet needs to access the state of the component to style the button differently based on its state. As mentioned above, we cannot import the `BtnDisabledDirective` directly into the helmet library as done currently. If you go to [`BtnHelmetDirective`](../../libs/decoupling/helmet/src/lib/btn-style.directive.ts), you will encounter a linting error. **A project tagged with `type:hlm` can only depend on libs tagged with `type:core`**.
2424

2525
## Statement
2626

docs/src/content/docs/challenges/angular/39-injection-token.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 🟠 InjectionToken
3-
description: Challenge 39 is about learning the power of dependancy injection
3+
description: Challenge 39 is about learning the power of dependency injection
44
author: thomas-laforge
55
contributors:
66
- tomalaforge

docs/src/content/docs/challenges/angular/4-typed-context-outlet.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ sidebar:
1818

1919
You can improve template type checking for custom directives by adding template guard properties to your directive definition. Angular offers the static function [`ngTemplateContextGuard`](https://angular.dev/guide/directives/structural-directives#improving-template-type-checking-for-custom-directives) to strongly type structural directives.
2020

21-
However the context of **NgTemplateOutlet** type is **Object**. But with the help of the above guard, we can improve that behavior.
21+
However, the context of **NgTemplateOutlet** type is **Object**. But with the help of the above guard, we can improve that behavior.
2222

2323
## Statement
2424

@@ -28,17 +28,17 @@ This exercise has two levels of complexity.
2828

2929
### Level 1: Known Interface
3030

31-
Currently we have the following piece of code.
31+
Currently, we have the following piece of code.
3232

33-
![Unkown Person](../../../../assets/4/unknown-person.png 'Unkown Person')
33+
![Unknown Person](../../../../assets/4/unknown-person.png 'Unknown Person')
3434

3535
As we can see, `name` is of type `any`. We want to infer the correct type using the custom directive `PersonDirective`.
3636

3737
### Level 2: Generic Interface
3838

39-
Currently we have the following piece of code.
39+
Currently, we have the following piece of code.
4040

41-
![Unkown Student](../../../../assets/4/unknown-student.png 'Unkown Student')
41+
![Unknown Student](../../../../assets/4/unknown-student.png 'Unknown Student')
4242

4343
As we can see, `student` is of type `any`. We want to infer the correct type using the custom directive `ListDirective`.
4444

docs/src/content/docs/challenges/angular/44-view-transition.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ sidebar:
1313

1414
## Information
1515

16-
This is the second of two animation challenges, the goal of this series is to master animations in Angular.
16+
This is the second of two animation challenges. The goal of this series is to master animations in Angular.
1717

18-
The View Transition API is a brand new API that provides a set of features that allow developers to control and manipulate the transitions and animations between views within an application.
18+
The View Transition API is a brand-new API that provides a set of features that allow developers to control and manipulate the transitions and animations between views within an application.
1919
It plays a pivotal role in enhancing the user experience (UX), bringing applications to life with engaging and captivating transitions to guide users through different pages or sections of the app.
2020

2121
The goal of this challenge is to learn about and manipulate all types of transitions proposed by the API.

docs/src/content/docs/challenges/angular/45-react-in-angular.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ npm i --save-dev @types/react @types/react-dom
5757

5858
<details>
5959
<summary>Hint 2 - Initialization</summary>
60-
Create a react root with `createRoot(...)`
60+
Create a React root with `createRoot(...)`
6161
</details>
6262

6363
<details>
@@ -76,5 +76,5 @@ npm i --save-dev @types/react @types/react-dom
7676

7777
<details>
7878
<summary>Hint 4 - Design</summary>
79-
Do not forget to allow the react file in Tailwind.
79+
Do not forget to allow the React file in Tailwind.
8080
</details>

0 commit comments

Comments
 (0)