Skip to content

Add multi-upload and ordered gallery support - #122

Open
mivancic wants to merge 9 commits into
3.0from
3.0-multiupload
Open

mivancic wants to merge 9 commits into
3.0from
3.0-multiupload

Conversation

@mivancic

@mivancic mivancic commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Adds a collection mode to the remote media form type and picker. Editors can select or upload several resources, reorder them, and edit alt text, caption and crops per item. Single-media fields behave as before.

  • RemoteMediaType is split into a single type and a new RemoteMediaCollectionType. The submitted collection replaces the stored one, so clearing a gallery sticks.
  • Malformed payloads fail the form instead of emptying the collection. Location ids that don't belong to the edited value are ignored.
  • Picker:
    • multi-select and drag to reorder;
    • optional upload limit per field;
    • items already in the gallery are skipped when browsing or uploading;
    • folder placeholders never create folders in Cloudinary.
  • Replacing a single image keeps its watermark.
  • The bundled CKEditor plugin passes the new picker options, so embeds keep working with the shared picker.
  • Translation keys for the multi-select UI (en, hr, no) and a new Norwegian Bokmål (nb) file.
  • Dist assets in bundle/Resources/public rebuilt (Node 12).

Behaviour changes:

  • If a resource no longer exists in Cloudinary when its metadata is saved, the local resource and its locations are kept and a warning with the remote id is logged. Before, the resource was deleted locally, which also removed it from every other field using it.
  • Tags are compared and stored sorted, so a different tag order no longer triggers a Cloudinary update on every save.

CI: the test matrix now uses Symfony ~6.4.0 instead of ~6.2.0. Composer refuses every 6.2 release because of security advisories, so that job could not install dependencies; it fails the same way on 3.0 since February. 6.4 is the maintained LTS.

mivancic and others added 8 commits June 11, 2026 10:58
Implement upload-limited multi-resource handling with multi-select and
reorderable gallery cards, split RemoteMediaType into single and
collection form types, convert the multi-gallery components to
props-down/events-up data flow, and improve the multi-upload UX, i18n
and wire format. Add a Norwegian Bokmål (nb) translation file.

Fix the CKEditor "Manage Media" modal so the gallery renders in
collection mode (default the embed to single-select and guard the
missing multi-select translation key that was blanking the gallery).
Includes rebuilt NGRM frontend assets (remotemedia.js +
remotemedia.css).
Clearing a gallery now sticks, folder placeholders no longer create Cloudinary folders and existing CKEditor embeds load their media. Malformed payloads fail the form instead of emptying the collection.
Browsing or uploading into a gallery now skips resources that are already in it and stops at the upload limit, and replacing a single image keeps its watermark.
…mote

The metadata is still saved locally, and the warning names the remote id so missing assets can be found.
Import order and missing function imports, no short ternary in the collection transformer, and intersection-typed provider mocks in the form type tests.
Composer now refuses every Symfony 6.2 release because of security advisories, so the 6.2 job could not install dependencies. 6.4 is the maintained LTS.
@mivancic
mivancic requested a review from RandyCupic October 5, 2026 14:42
The multi-upload rewrite dropped the always-present remoteId input, so removing the media from a single field sent nothing and forms that keep the previous value on a missing field could not clear it. Dist rebuilt with Node 12.
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.

1 participant