localgov icon indicating copy to clipboard operation
localgov copied to clipboard

Add 'simple media bulk upload' to core

Open willguv opened this issue 1 year ago • 4 comments

Some councils have installed https://www.drupal.org/project/simple_media_bulk_upload to speed up loading of multiple media files

@benhillsjones has used it in Haringey and rates it, was installed by Annertech

Let's install it on Prod and try it out

willguv avatar Jun 03 '24 15:06 willguv

I'll try doing this with my new gitpod set up @stephen-cox

willguv avatar Jun 06 '24 10:06 willguv

@stephen-cox with the help of @finnlewis I got this running and have taken it for a spin

Think it's very useful functionality and we should definitely include it as part of core, switched on

willguv avatar Jun 11 '24 09:06 willguv

@willguv I have a PR for this now #729

markconroy avatar Jun 11 '24 15:06 markconroy

Wow! Thank you @markconroy

willguv avatar Jun 11 '24 15:06 willguv

Hi @markconroy what's the latest on your PR please?

willguv avatar Dec 18 '24 09:12 willguv

@willguv it got discussed at Merge Tuesday last week. We're a little closer to a decision, but not fully there yet.

https://github.com/localgovdrupal/localgov/pull/729#issuecomment-2531495938

markconroy avatar Dec 18 '24 10:12 markconroy

Any more news on this @markconroy? Thanks

willguv avatar Jan 22 '25 12:01 willguv

I don't think it's been discussed any more. Everyone agrees with doing this, but there is disagreement on "how we do it".

I've kind of dropped out of that conversation as it's going in a direction I don't fully understand.

https://github.com/localgovdrupal/localgov/pull/729#issuecomment-2531495938

Discussing in Merge Tuesday:

@stephen-cox leaning towards composer-merge plugin rather than the npm asset packagist

@Adnan-cds is suggesting the approach here, but changing it a little to avoid specifying the dist and version, rather targeting the git repo and allow us to require a more open constraint.

Note: we really want to align on a preferred solution for LocalGov Drupal in general.

@stephen-cox points out that if we do require the libraries in the project composer.json, end users can decide whether to override this approach or not. So for us, we define our libraries in the localgov_project composer.json and remove the specific library definition here.

markconroy avatar Jan 22 '25 15:01 markconroy

Here's how Wirral did this @markconroy @finnlewis

Media Bulk Upload Module Install Modules used:

  • Media Bulk Upload https://www.drupal.org/project/media_bulk_upload
  • DropzoneJS https://www.drupal.org/project/dropzonejs Method:
  1. Installed DropzoneJS module following the instructions on the Drupal page.
  2. Installed Media Bulk Upload module through composer the ‘usual way.’
  3. In the bulk upload configuration admin/config/media/media-bulk-config, created an upload profile for the types of media to be uploaded. Specific to Wirral site
  4. Set an INGRESSCOOKIE on the server to prevent files not uploading errors, as multiple running instances of the site caused issues when transferring from the temp:// folder.

willguv avatar Jan 24 '25 09:01 willguv

@willguv That's exactly how my original PR for this added the module as well, but the conversation moved to adding the DropzoneJS library via a different method, and that's where we are at the moment.

  1. Figure out how to get DropzoneJS into the project (in a way that allows sites to use a different version if they wish)
  2. Add media bulk upload

markconroy avatar Jan 28 '25 08:01 markconroy

Thanks Mark. I'm at MT today so will raise this - hope to see you there

willguv avatar Jan 28 '25 08:01 willguv

We discussed the issue on MT on 28/1/2025. We think a new module to handle this feature is the best way forward. We feel that rolling out to all sites may cause issues, particularly if they already have simple bulk upload media or a version of drop zone. By adding a new module that the profile / project downloads, that should alleviate the issue.

andybroomfield avatar Jan 28 '25 12:01 andybroomfield

@finnlewis I'm wondering whether we'll have this challenge with the Refresh mission - we'll likely be proposing fundamental changes to some features and need to think about how to provide them to new users, and a choice for existing users.

@rupertj mentioned a "here's what you missed" idea where content designers can see the effect of upgrades before committing to them. I'm not sure how this would work, but would be very nice to have!

willguv avatar Jan 28 '25 13:01 willguv

@stephen-cox @markconroy @andybroomfield please decide on the best way forward with this at today's Tech meet - thanks

willguv avatar Jan 30 '25 10:01 willguv

See https://github.com/localgovdrupal/localgov_assets

andybroomfield avatar Jan 30 '25 19:01 andybroomfield

Adding comment here for visibility. See https://github.com/localgovdrupal/localgov_assets/issues/2 It does not look like we can add repositories in dependencies.

  • ❌ adding via localgov_assets
  • ❌ adding via localgov (original PR)
  • ✅ adding via npm-asset (asset packagist)
  • ✅ adding via composer merge (with caveats)

andybroomfield avatar Feb 05 '25 12:02 andybroomfield

I propose we go with @andybroomfield Composer Merge Plugin (PR localgovdrupal/localgov_project#173) and then merge @markconroy's PR in the profile #729 with the repositories section removed.

The release notes that include #729 would need to make it clear that existing sites will either need to use the Composer Merge Plugin or Asset Packagist to include the required Dropzone JS library.

stephen-cox avatar Feb 14 '25 13:02 stephen-cox