Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291721

Change 'field_block' block plugins to use "[entity_type] - fields" category to avoid confusion with other blocks

$
0
0

Problem/Motivation

While working on #2977587: Improve block listing in Layout Builder by hiding/moving uncommon block plugins and trying to split entity field blocks provided by the Layout Builder module into common fields and uncommon ones I realized that not all blocks under "User" category are going to be fields. Core's "Who's new" list actually is set to the category "User". so it would be intermingled with "User" field blocks.

this will probably true for other views too or other custom blocks that will be a category of an entity type label.
For instance for node fields the category is "Content" and for Media it will be "Media". It is easy to image that when making BlockViews which allow you set the "Block category" that "Media" and "Content" are probably words that are used a lot for this on existing sites.

So this would mean you would have these existing Views showing up in the same category has the new field blocks. Given the names of these Views could be anything thing this could get very confusing.

For instance for "Image" field provided by core there might be a view block that displays these images where the view label is "Images". If the site builder choose the "Content" block category for this View that then you would have 2 links under "Content" category, "Image"(for the field) and "Images"(for the view).

Even more confusing if this were multiple value field added by the user labeled "Images".

Proposed resolution

The field blocks provided by Layout Builder should use a category that clearly separates them from View blocks, the only core case where the user can choose an arbitrary category and other custom blocks that might choose the entity label as a category.

Suggested "[entity_type] - fields".

Remaining tasks

Discuss & patch

User interface changes

Field blocks would most likely be in there own category

API changes

Data model changes


Viewing all articles
Browse latest Browse all 291721

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>