Hello,

Thank you very much for the module.

I think it will be very nice to be able to restrict the entity queue per bundles.

I will upload a patch that made that.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Grimreaper created an issue. See original summary.

Grimreaper’s picture

Assigned: Grimreaper » Unassigned
Status: Active » Needs review
FileSize
6.96 KB

Here is the patch.

I think it will be nice to have the target bundles loaded with ajax (As on the config form of a search API index).

Grimreaper’s picture

Here is a patch with the ajax handling.

Thanks for the review.

amateescu’s picture

Title: Bundle restriction » Add ability to configure the selection settings for the 'items' reference field
Component: User interface » Code
Category: Feature request » Task
Priority: Normal » Major
FileSize
12.15 KB

We shouldn't limit ourselves to only support the 'target_bundles' setting of the 'default' entity reference selection handler, we can fully expose the configuration of the 'items' entity reference field.

Here's a patch for that, for which I'd like to get some feedback on the user experience of the new configuration options before committing :)

Jacine’s picture

FileSize
125.19 KB

Thank you for this patch!

I tested it this morning, and I'm having some issues with it, that may be user error. For some reason I'm not able to uninstall this module (which I was hoping to do, to make sure my findings were not a result of having both versions of these patches installed at some point).

First, some UX feedback. I was going to give you a patch for this, but I broke the AJAX handling and probably other stuff, so giving you a screenshot instead:

Screenshot of entityqueue add screen

Summary of those changes:

  1. Changed "Label" to "Name" and added a description to be more consistent with other core UI's.
  2. Changed "Handler" to "Type". Site builders probably don't know what a handler is. I would have added a description but I don't get the whole subqueue concept TBH.
  3. Moved the "Type of items to queue" select above the reference settings. It makes more sense to be since these are directly tied to each other.
  4. Changed the "Selection settings" vertical tab group title to "Entity settings".
  5. Changed the "Queue properties" vertical tab group title to "Queue settings".

Here are some of the questions/issues I found while testing:

  1. If I choose "Content" as item type and attempt to restrict to one or more "Content types" the form pretends to save, but those selections are not saved, so it's not working properly for me ATM. I will try again with a fresh install to make sure it's not my error.
  2. I don't think that "Content types" or "Bundles" should be a required field, as not selecting any will result in all being available to add. As I wrote the last sentence, I realize there should probably be a description of this field indicating that behavior. And maybe instead of just "Content types" the label should read something along the lines of "Restrict items by %entity_type_label or whatever generates the current label text.
  3. This is probably not the fault of this module, but what is the point of having the configuration options show up in the list? What can be done with those in this context? If they can't actually be used, restricting the list to only show "content" and not "configuration" would be a better UX.

I hope that's helpful. Thanks again for your work on this! It's much appreciated.

amateescu’s picture

FileSize
18.92 KB
17.7 KB

Thanks for the awesome review and suggestions! :)

Here's an updated patch that implements all the changes from 1 to 5.

About questions/issues:

  1. That didn't happen locally and doesn't happen with the new patch either, so it must have been a problem with your specific installation.
  2. I agree. We only made it required because the entity reference field needed it that way, but for Entityqueue we can drop that requirement. Done!
  3. I also agree with this one, queuing configuration entities doesn't make too much sense and I should have implemented this restriction from the start. However, since there are D8 sites that are actively using Entityqueue.. it wouldn't be very nice of us to change this from under their feet :/
amateescu’s picture

Title: Add ability to configure the selection settings for the 'items' reference field » Add ability to configure the selection settings for the 'items' reference field and improve the UX of the queue edit form

Updating the title once again to reflect what's going on in the latest patch.

Grimreaper’s picture

Hello,

Thanks for the patches that go deeper than mine into the reference field parameters.

I will test its this weekend.

Jacine’s picture

This is working perfectly, and it looks great too! Thanks again!

  • amateescu committed 75a37e5 on 8.x-1.x
    Issue #2668220 by amateescu, Jacine, Grimreaper: Add ability to...
amateescu’s picture

Status: Needs review » Fixed

Given that the patch was already thoroughly tested by @Jacine and myself, I'm gonna go ahead and commit it.

Thanks everyone!

Grimreaper’s picture

Thanks, it works perfectly.

amateescu’s picture

Note that this patch caused two big problems in alpha3, so I also released alpha4 a few minutes ago to correct them.

Grimreaper’s picture

#2676746: Update to Alpha3 causes fatal error and site won't load

Ok, I got the same problem when I tested the patch but as I had rebuilded my site (then applying the commit) to not have the data from my patches and then I didn't reproduce the bug I didn't mention it.

Status: Fixed » Closed (fixed)

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