Problem/Motivation

The module provides two main administration interfaces: the global Manage Paragraphs Usage matrix and the usage page for a single paragraph type.
As projects grow, these pages can become dense and harder to scan because they may include many entity types, bundles, fields, and paragraph types.

Several display details also need to be configurable depending on the site and editorial workflow:

  • whether machine names should be displayed for paragraph types, entity types, bundles, and fields;
  • whether paragraph type labels should be displayed horizontally in the global matrix;
  • whether the global matrix should use a maximum scroll height;
  • whether groups on the single paragraph type usage page should be expanded by default.

The global matrix also needs to remain comfortable to use on large datasets, with predictable scrolling behaviour and a sticky header that does not depend on admin-theme-specific table handling.

Because the module is already published, new configuration keys must also be initialized safely for existing installations.

Steps to reproduce

  1. Install the module on a site with several paragraph types and multiple paragraph reference fields.
  2. Go to the global Manage Paragraphs Usage page.
  3. Review the matrix when many entity types, bundles, fields, and paragraph types are available.
  4. Go to the usage page for a single paragraph type.
  5. Compare how easy it is to identify entities, bundles, fields, and paragraph types when machine names and grouping options cannot be adjusted.

On larger projects, the pages can become harder to read and the display needs may differ depending on the site.

Proposed resolution

Add configurable display options for both usage pages.

  • Extend the paragraphs_usage_manager.overview configuration.
  • Extend the paragraphs_usage_manager.single_type configuration.
  • Update the configuration schema accordingly.
  • Add safe default values for new configuration keys.
  • Add an update hook to initialize missing configuration keys on existing installations.
  • Update the global overview form to respect the new display options.
  • Update the single paragraph type usage form to respect the new display options.
  • Improve the matrix scrolling behaviour with module-owned wrappers and styling.
  • Add kernel test coverage for the new display options and default configuration values.

Remaining tasks

  • Add or update the configuration files.
  • Update the configuration schema.
  • Add the database update hook for existing installations.
  • Update the overview settings form.
  • Update the single type usage settings form.
  • Update the global usage overview rendering.
  • Update the single paragraph type usage rendering.
  • Update CSS and JavaScript for the overview matrix where needed.
  • Add or update kernel tests.
  • Test on an existing installation after running database updates.

User interface changes

The module settings are extended with additional display options.

The global Manage Paragraphs Usage matrix can now be adjusted to improve readability, including display of machine names, paragraph type label orientation, and matrix scroll height.

The single paragraph type usage page can also be adjusted, including whether machine names are displayed and whether grouping details are expanded by default.

API changes

None.

Data model changes

New configuration keys are added to the module configuration.
Existing installations receive safe default values through an update hook.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nono95230 created an issue. See original summary.

nono95230’s picture

Status: Active » Needs review

A merge request has been created.

It adds configurable display options for the global usage overview and the single paragraph type usage page, including schema updates, safe defaults for existing installations, and kernel test coverage.

  • nono95230 committed d01df712 on main
    Issue #3586978: Add display configuration options
    
nono95230’s picture

Status: Needs review » Fixed

The merge request has been merged into the main branch.

This will be included in the next release.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

nono95230’s picture

Status: Fixed » Closed (fixed)

Released in 1.1.0.

This issue is now included in an official release.