tage 1A — Description-only product edit implemented #3
Loading…
Reference in New Issue
No description provided.
Delete Branch "feat/description-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 Summary —
feat/description-only-edit(Stage 1A)Objective
Allow updating product description only, extending the publishing workflow with the next single-field edit capability per the master development brief (Stage 1 → Stage 1A).
Inspection findings
Inspected the existing price-only and name-only edit implementations on
main. The established narrow pattern is consistent across all layers:ProductPublishingRepositoryActionResultclass + one controller method with per-row updating/dedup/feedbackProductPreviewPanel(edit/save/cancel), wired throughProductPublishingPagewith snack bar feedbackBaseline on
main: 195 feature_wordpress tests, 10 kell_web dashboard tests,dart analyzeclean. Three narrow edit capabilities landed (status, price, name).Implementation
Mirrored the name-only edit pattern exactly for description:
updateProductDescription(String id, String description)toProductPublishingRepositoryUpdateProductDescriptionuse case;DescriptionActionResultclass;updateDescription(),lastDescriptionResult,consumeDescriptionResult()on controllerFakeProductPublishingRepository.updateProductDescription— updates description + lastModified, throwsStateErrorfor unknown idWordpressProductPublishingRepository.updateProductDescription— PATCH viaWooCommerceApiClientwith{'description': ...}payloadProductPreviewPanel(edit icon → TextField with save/cancel);ProductPublishingPagewiresonDescriptionChanged;showDescriptionActionSnackBaraddedfeature_wordpress.dartexportsUpdateProductDescriptionNo generic update API introduced. No rich text editor. WooCommerce details remain inside WP repo only. Strict package boundaries preserved.
Changed files
feature_wordpresspackage (10 files)lib/src/domain/product_publishing_repository.dart— contract updatelib/src/application/update_product_description.dart— new use caselib/src/application/product_publishing_controller.dart— result class + methodlib/src/data/fake_product_publishing_repository.dart— fake impllib/src/data/wordpress_product_publishing_repository.dart— WP impllib/src/presentation/widgets/product_preview_panel.dart— inline edit UIlib/src/presentation/product_publishing_page.dart— wiring + snack bar consumptionlib/src/presentation/widgets/status_action_snack_bar.dart— description snack barlib/feature_wordpress.dart— barrel exporttest/product_publishing_controller_test.dart— 5 new description teststest/fake_product_publishing_repository_test.dart— 5 new description teststest/widgets/product_preview_panel_test.dart— 6 new description editing teststest/widgets/product_publishing_page_test.dart— stub fixkell_webapp (1 file)test/dashboard/application/dashboard_controller_test.dart— stub fixValidation
dart analyzefeature_wordpresstestskell_webdashboard testsNext slice
Stage 1B — Category-only product edit (
feat/category-only-edit): Allow updating product category only using a simple constrained UI, reusing the same narrow single-field edit pattern. No taxonomy subsystem.