Disable 'Insert selected' in CKEditor Media browser in case no Remote video is selected

Created on 11 April 2024, about 1 year ago

Problem/Motivation

The UX of adding a remote video is not optimal, as there are two similar (or: similar looking) submit buttons in the form: 'Add' and 'Insert selected'.

Pressing 'Insert selected' will result in a (HTTP 500) error and a message 'No items selected'.

Steps to reproduce

  1. Under 'Add Remote video via URL', add an URL.
  2. Click 'Insert selected'

This will result in an error.

The correct flow is:

  1. Under 'Add Remote video via URL', add an URL.
  2. Click 'Add' and do some follow-up actions
  3. Click 'Insert selected'
  4. (system adds video to editor)

Proposed resolution

Make the flow the same as with e.g. Images: When the user adds a Remote video URL, the system should expect the user wanting to add the video and insert it in one go. So:

  1. Under 'Add Remote video via URL', add an URL.
  2. Click 'Insert selected' and do some follow-up actions
  3. (system adds video to editor)

And:

  1. Gray out the Insert selected button in case no media has been selected and the field 'Add remote video via URL' is empty

User interface changes

  1. Remove Add button
  2. Gray out Insert selected button if it will result in an error.
πŸ› Bug report
Status

Active

Version

10.3 ✨

Component
MediaΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡³πŸ‡±Netherlands koosvdkolk

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024