- 🇬🇧United Kingdom scott_euser
Apologies for missing this. I am just a bit nervous that this is risky as it seems quite likely that there may be cases where site editors have selected a View they are not allowed to select according to 'Preselect View Options'. I suppose it won't break things BUT it would then prevent resave e.g. of a node or paragraph.
Beyond that we just need test coverage + conversion to merge request to get this in.
- 🇬🇧United Kingdom scott_euser
Needs also coordination in case ✨ Preselect Views by administrative tags Needs review is merged first to also add that restriction to autocomplete (could also be a separate follow-up issue though)
- 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸
It might be safer to move the configuration for this feature, to the field widget settings for the select widget. This approach would ensure that existing widgets (currently only the Select widget) continue to function properly while introducing this as a new option for the Autocomplete widget.
What are your thoughts?
- 🇬🇧United Kingdom scott_euser
Hmmm it's a good suggestion.
I guess my worry is that choosing which views are available is probably comparably essential as choosing a vocabulary with a taxonomy reference field and DX might suffer hiding it.
Might anyways be simpler to add support for autocomplete then to handle the update hooks.
- Merge request !82Draft: Issue #3257767 Enable preselected views feature on autocomplete widget. → (Open) created by trackleft2
- 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸
I've added a proof of concept as Merge Request !82 for your consideration.
The merge request:
- Incorporates the patch from #2 but uses widget settings instead of field settings.
- Has an update function to move values from field config to field widget config
- Adds widget settings for both the select element and the autocomplete widget. - 🇬🇧United Kingdom scott_euser
Hmmm yeah I see how it would work, and thank you for spending the time on it. I think its a fairly big DX change though and I still worry about it then being more hidden.
Are there other features you feel are specific to the Select widget that justify the separation of controls from autocomplete vs select? Otherwise I can try to insist that any future new feature covers both, allowing us to keep the settings in the field settings (e.g. in ✨ Preselect Views by administrative tags Needs review )
If we do ultimately go down this route, we can sign-post that more controls can be found in the manage form display, but let's not do that yet until we get more of a direction decision (which I am not convinced is needed yet). If we are at a stalemate I can reach out to other maintainers in Drupal Slack to get opinions. Sorry - just nervous as its a very heavily used module
For anyone else reviewing, updated screenshot:
Manage form display with proposed change:
Manage field settings with proposed change:
- 🇬🇧United Kingdom scott_euser