Finish documentation re. v3 update

Created on 25 April 2024, about 2 months ago
Updated 23 May 2024, 24 days ago

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

These tasks can be rolled into one issue:

Remaining tasks

  • Finish documentation (re. upgrade path)
  • Document the new formatters

Re. the formatters: noone will know what "Auto", "Raw" and "Flattened" are. This should be either put in the readme or - maybe also - in some help in the admin UI. (I am behind on the state of 'help-like modules' these days.)

Outdated remarks

(Kept only for possibly remembering some details, while writing 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...
πŸ“Œ Task
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.69.0 2024