Support all entity types

Created on 4 April 2024, 3 months ago
Updated 21 June 2024, 5 days ago

Problem/Motivation

It'd be nice to have this support all content entity types.

I think it'd be possible, but you may not be able to tack on some types of configuration reliably in the same way as Node types. So you'd need to invent your own thing.

I envision a `+Add` featuring all bundles, with the option to narrow the bundles individually or by entity type. This way we can have a singular add button in the toolbar. It'd look right at home in the Gin side toolbar.

Proposed resolution

Discuss

Remaining tasks

  • Discuss, viability and scope
  • implementation
  • tests

User interface changes

Many

API changes

Id expect these would all be internal

Data model changes

New configuration + schema

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia

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

Comments & Activities

  • Issue created by @dpi
  • πŸ‡ͺπŸ‡ΈSpain marcoscano Barcelona, Spain

    Thanks for proposing this!

    Are there many non-node content entities out there that are also created in a "standalone" workflow? (as opposed to an "inline" creation workflow, in the context of other content content edit form). I might not have come across this a lot in the past, so my first reaction is that this wouldn't be too common, in which case I'd rather this to either be a separate project, or sub-module, if possible.

  • πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia

    @marcoscano are you asking if there are other content entities that live standalone, just like a node?

    I've worked on many projects, and can say there are many many instances of this.

    If you'd accept the idea, I'll see if I can find some project time for it.

  • πŸ‡ͺπŸ‡ΈSpain marcoscano Barcelona, Spain

    That's fine πŸ‘

    My question was probably because from memory, the only projects where I recall non-node entities having their own standalone page were commerce projects. Most scenarios of other custom entities I remember were components of the page, in which case a type-tray-style "Add..." page wouldn't make too much sense (because components are normally more easily created inline, in the context of their parent page). That said, maybe this is a fair request just to support commerce sites, if nothing else... :)

    Also, as long as the new entity type implements ThirdPartySettingsInterface, it should be possible to abstract our controller and other relevant code to be agnostic of the type of the entity we should affect. So it would be fine to refactor the existing implementation to be generic, if we can do that without too much work πŸ‘

    I could see a new global setting with checkboxes along the lines of "Entity Types to apply Type Tray", with only "Node" selected by default, where admins could opt in other entity types, does that align with what you had in mind?

    Thanks again!

  • πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia

    If an entity type has all the right features enabled (interfaces, annotation, routeing etc) I think we can just enable it automatically.

    For instance, Scheduled Transitions β†’ is a project I manage which automatically, and only, allows features for entity types if it has the right features. E.g all the interfaces and things required for Workflows and Content Moderation

    But it would make sense to have some kind of switch regardless, either for a entity type or bundle.

    I think this can be fleshed out as this is developed, however.

    My target would be getting the Entity Test entities work.

Production build 0.69.0 2024