Search by

novicell / premium_gin

novicell-drupal

Shared Gin Layout Builder integration for Drupal Premium projects.

Package info

github.com/novicell-drupal/drupal-premium-gin

Language:CSS

Type:drupal-module

pkg:composer/novicell/premium_gin

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0 2026-09-18 12:25 UTC

This package is auto-updated.

Last update: 2026-09-19 07:29:06 UTC


README

Shared presentation on top of Gin Layout Builder. Gin LB owns editor forms, standard dialogs and media-library UI; this module supplies the Premium editing preferences. No frontend palette values or block templates are included.

Requirements and installation

Drupal 11.2+, PHP 8.3+, Gin 5.x, Gin Toolbar 3.x and Gin LB 3.x. Composer enforces the Gin theme requirement (Drupal modules cannot declare a theme as a module dependency). Tested with Gin 5.0.15, Toolbar 3.0.3, Gin LB 3.0.0-beta1 and Drupal 11.4.6. Gin LB remains a beta dependency; retest editor flows on updates and use the project's Composer lock file.

Install this package through your Composer repository as novicell/premium_gin, then run drush en premium_gin -y and drush cr. No remote repository/release has been created yet.

Settings: /admin/config/user-interface/premium-gin. Export premium_gin.settings and the core.extension enablement per project. The compact actions-only view is off by default: enable it only for projects that do not need revision/moderation fields in Layout Builder. It hides controls visually; it does not change their values or disable Drupal's workflow rules.

Libraries and ownership

Library Responsibility
bottom-bar Positions Gin LB's sidebar at the bottom; observes its height to reserve page space.
actions-only Optional compact view, preserving the original form and actions.
section-header Gin colors and accessible pencil/trash presentation for existing Premium headers.
premium-layouts Maps editor controls to the surrounding section's contrast tokens; adds spacing.
styles Gin LB checkbox classes, swatch palette and selection colors.

Libraries attach only to Gin LB routes/forms, including AJAX forms. Disabled settings remove the corresponding attachments. Cache metadata includes the settings dependency and route/theme contexts. Styles is optional; its library is attached only when the module is enabled. No libraries-override replaces Gin or Gin LB assets.

The section-header library requires layout markup supplied by premium_theme_helper (or equivalent): .layout-builder__section--header inside .layout-builder__layout, containing a label, configure link, then remove link. Keep original link text/accessible names and title attributes. Header generation remains with that layout provider; this module does not replace core layout plugins or require the site's helper module.

Premium layout color integration expects .layout-builder__layout.section.theme and --theme-button-background-color / --theme-button-color tokens. Swatches use --theme-background-color / --theme-color. The frontend theme supplies those palettes. Projects with other token names can extend the integration.

General swatch dimensions, borders, empty state size and the neutral --styles-preview-focus-color hook belong in novicell/styles (migration branch). Premium Theme's matching branch yields marked Gin LB forms and editor assets to Gin LB; non-editor Premium assets remain active. A narrow compatibility hook retires only premium_core/styles-gin CSS because it still uses obsolete Gin variable names. Remove that bridge when Premium Core retires its legacy library.

Checks

Run drush php:script modules/contrib/premium_gin/tests/verify.php on a local or disposable site. It checks optional attachments, cache metadata preservation, asset paths and the compatibility bridge, and restores original settings in finally. Use php -l for PHP files and node --check js/bottom-bar.js.

Browser regression checks: wide/narrow viewports; Gin light/dark modes; toggle content preview; section configuration; add/edit blocks; swatch selection and its backing checkbox; nested media grid/table and selection. Confirm bottom padding after resize and that normal frontend pages load no editor library. Test saving and drag/drop on disposable content before rolling out to a site.

License

GPL-2.0-or-later. icons/edit.svg and icons/trash.svg are copied from Gin 5.0.15 (media/icons/toolbar/edit.svg and media/icons/action-link/trash.svg), under Gin's GPL-2.0-or-later license. Keeping these tiny assets local avoids relying on relative paths into another extension's installation directory.