feat: add @myorg/todo library with TodoStore#110
Conversation
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
7 similar comments
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
chrisjwalk
left a comment
There was a problem hiding this comment.
Can you please fix the linter error here?
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
87eba63 to
1e2f3e6
Compare
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
1e2f3e6 to
142d84e
Compare
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
- 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>
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>
- 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>
- 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>
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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- 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>
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>
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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2cb02c8 to
a1233e9
Compare
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-110.eastus2.2.azurestaticapps.net |
|
Note Coverage shown for affected projects only. Per-file thresholds (80%) are enforced by vitest.
|
Closes #109
Changes
Todomodel:id,title,description,completed,createdAtTodoService:getAll(),create(),update(),remove()TodoStore(scoped):rxResourcefor fetching,rxMethodfor mutationsenableSync()/disableSync()— toggles API fetching; returns[]when disabledTodocomponent:.ts-only, inline template, Tailwind, OnPush