Skip to content

Add notes to wishlist items, plus update-flow fixes - #8

Merged
loevgaard merged 4 commits into
masterfrom
wishlist-item-notes
Jun 22, 2026
Merged

loevgaard merged 4 commits into
masterfrom
wishlist-item-notes

Conversation

@loevgaard

Copy link
Copy Markdown
Member

What's in here

This branch bundles the wishlist-item notes feature plus a couple of UX fixes and chores discovered along the way. Each is a separate commit for easy review.

Add notes to wishlist items (closes #2)

Each wishlist item gets an optional free-text note (nullable text column). The owner edits it via a textarea in the existing wishlist form; recipients of a shared wishlist see it as read-only text. Wishlist item rows are now top-aligned so the taller, multi-line note cells line up with the other columns.

  • WishlistItem / WishlistItemInterface: note property + accessors
  • Doctrine mapping: <field name="note" type="text" nullable="true"/>
  • WishlistItemType: note textarea (saved by the existing PATCH form — no new controller/route/JS)
  • messages.{en,da,no}.yaml: note label
  • show.html.twig: note column + vertical-align: top

Flash a confirmation and redirect after updating a wishlist

Updating a wishlist re-rendered the page in place — no feedback, and a browser refresh re-submitted the form. Now it adds a success flash and redirects back to the wishlist (POST/Redirect/GET).

  • ShowWishlistAction: success flash + redirect; router injected via controller.xml
  • flashes.{en,da,no}.yaml: wishlist_updated message
  • ShowWishlistActionTest: updated + asserts the redirect target and flash

Chores

  • Pin setono/client-bundle to ^1.2 (was left on ^1.0@beta).
  • Fix two stale notes in CLAUDE.md (there is now a tests/Unit suite; infection thresholds are minMsi 25 / minCoveredMsi 95, not 100% MSI).

Verification

  • composer analyse (PHPStan max), composer check-style (ECS), rector --dry-run — clean
  • composer phpunit — 59 tests / 97 assertions pass
  • vendor/bin/infection — Covered Code MSI 100%, MSI 34% (both over threshold)
  • Booted test app: lint:twig, lint:yaml, lint:container clean; doctrine:schema:validate mapping correct
  • Manual browser run (notes save/persist for owner, read-only for recipients; update shows the flash, redirects, and a refresh no longer re-submits)

Not included

The "Add wishlist to cart fails when an item has no variant" UX problem (#7) is intentionally out of scope here.

The bundle had been left on the beta constraint (^1.0@beta); 1.2 is the newest stable release.
Each wishlist item gets an optional free-text note (nullable text column) that
the owner can edit via a textarea in the existing wishlist form and that recipients
of a shared wishlist see as read-only text.

Also top-aligns the wishlist item rows so the now taller, multi-line note cells line
up cleanly with the other columns.
Updating a wishlist re-rendered the page in place: no feedback was shown and a
browser refresh re-submitted the form. Add a success flash and redirect back to the
wishlist (POST/Redirect/GET).
The notes claimed there were no test classes and that infection requires 100% MSI;
both are stale. There is now a tests/Unit suite and the thresholds are minMsi 25 /
minCoveredMsi 95.
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.60%. Comparing base (dc1b0c7) to head (03f96c7).

Files with missing lines Patch % Lines
src/Form/Type/WishlistItemType.php 0.00% 5 Missing ⚠️
src/Model/WishlistItem.php 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master       #8      +/-   ##
============================================
+ Coverage     36.49%   36.60%   +0.10%     
- Complexity      162      165       +3     
============================================
  Files            36       36              
  Lines           485      500      +15     
============================================
+ Hits            177      183       +6     
- Misses          308      317       +9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loevgaard
loevgaard merged commit aeeae4c into master Jun 22, 2026
29 checks passed
@loevgaard
loevgaard deleted the wishlist-item-notes branch June 22, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request]: Notes on each wishlist item

1 participant