- πΊπΈUnited States pingevt
Looks like this might need a new patch against the development branch...
- First commit to issue fork.
- π¬π§United Kingdom scott_euser
Thanks for bumping. To get this up to date would need to convert to merge request against latest dev + add test coverage. Thanks!
- πΊπΈUnited States trackleft2 Tucson, AZ πΊπΈ
In the merge request I've implemented the changes from the patch in #9 on a new branch created from the 8.x-2.x branch.
In addition to implementing the patch, I've added the following improvements:
- Added a mechanism for presenting the views tags to the user configuring the field instead of having them enter a CSV.
- Added config schema, the data is stored as an unvalidateable sequence :puke: which is different from core views which stores these tags as an unvalidateable string (aside from primitive type checking obviously).
- Added a PHPUnit test
- Added a update function for updating the config schema.
- π¬π§United Kingdom scott_euser
Thanks for all the work on this! I tested it out and have a couple bits of feedback:
- When I attempted with the default form display (autocomplete) it does not change anything. Looking further this actually seems like the Views Reference field type as a whole is ignored for Autocomplete, but I think we need to consider that as a follow-up (ie, "Preselect View Options" is already ignored there) as it can have wider implications for sites where the 'Preselect View Options' has already been ignored in autocomplete.
- I found the UX a bit confusing, as the 'Limit by Views tag(s)' is not actually limiting. I tagged Recent Content and Recent Comments core blocks with 'recent' then created a third View with Block display 'Other view' without tagging it. I ticked 'Other view' in 'Preselect View Options' then went to create a node with a Views Reference field with Select widget and saw all 3 views. So rather than 'Limit' its more like 'In addition to "Preselect View Options", automatically allow any Views with the following tags' (wording not sure of).
So ultimately I think if we just reword things in (2), I think we are good to go?
- π¬π§United Kingdom scott_euser
Added follow-up for my comment #1 π 'Preselect View Options' is ignored with the Autocomplete widget Active
- π¬π§United Kingdom scott_euser
Actually exists already as π Preselect doesn't work with autocomplete field. Needs review
- πΊπΈUnited States trackleft2 Tucson, AZ πΊπΈ
FYI I've created an issue on the User Guide project to add documentation for views administrative tags. https://www.drupal.org/project/user_guide/issues/3501820 β¨ Add help information about view meta data like tags and title and description etc. Active
- πΊπΈUnited States trackleft2 Tucson, AZ πΊπΈ
Updated Issue Title
- πΊπΈUnited States trackleft2 Tucson, AZ πΊπΈ
I mostly agree with #15 and believe that I have addressed the interface issues. I think we should hash out whether this functionality should be a global setting or a widget setting over in π Preselect doesn't work with autocomplete field. Needs review . I've added a comment over there with my thoughts π Preselect doesn't work with autocomplete field. Needs review . Also, feel free to ignore any of my suggestions.
When I attempted with the default form display (autocomplete) it does not change anything. Looking further this actually seems like the Views Reference field type as a whole is ignored for Autocomplete, but I think we need to consider that as a follow-up (ie, "Preselect View Options" is already ignored there) as it can have wider implications for sites where the 'Preselect View Options' has already been ignored in autocomplete.
I found the UX a bit confusing, as the 'Limit by Views tag(s)' is not actually limiting. I tagged Recent Content and Recent Comments core blocks with 'recent' then created a third View with Block display 'Other view' without tagging it. I ticked 'Other view' in 'Preselect View Options' then went to create a node with a Views Reference field with Select widget and saw all 3 views. So rather than 'Limit' its more like 'In addition to "Preselect View Options", automatically allow any Views with the following tags' (wording not sure of).