add no-JS progressive enhancement for all shop flows
All checks were successful
deploy / deploy (push) Successful in 1m23s

Every key shop flow now works via plain HTML forms when JS is
unavailable. LiveView progressively enhances when JS connects.

- PDP: form wraps variant/qty/add-to-cart with action="/cart/add"
- Cart page: qty +/- and remove use form POST fallbacks
- Cart/search header icons are now links with phx-click enhancement
- Collection sort form has GET action + noscript submit button
- New /search page with form-based search for no-JS users
- CartController gains add/remove/update_item POST actions
- CartHook gains update_quantity_form and remove_item_form handlers
- Fix flaky analytics tests caused by event table pollution

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-24 22:56:19 +00:00
parent f788108665
commit 0b0adba0fe
16 changed files with 461 additions and 67 deletions

View File

@@ -462,6 +462,29 @@
text-decoration: underline;
}
.collection-sort-submit {
padding: 0.375rem 1rem;
font-size: var(--t-text-small);
}
/* ── Search page ── */
.search-page-form {
display: flex;
gap: 0.75rem;
margin-bottom: 2rem;
max-width: 32rem;
}
.search-page-form input {
flex: 1;
}
.search-page-count {
color: var(--t-text-secondary);
margin-bottom: 1.5rem;
}
/* ── Breadcrumb ── */
.breadcrumb {
@@ -1414,6 +1437,10 @@
text-decoration: underline;
}
.cart-remove-form {
display: contents;
}
/* ── Cart empty state ── */
.cart-empty {