Hi,

At first, thanks for your work on this nice module.
I have a small issue : i create a simple view, it lists some taxonomy term and i add on last position a "Draggable Views" field.
I can change taxonomy weight, and i can use drag & drop. But on the screenshot we can see an "invisible" column. And when i click on the "Show weight values", the drag and drop tool is hidden, but weights are not displayed.

Regards,

Hervé

Comments

herve created an issue. See original summary.

gordon’s picture

This is sort of fixed in 1.x-dev, it no longer skips a blank column, but it also doesn't show the weight input fields.

gordon’s picture

This issue is not broken anymore. However I do feel it is not really nice since the table drag is using match instead of order so it has a nice fallback for non javascript use, or even being able to edit the order when you have a very large list of items.

afem’s picture

@gordon Do you mean that you are seeing the row weight fields and those fields work correctly when you click the "Show row weights"? I do not see the fields when I click the link. All I see is that the draggable icons disappear.

Without the row weight fields working correctly, this is an accessibility problem.

gordon’s picture

Yes so when you click show row weight to turn off the drag and drop you should really see the actual weight fields, but you do not.

istryker’s picture

I have noticed this. It is a bug or a bug of a bigger problem.

mpp’s picture

Priority: Normal » Major
Issue tags: +Accessibility

I'd flag this as mayor as it is a mayor accessibility issue.

mpp’s picture

StatusFileSize
new37.4 KB
new40.3 KB
nord102’s picture

I have created a patch which includes the following:

  1. Adds a weight textfield which is displayed when "Show row weights" is clicked.
  2. Modifies the submit by using the value of the weight textfield from the draggableviews item as the weight
  3. Adds JS functionality to update the weight textfield value when dragging
nord102’s picture

Status: Active » Needs review
jojonaloha’s picture

Re-rolled #9 against latest dev.

el1_1el’s picture

My logs started filling up with Notice: Undefined property: Drupal\views\ResultRow::$draggableviews_structure_weight in Drupal\draggableviews\Plugin\views\field\DraggableViewsField->viewsForm() (line 142... after applying the patch in 11

ryanhayes’s picture

Tested the patch from #9 and it works, however it springs an error. I've created a patch on top of this which seems to fix the error. The code was assuming 'group' was set as it was only checking for 'table'. I've added 'group' to the check and the code seems to work now.

Notice: Undefined index: group in draggableviews_views_data_alter() (line 45 of /docroot/modules/contrib/draggableviews/draggableviews.module)

ryanhayes’s picture

Found an issue with the patch i created. When changing the weight of the items in the list it would duplicate them. Adding separate checks for 'group' and 'table' fixed this.

nord102’s picture

Re-rolled #9 with the latest version and with the added isset check for the 'group' from #14

nord102’s picture

Version: 8.x-1.0 » 8.x-1.2
kaszarobert’s picture

Issue tags: -Accessibility +accessibility

Patch #15 works for me if I add "Draggableviews: DraggableViews Weight" into fields in the view. Otherwise it shows a lot of Notice: Undefined property: Drupal\views\ResultRow::$draggableviews_structure_weight in Drupal\draggableviews\Plugin\views\field\DraggableViewsField->viewsForm() (line 124 of /var/www/html/rogertechnology.localhost/modules/contrib/draggableviews/src/Plugin/views/field/DraggableViewsField.php) error messages.

mgifford’s picture

Issue tags: -accessibility (duplicate tag) +Accessibility

Fixing tagging.

mqanneh’s picture

Status: Needs review » Needs work

The last patch in #15 failed to apply to the latest dev version.

mqanneh’s picture

Status: Needs work » Needs review
StatusFileSize
new5.06 KB

Rerolled the patch in #15 against the latest dev version.

mqanneh’s picture

StatusFileSize
new4.69 KB

Updated the last patch file.

chris matthews’s picture

FYI, there are no automated tests available for 8.x-1.x-dev. See: https://www.drupal.org/node/283087/qa

  • iStryker committed be3740b on 8.x-1.x authored by mqanneh
    Issue #2929116 by nord102, mqanneh, ryanhayes, el1_1el, jojonaloha, mpp...
istryker’s picture

Status: Needs review » Fixed

Committed. Tested added

Status: Fixed » Closed (fixed)

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

morrisem’s picture

Not sure it's OK to post on a closed item. I have the same problem as is reported (can't get a weight field to show up when I click "Show row weights" in a draggable view in D8). The comments make it sound like it's been fixed. I've made sure I have the latest build, but I still get nothing. Wondering if there's a secret to the setup I'm missing.

michelle’s picture

@morrisem this was committed after 1.2 was release. It's working for me with the latest dev snapshot. The textboxes are added on the far right instead of in place of the drag handles so it's not super obvious but they are there.