oecd-opsi / meta-toolkit

Web resources to connect government practitioners with innovation tools, methods, and tactics
0 stars 1 forks source link

Autocomplete on search box #4

Open innovativeangela opened 6 years ago

innovativeangela commented 6 years ago

Autocomplete on search box on both the landing page and filter page

marcochiesi commented 6 years ago

The plugin used at the moment for the search doesn't currently support autocomplete, but I've read in their forum that it's planned for a future version. I believe it's not possible to apply the autocomplete functionality to the current plugin without changing the source code of the plugin itself, which is not a good idea as it would prevent the ability to apply updates. An alternative solution could be to completely rebuild the search functionality with another plugin or build a custom plugin for that, but it would require a major effort.

innovativeangela commented 6 years ago

Let's not change the source code of the current plugin and risk preventing updates. It sounds like the future autocomplete support is not coming any time soon (they were still "considering" it in September). Is there another plugin that could be substituted for the current one to rebuild the search functionality? Would that also amount to a major effort compared with building a custom plugin?

marcochiesi commented 6 years ago

A possible alternative could be the FacetWP plugin, which by the way is already installed on the website as it is used for the case study platform filtering. It seems it has an autocomplete feature. Both plugins have pros and cons, and probably previous developers used one or the other for specific reasons. Theoretically, it would be possible to use FacetWP also for the Toolkits, but I believe it would still require an effort that is not worth the final result, even if it would be far less than developing a completely custom plugin. By the way, in the current implementation, an autocomplete feature would not be so useful because the search results are updated in real time as the user types in the search field. Anyway, at the moment I would leave this feature outside of the next milestone.