Skip to content

Conversation

@lukasss88
Copy link

No description provided.

@github-actions github-actions bot added 5 exercice crud application answer answer labels Oct 24, 2025
@tomalaforge tomalaforge added sponsor sponsor the project to be reviewed PR requests a review labels Oct 26, 2025
vertical-align: middle;
margin-left: 4px;
}
`,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: always use changedetection.onpush That's an easy win

@for (todo of todos; track todo.id) {
{{ todo.title }}
<button (click)="update(todo)">Update</button>
<app-loader></app-loader>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have a global loader.

What is I want a loader located at the todo component level when I update the todo, or delete it ?

Copy link
Author

@lukasss88 lukasss88 Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I implemented two kinds of loaders:

the global one:
<app-loader></app-loader>

and at the todo level as well:
@if (isProccessing()) { <span class="inline-spinner"> <mat-spinner [diameter]="16" [attr.data-testid]="'todo-spinner-' + todo().id" /> </span> }

await waitForElementToBeRemoved(() => screen.getByTestId('todo-spinner-2'));
expect(screen.getAllByTestId('todo-item').length).toBe(1);
});
});
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice set of tests 🔥

@tomalaforge
Copy link
Owner

i'm not very familiar with the signal store, I'm pro tanstack 😅 but nice code and nice tests. great job

@tomalaforge tomalaforge removed the to be reviewed PR requests a review label Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 exercice crud application answer answer sponsor sponsor the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants