- Issue created by @kingdutch
- Status changed to Needs review
over 1 year ago 12:11pm 28 June 2023
This is a plan for 12.0.0
Currently our content tagging uses a combination of settings, hooks and alter hooks. This makes managing and extending the module difficult. The current settings are also dynamic based on a hook implementation which makes it impossible to define a schema for the config.
The current set-up also requires modules implement entity base field alter hooks and carefully manage the fields for their entities if they want tagging on custom entities.
We remove the custom configuration and instead use the Field API to add a field_social_tagging
field. This can be added through normal (optional) configuration files.
The settings screen is adjusted to work with entity view and form displays and switch out the widgets based on how the module is configured (e.g. allowing tag split vs only allowing a single category).
We create both a form widget and a display widget that supports the split configuration. We can fall back to the select2 form widget or the normal tag display widget for the non-split configuration.
The existing blocks that do a lot of custom rendering magic are replaced with blocks that render a new "tagging" display mode which contains only the tagging field. This block type can be placed in social_core
and can be re-used for other places where we want to display a single field.
We add the https://www.drupal.org/project/entity_route_context → dependency to allow us to create a single block instance for multiple entities with the view mode, this makes ensures we don't need a "profile tags", "group tags", "node tags" block, but can simply have a "tags" block.
Needs review
11.8
Code (back-end)