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
- Install the module on a site with several paragraph types and multiple paragraph reference fields.
- Go to the global Manage Paragraphs Usage page.
- Review the matrix when many entity types, bundles, fields, and paragraph types are available.
- Go to the usage page for a single paragraph type.
- 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.overviewconfiguration. - Extend the
paragraphs_usage_manager.single_typeconfiguration. - 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.
Issue fork paragraphs_usage_manager-3586978
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
Comment #3
nono95230 commentedA 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.
Comment #5
nono95230 commentedThe merge request has been merged into the main branch.
This will be included in the next release.
Comment #7
nono95230 commentedReleased in 1.1.0.
This issue is now included in an official release.