Problem/Motivation

While working on a system for a client, we introduced views bulk operations into the table. This made it difficult at times to check the checkbox on each row without triggering the expansion/collapsing. This patch introduces a table settings (style options) checkbox to disable (enabled by default) the clickable row, and instead appends a span to the end of the last visible column to expand/collapse the table.

Steps to reproduce

This issue is most identifiable with views bulk operations, so install this module with views bulk operations and get a view setup with some content to use both. The checkboxes for VBO can be difficult to target/click without triggering the table row expansion.

Proposed resolution

Add in a 'settings' configuration option to use a triggering element (instead of the default triggering row) to trigger the expand/collapse.

When not using the entire table row, append a new span to the end of the last visible column and attach the trigger class to it for clicking.

User interface changes

There is now an additional 'table settings' option when using the views expandable table views style that is checked by default. The default setting is to use the table row as the trigger.

CommentFileSizeAuthor
#2 views_expandable_table_configuration.png69.25 KBjfurnas
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jfurnas created an issue. See original summary.

jfurnas’s picture

StatusFileSize
new69.25 KB

jfurnas’s picture

Issue tags: +Needs review
jfurnas’s picture

Status: Active » Needs review
jfurnas’s picture

Issue tags: -Needs review
jfurnas’s picture

christian le fournis’s picture

Looks like a great addition to the module, can we merge to Dev?

kerasai’s picture

Hi there,

I've done a cursory review, and this seems mostly fine.

The one thing I've noticed, is that you've added the LICENSE.txt and changes to the module's .info.yml file. These are added to the Composer package/download automatically by Drupal's package handling system and shouldn't be included in the module's repo.

Otherwise, it's probably good to merge.

Thanks!

kerasai’s picture

Status: Needs review » Needs work

  • jfurnas committed 924eabb9 on 1.0.x
    Issue #3274298: Make the trigger type a configurable option
    
jfurnas’s picture

All set. The licensing and *.info.yml information has been removed.

jfurnas’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.