Update path and documentation

Created on 25 April 2024, 8 months ago

Followup to 📌 CustomElementFormatter plugin type for entity_ce_display Active / https://git.drupalcode.org/project/custom_elements/-/merge_requests/40/d...

Requirement for alpha release.

These tasks can be rolled into one issue:

Remaining tasks

  • Decide on default tag name for the display config
  • Finish update path
  • Finish documentation (re. upgrade path)
  • Other quick followups on comments in the linked MR. There are some valid comments which I will need to address -- but they can wait until the same time as finishing docs.

Re. the tag name: I'll comment later, if noone does it before me. I have no strong opinions but could write down some reasoning (and this feels like we should have some rationale, if we change the default...)

Re. the update path:

In the linked MR, my mind was stuck on "avoiding site breakage on upgrades is paramount". Which implies: do not create default CE displays for any entities/bundles.

From feedback, I understand that this is not actually true. So I'm now thinking that our priorities are:

  • more understandable / intuitive default config (including for sites updated from v2)
  • if sites break, they must have the ability to revert to v2 behavior, and that must be documented clearly.

The reason, I guess, is

  • We don't know for sure, which entities + bundles + view modes are being used for custom elements output. (Because the "Use CE display" setting does not definitively tell us what is not being used; in principle any bundle + view mode could be.)
  • but it's probably few, in relation to all entities/view modes in the site
  • so it's just overkill (and long term more potentially confusing) to not create display configs for any entities/view modes.

OK. So let's create them. Remaining tasks for this:

  • Reinstate the update hook that creates the displays default view modes
  • but change the code to enable all fields that are also enabled in the 'non-CE' default. (This should be easy.) This should take care of the vast majority of potential breakage.
  • Maybe also loop through the non-default existing display modes, and for any that have "Use CE display" enabled, also create the equivalent (non-default) CE display with the same fields enabled? At first thought, that seems little extra work...
🐛 Bug report
Status

Active

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

Comments & Activities

Production build 0.71.5 2024