Commit dc3e99b
feat: add @myorg/todo library with TodoStore (#110)
* feat: add @myorg/todo library with TodoStore (closes #109)
- Todo model: id, title, description, completed, createdAt
- TodoService: getAll, create, update, remove
- TodoStore (scoped): rxResource for fetching, rxMethod for mutations
- enableSync/disableSync toggles API fetching (returns [] when off)
- Todo component: .ts-only, inline template, Tailwind, OnPush
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: build out todo feature with routing and backend API
Frontend:
- TodoList, TodoForm, TodoPage components (.ts-only, Tailwind, OnPush)
- lib.routes.ts with TodoStore scoped to route
- /todos route added to app.routes.ts
- Todos nav link added to shared nav-links
- 16 passing tests across store and components
Backend:
- GET/POST /api/todos, PATCH/DELETE /api/todos/{id}
- In-memory TodoRepository (singleton, ConcurrentDictionary)
- TodoRepository registered in Program.cs
- 8 new unit tests for repository (9 total, all passing)
- Api.http updated with todo request examples
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: update TodoForm styling to match app form conventions
- External labels (text-xs font-semibold text-on-surface-variant)
- subscriptSizing=dynamic to remove dead space below inputs
- Aligned button to bottom of fields on sm+ screens
- Remove MatLabel import (no longer needed)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: use mat-label and bg-surface-container in TodoForm
- Restore mat-label inside mat-form-field for proper validation display
- Wrap form in rounded-2xl bg-surface-container card to match other pages
- Keep subscriptSizing=dynamic and sm:flex-row layout
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: style empty state as alert in TodoList
Replaces plain text with a Shadcn-style alert:
- border border-outline-variant bg-surface-container-low rounded-xl p-4
- inbox icon + title + description
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: constrain empty state alert to max-w-md
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: center empty state alert horizontally
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: use signal forms in TodoForm + add curly ESLint rule
- Rewrite TodoForm with @angular/forms/signals (experimental)
- form() + [formField] directive replaces ReactiveFormsModule
- required() validator with custom message
- submit() handles validation + reset
- computed formValid() drives button disabled state
- Tailwind-styled native inputs (bg-surface, border-outline, focus:ring-primary)
- Error shown inline below title input when touched + invalid
- Add curly: ['error', 'all'] to eslint.config.cjs
- Auto-fix existing curly violations in main-toolbar, wait-for-element, todo-form
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: build error in signal forms + API error handling
Signal forms fix:
- submit() action receives FieldTree not plain model; read values
via field.title().value() and return Promise.resolve()
Error handling:
- Add mutationError: string | null to TodoState
- Mutation tapResponse.error sets a user-friendly message in state
- Mutation tapResponse.next clears mutationError
- Add clearMutationError() store method
- TodoPage shows dismissible error banner for mutation errors
- TodoPage shows fetch error alert (cloud_off + retry button)
when store.todos.error() is set, replacing the list
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: restore mat-label using SignalFormControl from signals/compat
Use SignalFormControl from @angular/forms/signals/compat so the todo
form keeps signal-based validation rules while integrating with
mat-form-field / mat-label / mat-error via standard ReactiveFormsModule
formControlName binding.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: add curly braces to if statement in update-packages main.ts
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: enable nullable reference types in Api project
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6ce888e commit dc3e99b
37 files changed
Lines changed: 1798 additions & 394 deletions
File tree
- apps
- api
- Api.Test
- Api
- Controllers
- Endpoints
- web-app/src/app
- libs
- todo
- src
- lib
- components
- todo-form
- todo-list
- todo-page
- models
- services
- state
- tools/update-packages/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
11 | 100 | | |
| 101 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
169 | 173 | | |
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
173 | 177 | | |
174 | | - | |
175 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
176 | 184 | | |
177 | 185 | | |
178 | 186 | | |
0 commit comments