Problem/Motivation

Drag and drop icon is being hidden, leaving users unable to perform the drag & drop operation.

Steps to reproduce

On Drupal 10.3.2, configure any entity reference field to use the BERT widget. Add multiple content references and notice how you can't reorder the list.

Proposed resolution

Don't explicitly hide the first cell unless configured to do so.

CommentFileSizeAuthor
Screenshot 2024-09-23 at 4.23.59 PM.png321.63 KBhalth

Issue fork bert-3476266

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:

  • 2.x Comparechanges, plain diff MR !10

Comments

halth created an issue. See original summary.

halth’s picture

Assigned: Unassigned » halth

Okay. I'm seeing it's a conflict with the Gin admin theme... 🫠

Gin wraps the main table with a .gin-table-scroll-wrapper element, breaking the following CSS selector:

.field--widget-bert .tabledrag-toggle-weight-wrapper ~ table thead th:first-of-type,
.field--widget-bert .tabledrag-toggle-weight-wrapper ~ table tbody td:first-of-type {
  display: table-cell;
}

In case the maintainer feels like it's worth supporting Gin (for it's a widely adopted admin theme), I've submitted a PR with the updated selector.

halth’s picture

vensires’s picture

Version: 2.0.2 » 2.x-dev
Assigned: halth » Unassigned
Status: Active » Reviewed & tested by the community

I set this as RTBC since it really fixes the mentioned issue.

robin.houtevelts made their first commit to this issue’s fork.

robin.houtevelts’s picture

Status: Reviewed & tested by the community » Fixed

Thanks. Merged the MR and credited you both.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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