Make providing customized CEs easy

Created on 22 July 2024, about 2 months ago
Updated 20 August 2024, 18 days ago

Motivation

When configuring view-modes via CE-UI, we want customized component names output by default as suggested by 📌 Consistently prefix components with drupal- Active . Still, we want a working output by default and an easy way to customize it: Copy existing component and rename it.

Proposed resolution

Adopt the [...] vue component lookup logic of nuxt page router, so [...] may be used for a fallback mechanism when implement custom elements via vue-components in nuxt.

Thus, nuxt can ship with a a node-[...].vue component which acts as defautl for all node-* components.

This is something we can work into our renderCustomElements() nuxt function in nuxt-drupal-ce by default and follows the known pattern of the nuxt page router where [...] acts as a fallback. It should take the full component name, and if no match is found, remove "-[a-z]+" suffixes until one is found. This gives the flexibility to have one component for all view modes or not.

Remaining tasks

* Make ticket in nuxt-drupal-ce and implement
* adopt best-practice output in names which works well with this logic

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇦🇹Austria fago Vienna

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

Comments & Activities

Production build 0.71.5 2024