4 Commits

Author SHA1 Message Date
ordinarthur
b6fd89978e feat(admin): visual inline editor for the homepage
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 2m55s
The Page d'accueil global now uses the same edit-in-place pattern as
products: hero (with image upload), collection header, contact, and
footer are all clickable-to-edit directly on a scoped replica of the
live page. Technical fields (WhatsApp number, Instagram URL, response
time, SEO) move to a "Réglages avancés" drawer.

- HomePreviewEditor + home-panel.css mirror the public layout
- HeroImageUploadSlot: single-image click-to-replace variant
- HomeSettingsDrawer for non-visual fields
- InlineEditable: add `separator` prop so stored `|` line-breaks render
  as newlines in the editor and roundtrip on save (used for heroTitle,
  contactTitle)
- Remove unused ProductPanelInfo + editor.css

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 18:53:45 +02:00
ordinarthur
8f3a26e883 fix(admin): sync inline-editable DOM text imperatively
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 2m45s
React 19 does not reconcile children of contentEditable elements
after mount, so fields whose useField value arrives async (on most
paths under the tabs wrapper) stayed visually empty even though the
form state had the right value.

Drive textContent from a useLayoutEffect keyed on value, skip updates
while the element has focus (user typing), and let commit() write back
on blur. Same fix applied to PriceEditable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 14:04:12 +02:00
ordinarthur
f5671008a7 feat(admin): replace default edit view with visual preview editor
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 2m39s
Overriding admin.components.views.edit.default makes /admin/collections/
products/:id and /create render the product-detail panel directly —
text fields are contentEditable, the image is click-to-upload, and
price is inline-editable in the checkout-price-line. Fields that don't
fit the public template (slug, name, currency, availability, SEO,
isPublished, sortOrder, stripeID) live in a collapsible "Réglages
avancés" drawer below the panel.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 13:54:50 +02:00
ordinarthur
8fc3b2365a feat(admin): click-to-edit visual editor for products
Some checks failed
Build & Deploy to K3s / build-and-deploy (push) Failing after 14m11s
New "Édition visuelle" tab on the product edit view renders the
product panel with each text field wrapped in a contentEditable
InlineEditable that calls useField.setValue on blur. Combined with
the collection's existing autosave, changes persist automatically
without a manual save.

- InlineEditable: contentEditable wrapper backed by useField
- ProductPanelInfo: presentational product-panel JSX
- ProductPreviewEditor: default-exported custom view component
  registered at admin.components.views.edit.livePreview
- Image is read-only; slug/price/SEO still edited via default form tab

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 12:09:45 +02:00