v0.4.0
Changed
- The collection-lifecycle admin page lists each collection with always-visible Edit and Delete buttons at the right-hand end of the row, replacing the hover-revealed row actions, and the list table is now visibly separated from the page header. Delete still routes through the existing confirmation step, and a collection whose descriptor cannot be read still lists by slug and remains deletable. (#30)
- The Photo Drop Zone block is now an
InnerBlockswrapper: its appearance is editable inner blocks (a centred dashed group by default, seeded on insertion and not locked), and the whole inner-block surface is the upload zone. The token{kntnt-drop-zone-collection}in the inner blocks is replaced with the selected collection's display name on the published page. The block also gains thecloud-uploadicon in the inserter and list view, and the inspector spaces the "Manage collections" link clear of the read-only contract display. The capability gate andwp_rest-nonce privacy are unchanged: nothing renders and no nonce is emitted for a visitor who cannot upload (ADR-0006). The surface is keyboard-operable (focusable, with Enter or Space opening the file picker), and each file's status row shows the live upload percentage while it transfers. (#31) - The Photo Gallery block is retitled Photo Drop Gallery (the
kntnt-photo-drop/galleryslug is unchanged) and gains theformat-galleryicon in the inserter and list view. Its editor preview now renders in a capped editor-preview mode: at most 6 figures and no lightbox markup (clicks are inert in the canvas), so a collection of thousands never floods the editor. When there is nothing to render — no collection chosen, a dangling slug, an empty collection, or while the preview loads — the editor shows 6 grey placeholders instead of only a notice, and the editor-only "Photo Gallery" preview label is gone (the canvas shows only images). The preview signal is a render-time-onlyisEditorPreviewattribute that defaults tofalseand is never written intopost_content, so the frontend render is unchanged: no cap, lightbox as configured, full walk. (#32) - The Photo Drop Gallery caption is now always an overlay inside the image, governed by one shared Caption panel: content (none / filename / path breadcrumb), humanise, include-collection-name and separator (for the breadcrumb), and a nine-point Anchor (always shown for any non-"none" content). The caption's text colour, overlay background, and typography come from the core Colour and Typography block-support panels; each image's border and shadow come from the core Border and Shadow panels; and the inter-item gap comes from the core Block spacing (
blockGap) support. All are declared with__experimentalSkipSerializationand projected server-side onto the right sub-element — the<figcaption>(colour, typography) or each<img>(border, shadow) — through the WordPress style engine, the same pattern core's Image block uses, never onto the block wrapper. The same Caption settings will drive the lightbox caption once the lightbox consumes them (#34). (#33) - The gallery figure layout is rebuilt so the always-overlay caption and the image render correctly in both the uniform grid (mode A) and the justified rows (mode B): each figure is the sizing box and the caption's positioning context, with the link and image filling it absolutely. This fixes the two clipping bugs the old
overflow:hidden-over-aspect-ratio figure caused — captions that showed nothing and justified rows that showed only alt-text — and justified rows now render real images at small target row heights. (#33) - The Photo Drop Gallery's single Lightbox panel is replaced by a Click behaviour panel of two toggles — Lightbox (default on) and Download (default off) — that together fix what a thumbnail click does: both off → the click does nothing; lightbox on → the click opens the lightbox; download on, lightbox off → a download icon overlays each image and the click saves the full main image; both on → the thumbnail has no icon and the click opens the lightbox, with the download icon appearing only inside the lightbox and the enlarged image downloading on click. The download always targets the full-resolution main image (same-origin
downloadanchor), modified clicks stay with the browser, and the no-JS<a href>fallback still navigates to the main image. The download icon is an anchored overlay with bespoke size (2rem), background (#00000080), foreground (#ffffff), and nine-point anchor (top-left) controls — bespoke because the block-support Colour panel is claimed by the caption. When the lightbox is on and the caption content is not "none", the enlarged image carries the same overlay caption (content, anchor, and colour/typography projection) as the gallery. The editor preview stays click-inert but shows the download icon where the frontend would. (#34)
Removed
- The Drop Zone's FilePond uploader is replaced by a native drag-drop + click-to-browse surface covering the whole inner-block area; the
fileponddependency and its stylesheet are dropped from the bundle. Folder drag-and-drop (with the top-level-only warning), the "Select folder" picker, the per-file status list and live summary, real upload progress, and the one-shot nonce refresh on expiry are all preserved. (#31) - The gallery's bespoke caption-styling and gap attributes are gone (pre-1.0, no migration):
captionPosition(captions are always an overlay now),captionOverlayAnchor(renamed tocaptionAnchor),captionBackgroundandcaptionTextColor(replaced by the Colour/Typography block-support panels), and the customblockGapattribute (replaced by theblockGapspacing support). The Position and overlay-colour inspector controls and the bespoke Gap control are removed with them. (#33) - The gallery's
enableLightboxattribute is gone (pre-1.0, no migration), split intolightbox(default on) anddownload(default off) plus the four download-icon controls (downloadIconSize,downloadIconBackground,downloadIconForeground,downloadIconAnchor). (#34)
Fixed
- The justified layout's server-side row packing now understands
rem/emgap values instead of silently packing every non-pixel gap as 12 px, so rows break where the rendered gap says they should.
Security
- Free-text styling values that reach inline
styleattributes — the download-icon size and colours, the minimum column width, the block-spacing gap, and the aspect ratio — are now validated against strict shape rules (length, colour, ratio) and fall back to their defaults when they do not conform. Previously a user withoutunfiltered_htmlcould store CSS declarations through a block attribute and have them emitted on the public page (the aspect-ratio and column-width vectors date back to 0.1.0).
Full changelog: https://github.com/Kntnt/kntnt-photo-drop/blob/v0.4.0/CHANGELOG.md