Actions reordering on views bulk forms

Created on 24 November 2014, over 9 years ago
Updated 23 February 2024, 8 days ago

Problem/Motivation

(original report motivation)

The default action on /admin/content is "Delete selected content". It's really easy to push "Apply" button by mistake, thinking it will apply the filter, because of the button title, and because it's positioned at the bottom of the form, typically where people expect to look for submit buttons. (This actually happened to me today, and I've been using Drupal for 8 years)



Steps to reproduce

See screenshots.

Proposed resolution

MR to review !4583

Proposal:

  • Store the order of the actions in the Views Bulk Form handler configuration (actually, the View config entity)
  • Provide an upgrade path to set the order config in each Bulk Form field but preserve BC. On existing sites the order should be preserved even the "dangerous" actions are on top. Then site builders might decide to manually change that.
  • For new sites provide a default order that is safe. Specifically, the "Delete" action should be the last in the list avoiding incidents.

A little history>

Initially, adding a weight to action config entities has been tried. However, as is mentioned in #152 โœจ Actions reordering on views bulk forms RTBC , this is not the correct approach as an action (read a config entity) may appear on several views and the site builder may need different sort orders on each view. Read the #152 โœจ Actions reordering on views bulk forms RTBC comment for more background.

Remaining tasks

None.

User interface changes

Bulk Form admin form

Before:

The checkboxes let you select which actions will be available, but you cannot control the order.

After:

The form element used to select the actions is converted from checkboxes to draggable table. The table allows both, actions selection and action reordering.

Views with Bulk Form

The actions are reordered for new sites on /admin/content, /admin/content/comment, /admin/content/comment/approval, /admin/content/media with the "Delete" action as last option.

Before:

After:

API changes

None.

Data model changes

New actions_order option for Bulk Form handler.

Release notes snippet

Use drag and drop in Views bulk form field configuration form to define order which will be used to expose the actions in the bulk forms.

โœจ Feature request
Status

RTBC

Version

11.0 ๐Ÿ”ฅ

Component
Viewsย  โ†’

Last updated about 2 hours ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States grendzy

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

Merge Requests

Comments & Activities

Not all content is available!

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

Production build https://api.contrib.social 0.61.6-2-g546bc20