Problem/Motivation
It seems odd that buildConfigurationForm and submitConfigurationForm on EntityEmbedDisplay plugins handle the user facing form, and there is no configuration form when setting up the embed button. There's only a checkbox.
There have been a few issues where if you could add configuration to a plugin it would be useful. For example, #2864705: Entity Embed's `image` @EntityEmbedDisplay plugin has poor usability when there are many image styles on the site.
Proposed resolution
EntityEmbedDisplay plugins should have an API for being configurable when selected on the embed button form. There should be a subform available, if that particular display is configurable.
Remaining tasks
TBD
User interface changes
TBD
API changes
New configuration form and form submit for EntityEmbedDisplay plugins when adding/editing a button.
Data model changes
Some schema changes probably
Comments
Comment #2
oknateComment #3
wim leersThis could perhaps also allow choosing whether you want the default entity selection experience, the Entity Browser one, the Media Library one (#2998005: [PP-1] Support Drupal core's Media Library) or an even different one.