feat/publishing-ux-hardening #6

Merged
mtkell merged 2 commits from feat/publishing-ux-hardening into main 2026-04-11 20:42:24 +00:00
Owner

PR: feat/publishing-ux-hardeningmain

Objective

Stage 2B — Tighten the publishing workflow UX without broadening architecture. Per the master brief, this slice addresses: inline validation messaging for single-field edits, consistent disabled/loading states, and refined failure wording.

Inspection findings

Baseline: main at 7acff83 (Stage 2A complete). 234 tests passing, analyze clean. Inspection identified three gaps against Stage 2B requirements:

  1. No inline validation errors — submitting empty name/description/category or invalid price silently rejected input with no user-visible feedback.
  2. Inconsistent disabled states — text fields and save buttons remained interactive during isUpdating, allowing edits while a write was in flight.
  3. Failure snack bars omitted error detail — failure messages said "Failed to publish X." but discarded the errorMessage the controller already provided.

Implementation

All changes confined to the presentation layer — no domain, application, or repository changes.

  • ProductPreviewPanel — Added _nameError, _priceError, _descriptionError, _categoryError state fields. Submit methods now set error text on empty/invalid input; errors display as red helper text below the text field. Cancel clears errors. Text fields set enabled: false and save buttons set onPressed: null when isUpdating is true. Added onCategoryChanged callback and consistent tooltips (Save price, Save category, Cancel).
  • showStatusActionSnackBar — Failure message now appends errorMessage when present (e.g., "Failed to publish Floral Bowl Cozy. Network error").

Changed files

File Summary
.../widgets/product_preview_panel.dart Inline validation errors, disabled edit states during isUpdating, onCategoryChanged, consistent tooltips
.../widgets/status_action_snack_bar.dart Failure SnackBar appends error detail
.../test/widgets/product_preview_panel_test.dart 13 new tests: validation errors (4 fields), error-clears-on-cancel (4), valid-clears-previous-error (1), disabled-during-updating (4)
.../test/widgets/status_action_snack_bar_test.dart 2 updated assertions for new failure wording
docs/development/build_execution_tracker.md Stage 2B entry with file changes, test counts, status
docs/development/master_development_brief.md In-progress branch section, next branch updated to Stage 3A

Validation

  • dart analyze: No issues found
  • flutter test (feature_wordpress): 247/247 passed (+13 over 234 baseline)
  • No architecture broadening. No new packages, contracts, or repository changes.

Next slice

Stage 3Afeat/multi-select-groundwork: Multi-select groundwork (read/state only, no bulk writes).

## PR: `feat/publishing-ux-hardening` → `main` ### Objective Stage 2B — Tighten the publishing workflow UX without broadening architecture. Per the master brief, this slice addresses: inline validation messaging for single-field edits, consistent disabled/loading states, and refined failure wording. ### Inspection findings Baseline: `main` at `7acff83` (Stage 2A complete). 234 tests passing, analyze clean. Inspection identified three gaps against Stage 2B requirements: 1. **No inline validation errors** — submitting empty name/description/category or invalid price silently rejected input with no user-visible feedback. 2. **Inconsistent disabled states** — text fields and save buttons remained interactive during `isUpdating`, allowing edits while a write was in flight. 3. **Failure snack bars omitted error detail** — failure messages said "Failed to publish X." but discarded the `errorMessage` the controller already provided. ### Implementation All changes confined to the presentation layer — no domain, application, or repository changes. - **`ProductPreviewPanel`** — Added `_nameError`, `_priceError`, `_descriptionError`, `_categoryError` state fields. Submit methods now set error text on empty/invalid input; errors display as red helper text below the text field. Cancel clears errors. Text fields set `enabled: false` and save buttons set `onPressed: null` when `isUpdating` is true. Added `onCategoryChanged` callback and consistent tooltips (`Save price`, `Save category`, `Cancel`). - **`showStatusActionSnackBar`** — Failure message now appends `errorMessage` when present (e.g., "Failed to publish Floral Bowl Cozy. Network error"). ### Changed files | File | Summary | |------|---------| | `.../widgets/product_preview_panel.dart` | Inline validation errors, disabled edit states during `isUpdating`, `onCategoryChanged`, consistent tooltips | | `.../widgets/status_action_snack_bar.dart` | Failure SnackBar appends error detail | | `.../test/widgets/product_preview_panel_test.dart` | 13 new tests: validation errors (4 fields), error-clears-on-cancel (4), valid-clears-previous-error (1), disabled-during-updating (4) | | `.../test/widgets/status_action_snack_bar_test.dart` | 2 updated assertions for new failure wording | | `docs/development/build_execution_tracker.md` | Stage 2B entry with file changes, test counts, status | | `docs/development/master_development_brief.md` | In-progress branch section, next branch updated to Stage 3A | ### Validation - `dart analyze`: **No issues found** ✅ - `flutter test` (feature_wordpress): **247/247 passed** ✅ (+13 over 234 baseline) - No architecture broadening. No new packages, contracts, or repository changes. ### Next slice **Stage 3A** — `feat/multi-select-groundwork`: Multi-select groundwork (read/state only, no bulk writes).
mtkell added 2 commits 2026-04-11 20:42:11 +00:00
73b4a49939 docs: update briefs for merged feat/post-write-consistency (Stage 2A)
- Mark Stage 2A complete in master brief and build tracker

- Refresh main baseline to 7acff83

- Next slice: feat/publishing-ux-hardening (Stage 2B)
Validate Docs / validate-docs (push) Successful in 1m9s Details
02cc75c655
feat: publishing workflow UX hardening (Stage 2B)
mtkell merged commit b81016df28 into main 2026-04-11 20:42:24 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mtkell/kell_creations#6
No description provided.