Toggle button state selector too greedy

Created on 3 October 2023, about 1 year ago
Updated 4 October 2023, about 1 year ago

Problem/Motivation

The button selector code in ToggleButtonState (introduced in #3280381: Button Disabled versus Error Message β†’ ) is too broad and affects buttons added by other modules unrelated to VBO ( such as draggableviews, which is my case ), preventing normal operation of those forms.

Steps to reproduce

Create a view display with VBO and Draggableviews.
Note that the "Save order" button is disabled.
Reorder the rows.
Note that the "Save order" button is still disabled.
Select a row and choose a VBO action.
Note that the "Save order" button is now enabled.

Proposed resolution

Narrow the selector to better target buttons provided by VBO.

Maybe it would be best to provide a specific class or data attribute on those buttons provided by VBO so they are easier to target?

Remaining tasks

The more I think about it, it would be better to be more deterministic by providing a consistent attribute for VBO buttons rather than some assortment of selectors that is probably less stable / predictable since other modules can do a bunch of stuff. CSS classes are often altered for various UI requirements, so I think a data- attribute would be less likely to introduce problems.

πŸ› Bug report
Status

Fixed

Version

4.2

Component

Core

Created by

πŸ‡ΊπŸ‡ΈUnited States scottsawyer Atlanta

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

Comments & Activities

Production build 0.71.5 2024