Is it possible to make Modal fieldable?

Created on 15 September 2021, over 3 years ago
Updated 2 January 2024, 12 months ago

Hi maintainers,

First of all, great module! Thanks for this awesome contribution to the community.

Is it possible to turn the entity fieldable? This would turn the Modal much more flexible since the user would add as many fields as they want to the modal.

In my use case, I want to add a Media field where the user can select an image or video.

✨ Feature request
Status

Active

Version

5.0

Component

Code

Created by

πŸ‡§πŸ‡·Brazil carolpettirossi Campinas - SP

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    Probably not since modals are config entities, not content entities. Config entities are not field-able.

  • πŸ‡§πŸ‡·Brazil larruda

    @Alice Andrade anything to share?

    @renatog my fellow, any reason for being config entities?

    this feature makes so much sense

  • πŸ‡§πŸ‡·Brazil renatog Campinas

    @larruda huge pleasure talking to you, master! πŸ‘‘

    any reason for being config entities?

    To use configuration management

    Explanation

    1. Version 8.x-2.19 β†’ is using Content Entity ( ref )
    2. Migrated to Config Entity on 4.x at #3142963: [PLAN] Change Modal Entity from Content Entity to Config Entity β†’
    3. Motivation was to export Modals with drush cex like webform
    4. Was evaluated pros / cons of Content Entity x Config Entity
    5. At the time we didn't find a "hard-reason" to use Content Entity
    6. On the other hand, exporting feature was something interesting

    For this reasons the migration but I'm open to consider using Content Entity if we have a good justification

    About making Modal fieldable; I truly agree that would be an important milestone for the project's growth

  • πŸ‡§πŸ‡·Brazil larruda

    Hey bro! good talking to you too :)

    Thanks for the explanation, the reasons behind that decision seem valid, in particular the ability to export modals as configuration entities.

    I've been experimenting https://www.drupal.org/project/single_content_sync β†’ module which - you probably know - mimics that same behavior for content entities, and it's working good so far. Maybe that's a drop-in replacement for that in case we decide to invest in this change.

    Also it's good to know this has already been done in 8.x-2.19, it's not a wish anymore but a reality then!
    Does that mean from a very simplistic standpoint the next step would be to port that do D10 now?

    Wish you the best!!!

Production build 0.71.5 2024