Problem/Motivation

The paragraphs_library sub-module ships two default Views with a table column configured to right-align via the literal string views-align-right:

  • modules/paragraphs_library/config/install/views.view.paragraphs_library.yml (the "Used" column, admin/content/paragraphs)
  • modules/paragraphs_library/config/optional/views.view.paragraphs_library_browser.yml (the same "Used" column in the library browser)

Drupal core's Views Table style plugin still exposes views-align-left / views-align-center / views-align-right as the "Alignment" select options in the UI (\Drupal\views\Plugin\views\style\Table::buildOptionsForm()), but as of Drupal 11.4 there is no CSS anywhere in core that styles these classes anymore — the .views-align-* rules were removed and replaced by the generic "system" alignment classes shipped in core/modules/system/css/components/align.module.css (.text-align-left, .text-align-right, .text-align-center, .text-align-justify), which are loaded globally via the system/base library.

As a result, on any site running Drupal core 11.4+ with paragraphs_library enabled, the "Used" column silently loses its right-alignment styling — the config value is preserved but has no visual effect, since views-align-right no longer maps to any stylesheet rule.

Steps to reproduce

  1. Install a site on Drupal core ^11.4 with the Paragraphs module.
  2. Enable the paragraphs_library sub-module.
  3. Visit /admin/content/paragraphs (or the Paragraphs library browser).
  4. Inspect the "Used" column in the table.
  5. Expected (and actual behavior on Drupal <11.4): column content is right-aligned via the core-provided .views-align-right { text-align: right; } rule.
  6. Actual behavior on Drupal 11.4+: the column renders with default/left alignment — the views-align-right class is still present in markup but no longer styled by anything in core.

Proposed resolution

Update the "align" value for the "Used"/count column in both shipped view configs from the removed views-align-right to the current system alignment class text-align-right, so the column keeps its intended right alignment on Drupal 11.4+ while remaining a harmless, unvalidated string value on older supported core versions (the "align" config key is stored and emitted verbatim as a CSS class name; it isn't restricted to the UI select's listed options).

A patch implementing this one-line change per file is attached.

Remaining tasks

  • Maintainer review/feedback on whether adopting text-align-right now (ahead of core's own Views Table plugin updating its "Alignment" select options) is acceptable, or whether this should wait on a corresponding Drupal core Views issue.
  • Confirm there are no functional/UI tests asserting the old views-align-right class in rendered markup for these two views.
  • Patch review and RTBC.

User interface changes

The "Used" column in the "Paragraphs library" admin listing and the "Paragraphs library browser" view will render right-aligned again on Drupal 11.4+, restoring pre-11.4 visual behavior. No other UI changes.

API changes

None. Only a configuration value changes in two default/optional view config files; no PHP API, hook, plugin, or service signature changes.

Data model changes

None. No config schema changes and no new configuration keys — only the existing align string value is updated within the existing views.view.paragraphs_library and views.view.paragraphs_library_browser config entities.

CommentFileSizeAuthor
#2 paragraphs-views-align-3623306-2.patch1.68 KBbala_28

Comments

bala_28 created an issue. See original summary.

bala_28’s picture

StatusFileSize
new1.68 KB

Patch added for this issue