Support from Acquia helps fund testing for Drupal Acquia logo

Comments

josebc created an issue. See original summary.

josebc’s picture

Assigned: josebc » Unassigned
Status: Active » Needs review
FileSize
5.29 KB
Mohammed J. Razem’s picture

Title: Contextual links not working on views » Make "Contextual links" work for views using Entityqueue
Rajab Natshah’s picture

+1 Testing :)

Rajab Natshah’s picture

Status: Needs review » Reviewed & tested by the community
josebc’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
6.18 KB

Added "Settings Tray" support if enabled

Rajab Natshah’s picture

+1 Having more testing.

amateescu’s picture

Nice! The patch does make the contextual link appear for views, but the outside-in part doesn't seem to work.. should we remove it from the patch?

josebc’s picture

We have it working using this patch, what theme are you using?

amateescu’s picture

I'm testing on a default D8 install, so using the bartik theme.

josebc’s picture

Thats odd, i just tested on with both 8.2 and 8.3, are there any js errors in console?

Rajab Natshah’s picture

I'm in with more testing ...... and automating the test.
I feel that the logic in the code is right,

Scenario: Check if content admins are able to see and click the contextual link to manage entitiyqueues which are attached to views when the Settings Tray outside-in module is not installed
Given that the "Settings Tray" module is not installed
When I go to a page which has a view display in it
And the view display is using an entity queue to sort entities
Then I will be able to see the "entityqueue" contextual link
When I click the "entityqueue" contextual link
And wait for the page to finish loading
Then I should see the list of queued entities
And I can add/reorder and remove entities.

Scenario: Check if content admins are able to see and click the contextual link to manage entityqueues which are attached to views when the Settings Tray outside-in module is installed
Given that the "Settings Tray" module is installed
When I go to a page which has a view display in it
And the view display is using an entity queue to sort entities
Then I will be able to see the "entityqueue" contextual link
When I click the "entityqueue" contextual link
And wait for AJAX to finish
Then I should see the list of queued entities in the "offcanvas" data dialog
And I can add/reorder/reverse and remove entities.

  • amateescu committed b742b40 on 8.x-1.x authored by josebc
    Issue #2825773 by josebc, RajabNatshah, amateescu: Make "Contextual...
amateescu’s picture

Status: Needs review » Fixed
FileSize
5.42 KB
2.18 KB

Spent some more time digging into this and I found out that the reason why I wasn't getting the right behavior with the settings tray is because contextual links are cached in the browser's session storage, and that's not cleared by the regular Drupal cache clearing mechanism.

Anyway, it does work nicely indeed, great work! I cleaned up the patch a little (see attached interdiff) and committed to 8.x-1.x. Thanks!

Rajab Natshah’s picture

A preview of Drupal 8 "Outside-In" with Entity Queues.
This is done utilizing Sportsleague distribution and Entityqueue module with the Contextual Links patch.

https://www.youtube.com/watch?v=vr-AqQmLoGs

Status: Fixed » Closed (fixed)

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

SvenVdv’s picture

I get the "edit subqueue" option in the menu, but it doesn't open in a settings tray, it opens in a new page. I think it has to do with the fact that the module is now called Settings Tray (instead of Outside-in)?

amateescu’s picture

Status: Closed (fixed) » Needs review
FileSize
431 bytes

That's a very good point. Can you try this patch?

SvenVdv’s picture

Does the "data-ouside-in-edit" also have to be "data-settings-tray-edit" etc. ?

amateescu’s picture

FileSize
1.03 KB

Indeed, and there's another instance that we need to update as well at the top of the function.

SvenVdv’s picture

I had this one (off_canvas), but it still doesn't work.

SvenVdv’s picture

FileSize
963 bytes

Sorry, wrong file :)

SvenVdv’s picture

FileSize
960 bytes

I see I forgot to remove the "in" -_- Still doesn't work though.

SvenVdv’s picture

It seems that the display for the entityqueue subqueue items field template has to be set to "default" instead of "minimal" ^^ It works now.

  • amateescu committed 664e31b on 8.x-1.x authored by SvenVdv
    Issue #2825773 followup by amateescu, SvenVdv: The outside_in module has...
amateescu’s picture

Status: Needs review » Fixed

Nice, committed and pushed the followup patch to 8.x-1.x.

SvenVdv’s picture

Rajab Natshah’s picture

Thank you SvenVdv, Andrei I will use the patch until we have a new release for the entityqueue module.

Your work saves time.

Thanks for having this issue fixed after the Drupal core team had outside_in renamed to settings_tray in Drupal ^8.4.0 the folder and code!!

Having more testing ....

Status: Fixed » Closed (fixed)

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

jwilson3’s picture

I have a view configured with a block display and a required entity queue relationship. I have settings tray module enabled. However I neither see the contextual links on the block wrapper, nor in the view wrapper. If I enter into the edit mode and edit the block. there are no options in the sidebar to edit the items in the entity queue.

What am I doing wrong here?

amateescu’s picture

@jwilson3, it seems that we only show the contextual links when the view uses the entityqueue sort handler, but I don't see any good reason for that limitation so I wrote a patch for it here: #2957971: Show the 'Edit subqueue' contextual link even when the view does not use the entityqueue sort handler.

Can you test it and let me know if it works for you?