Improve custom-element default names for entiteis

Created on 22 May 2024, 6 months ago
Updated 3 September 2024, 3 months ago

Problem/Motivation

Steps to reproduce

Have CE display for user, with customElementName "user" (e.g. loaded from config)

Render a user with it

Get <drupal-user .....>

Proposed resolution

customElementNames should be usable as configured. Apply new naming pattern:

* For rendering content entities, we do not add a drupal- prefix. We apply the following pattern: `{ENTITY_TYPE}-{BUNDLE}-{VIEW_MODE}` or when the entity does not use bundles `{ENTITY_TYPE}-{VIEW_MODE}`. The view-mode suffix should be optional.
* Also, for the default view-mode we do not append the "-default" suffix, since e.g. "node-article[...].vue" clearly is already default, there is no "node-article-default" element needed.

Remaining tasks

Ignore the tag-prefix which is added by the 'settings defaults', somehow.

Maybe (or maybe not) not for new ce_display objects -- certainly for existing/loaded ones.

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024