The current workflow to create new media entity bundles is not very user friendly. When creating a new bundle the user has to create it and choose a placeholder value for the form item "Field with source information". Then he has to create a field to store the source and edit the bundle to be able to choose the field.
Define a trait that isolates the handling of field selection and the creation of a default field. Media type plugins can use the trait to get this behaviour.
- Write tests
User interface changes
When creating an entity bundle, provide a checkbox "Use default source field for this media type provider" which is checked by default. (Select box is only shown on initial creation of the bundle, deselecting the box does not reveal the dropdown, because there will be nothing to select yet).
A new trait that allows media type plugins to add source field selection and default field creation. The trait has a method that produces the field selection and the checkbox for use in the configuration form.
Data model changes