Skip to content

Commit 7cc1d2d

Browse files
authored
fix: many grammar tweaks (tomalaforge#957)
* 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 * fix: add LMFinney as contributor on tweaked files
1 parent 0a9ee99 commit 7cc1d2d

40 files changed

+150
-115
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ contributors:
66
- tomalaforge
77
- tomer953
88
- svenson95
9+
- LMFinney
910
challengeNumber: 10
1011
command: angular-utility-wrapper-pipe
1112
sidebar:
@@ -14,13 +15,13 @@ sidebar:
1415

1516
## Information
1617

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

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.
20+
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.
2021

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.
22+
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.
2223

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.
24+
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.
2425

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

3233
## Statement
3334

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.
35+
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.
3536

3637
## Constraints
3738

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ contributors:
66
- tomalaforge
77
- tomer953
88
- kabrunko-dev
9+
- LMFinney
910
challengeNumber: 13
1011
command: angular-highly-customizable-css
1112
sidebar:
@@ -14,7 +15,7 @@ sidebar:
1415

1516
## Information
1617

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.
18+
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.
1819

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

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
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
77
- tomer953
88
- svenson95
9+
- LMFinney
910
challengeNumber: 22
1011
command: angular-router-input
1112
blogLink: https://medium.com/ngconf/accessing-route-params-in-angular-1f8e12770617

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ contributors:
77
- tomer953
88
- kabrunko-dev
99
- svenson95
10+
- LMFinney
1011
challengeNumber: 3
1112
command: angular-directive-enhancement
1213
blogLink: https://medium.com/@thomas.laforge/ngfor-enhancement-716b44656a6c
@@ -20,15 +21,15 @@ This exercise can feel obsolete with the new control flow and the empty block in
2021

2122
## Information
2223

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.
24+
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.
2425

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

2728
## Statement
2829

2930
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 !! "_.
3031

31-
Currently we have:
32+
Currently, we have:
3233

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

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ contributors:
66
- tomalaforge
77
- tomer953
88
- jdegand
9+
- LMFinney
910
challengeNumber: 32
1011
command: angular-change-detection-bug
1112
blogLink: https://medium.com/ngconf/function-calls-inside-template-are-dangerous-15f9822a6629
@@ -19,7 +20,7 @@ This challenge is inspired by a real-life example that I simplified to create th
1920

2021
## Information
2122

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.
23+
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.
2324

2425
## Statement
2526

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ author: thomas-laforge
55
contributors:
66
- tomalaforge
77
- jdegand
8+
- LMFinney
89
challengeNumber: 33
910
command: angular-decoupling-components
1011
sidebar:
@@ -18,9 +19,9 @@ sidebar:
1819

1920
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.
2021

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).
22+
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).
2223

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`**.
24+
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`**.
2425

2526
## Statement
2627

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
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
77
- jdegand
8+
- LMFinney
89
challengeNumber: 39
910
command: angular-injection-token
1011
sidebar:

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ contributors:
77
- tomer953
88
- svenson95
99
- jdegand
10+
- LMFinney
1011
challengeNumber: 4
1112
command: angular-typed-context-outlet
1213
blogLink: https://medium.com/@thomas.laforge/ngtemplateoutlet-type-checking-5d2dcb07a2c6
@@ -18,7 +19,7 @@ sidebar:
1819

1920
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.
2021

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

2324
## Statement
2425

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

2930
### Level 1: Known Interface
3031

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

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

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

3738
### Level 2: Generic Interface
3839

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

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

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

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ author: thomas-laforge
55
contributors:
66
- tomalaforge
77
- jdegand
8+
- LMFinney
89
challengeNumber: 44
910
command: angular-view-transition
1011
sidebar:
@@ -13,9 +14,9 @@ sidebar:
1314

1415
## Information
1516

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

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.
19+
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.
1920
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.
2021

2122
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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ contributors:
66
- wandri
77
- tomalaforge
88
- jdegand
9+
- LMFinney
910
challengeNumber: 45
1011
command: angular-react-in-angular
1112
sidebar:
@@ -57,7 +58,7 @@ npm i --save-dev @types/react @types/react-dom
5758

5859
<details>
5960
<summary>Hint 2 - Initialization</summary>
60-
Create a react root with `createRoot(...)`
61+
Create a React root with `createRoot(...)`
6162
</details>
6263

6364
<details>
@@ -76,5 +77,5 @@ npm i --save-dev @types/react @types/react-dom
7677

7778
<details>
7879
<summary>Hint 4 - Design</summary>
79-
Do not forget to allow the react file in Tailwind.
80+
Do not forget to allow the React file in Tailwind.
8081
</details>

0 commit comments

Comments
 (0)