Add a "view all results" link setting for the autocomplete dropdown

Created on 6 March 2025, about 1 month ago

Problem/Motivation

Some users might not think to submit the search form to land on the search page. It would be nice to add a "view all results" link or button setting for the sake of UI.

Proposed resolution

  • Add a checkbox in the setting form to display a "View all results" link/button in the dropdown.
  • Add a text field in the setting form that sets a default value of "View all results" if empty, so users can define their own text.
  • Maybe optionally make it a button, or at least add a class to it so that it could be styled as a button it site builders wanted.

It would also be worth thinking about where it displays. Maybe best up top so that it's not missed on sites that display a long list of results.

โœจ Feature request
Status

Active

Version

1.0

Component

General code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @tonytheferg
  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

    Thanks for creating this feature request. As said in the other issue ๐Ÿ’ฌ Looking for help displaying the suggestions in a view Active , I think this is a good idea. (Though Iโ€™m a bit confused why this was never proposed before โ€ฆ)
    However, I currently donโ€™t have the time to work on any feature requests, so this will have to wait until someone else creates a working MR for this (which Iโ€™ll happily review).

  • First commit to issue fork.
  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland iSampo

    isampo โ†’ changed the visibility of the branch 3511446-view-all-results to hidden.

  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland iSampo

    isampo โ†’ changed the visibility of the branch 3511446-view-all-results to active.

  • Pipeline finished with Failed
    19 days ago
    Total: 188s
    #451161
  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland iSampo

    Very initial MR added with "view all results" functionality. Does the following:

    Extends the Autocompletion configuration form with:
    - Show "View all results" link checkbox for enabling the results link
    - Link text for setting the "view all results" link text
    - Link position for selecting whether the link should appear before or after the suggestions

    "View all results" administrative configuration

    View all results" suggestion on the autocompletion

    Some things that (at least) still need to be considered:
    - Making the configuration translatable as there's now a textual value that could be present for various languages
    - Currently the link is being output as a suggestion after/before the other suggestions, so there's no difference in class or type of it. For accessibility (and theming), it'd likely need to be pulled out of the suggestions listing.
    - Tests

  • Looks like it's off to a good start! Thanks!

  • Maybe add an option to have it at the top and the bottom?

    For sites with a longer list of suggestions, someone might scroll past the link at the top in hopes to see if what they're looking for is in the suggestions, only to go through the list and not see what they are looking for. They would then would have to scroll all the way back up to get to the see all results link.

Production build 0.71.5 2024