Problem/Motivation

Currently the embed form is a two-step form which poses various problems:

  • Issue with Back and Next
  • Not a very intuitive UX
  • Disconnected with 'Insert Image' dialog
  • Lots of hacky code to handle two steps of form

Proposed resolution

The idea is to convert it to single insert dialog similar to the one used to insert images. The workflow will be something like this:

  • The entity ID/UUID textbox at the the top. when user 'inserts' an entity, the textbox changes to a link to the entity like Core's 'managed file' element.
  • All other options, like display plugins etc. which were initially empty are now populated with the options for the selected entity using AJAX framework.
  • User can 'Remove' the entity and all these options again go back to empty.

This approach will make the UI/UX better and also bring the embed dialog more in line with the Core's Image dialog. This will also get rid of the ugly errors that are brought by Back/Next buttons.

Remaining tasks

  • Agree on a solution.
  • Fix it.
  • Test it.

Comments

dave reid’s picture

How does this work when we want other modules to alter the step one part of this form? I'm not sure we know this will work with Entity Browser easily.

cs_shadow’s picture

Status: Active » Postponed

@Dave Reid, Yeah later realized that while discussing it with @slashrsm on IRC. I guess we can leave this as postponed until we figure out a way to integrate entity browser with it in a single step.

wim leers’s picture

Title: Convert embed form to a single step form » [PP-1] Convert embed dialog to a single step form
Issue tags: +Usability
Related issues: +#2998005: [PP-1] Support Drupal core's Media Library, +#2577887: Entity Embed 8.x-1.0.0 release

If we could integrate with core's new Media Library, then we wouldn't even need to depend on Entity Browser… See #2998005: [PP-1] Support Drupal core's Media Library.

This should probably wait until after 1.0; we shouldn't hold off any longer with a stable release in favor of "just" better usability.

Postponing on #2577887: Entity Embed 8.x-1.0.0 release.

wim leers’s picture

If we could integrate with core's new Media Library, then we wouldn't even need to depend on Entity Browser…

This is wrong, because Entity Embed works with more entity types than just Media!