feat/category-only-edit #4
Loading…
Reference in New Issue
No description provided.
Delete Branch "feat/category-only-edit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR:
feat/category-only-edit→mainObjective
Stage 1B — Category-only product edit. Final slice of Stage 1 (controlled product editing). Adds the ability to update a product's category through the same narrow single-field edit pattern established by price, name, and description edits. No taxonomy subsystem introduced.
Inspection findings
Baseline
mainatcebac4cconfirmed: four narrow edit capabilities landed (status, price, name, description). Each follows an identical vertical pattern — repository contract → use case → controller action/result → preview panel inline edit UI → snack bar feedback → tests. Category was the only remaining Stage 1 field. The existingProductDraft.categoryfield andcopyWith(category:)were already present. No structural changes needed — only additive wiring through the established pattern.Implementation
Followed the exact pattern from prior slices:
updateProductCategory(String id, String category)toProductPublishingRepositoryUpdateProductCategory(single-responsibility, delegates to repository)updateProductCategorywithcopyWith+ timestamp updateupdateProductCategorymapping category name to WooCommercecategoriesfield via existing_resolveCategoryIdhelperCategoryActionResultclass,updateCategory()method,lastCategoryResult/consumeCategoryResult()(one-shot result pattern)_MetadataRowfor Category with_buildCategoryRow(inline text field with save/cancel, edit icon gated ononCategoryChangedcallback)UpdateProductCategoryinto controller constructor andonCategoryChangedinto preview panelshowCategoryActionSnackBarfor success/failure feedbackupdate_product_category.darttofeature_wordpress.dartdashboard_controller_test.dartandproduct_publishing_page_test.dartmocks for new repository methodChanged files
lib/src/domain/product_publishing_repository.dartupdateProductCategorycontractlib/src/application/update_product_category.dartlib/src/application/product_publishing_controller.dartCategoryActionResult,updateCategory, result handlinglib/src/data/fake_product_publishing_repository.dartupdateProductCategorylib/src/data/wordpress_product_publishing_repository.dartupdateProductCategory(WP API)lib/src/presentation/widgets/product_preview_panel.dartlib/src/presentation/product_publishing_page.dartlib/src/presentation/widgets/status_action_snack_bar.dartshowCategoryActionSnackBarlib/feature_wordpress.darttest/product_publishing_controller_test.dartupdateCategoryteststest/fake_product_publishing_repository_test.dartupdateProductCategoryteststest/widgets/product_publishing_page_test.dartapps/kell_web/test/.../dashboard_controller_test.dartdocs/development/master_development_brief.mddocs/development/build_execution_tracker.mdValidation
dart analyzefeature_wordpresstestskell_webdashboard testsDefinition of done (per brief)
Next slice
feat/post-write-consistency— Stage 2A: Post-write consistency hardening. Stage 1 is now complete; all single-field edit capabilities are landed.