Make H5P content libraries deployable

Created on 3 December 2019, over 4 years ago
Updated 11 October 2023, 9 months ago

Problem/Motivation

The way content type libraries currently work, they are treated essentially as content (stored in the file system, and in the database.)

This makes it difficult to use them as part of a platform that might need to be deployed through a workflow, or across multiple servers.

It would be great if the libraries could optionally be placed in Drupal core's /libraries directory.

This would allow also for themes and design systems to be tested against known versions, and not have new libraries added in production without going through a normal QA process.

Proposed resolution

Add a setting that allows the module to look in /libraries instead of in the file system, and add whatever logic is necessary to have the database cache of library data updated during code deploys.

Remaining tasks

  1. Agree on approach
  2. Create patch to allow libraries to reside in {DRUPAL_ROOT}/libraries
  3. Add composer.json files to each library on GitHub

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jhedstrom Portland, OR

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

    Is there a screenshot of what this new change will look like for the content creator? Is there a change in UI?

  • πŸ‡·πŸ‡ΊRussia ilya.no

    I've noticed, that when we see list of libraries inside iframe in field widget, there is no icon for each library, located in web/libraries folder, because module tries to load it from sites/default folder.
    So, here is the patch with the fix for this and also I've included latest changes from MR.

  • πŸ‡§πŸ‡΄Bolivia vacho Cochabamba

    This patch fixes some issues about js-libraries paths..

Production build 0.69.0 2024