Skip to content

Search bar dropdown with support for both main Docs pages and subheadings. #9832

Open
@XandaPanda42

Description

@XandaPanda42

Your Godot version:
v. Stable (4.3) and future versions.

Issue description:
Suggestions for some beneficial upgrades to the doc page's Search Bar that sits in the upper left hand corner.

Current functionality:
The user types in a search term, and the search is only completed when the user presses enter. (Image 1. )
Screenshot from 2024-08-25 13-32-25

On pressing 'Enter' the user is taken to a page usually displaying 50 entries. The user then clicks on the page they want to look at, and are taken to that page. Depending on the search term, the entry is typically at the top of the page. This means that the user has to go via the (occasionally slow loading) search page to reach any page they might want to view.

Proposed Functionality:
The user types in a search term, and a dropdown menu shows up after a predetermined amount of time, showing the user a few options based on the text input (Image 2.)
Godot-Docs-Search-Current

Using the arrow keys to highlight an entry, users could then navigate directly to the page by pressing the 'Enter' key, or by clicking directly on the entry, stopping the search page from loading and displaying, and requiring less unnecessary user input to view their desired page.

Alternatively, a check could be performed on 'Enter' that checks if the input term is an exact match for a page within the Docs ("Array" for example.) If the term is an exact match, the action would take the user directly to the page they requested, rather than going via the search page. The term could be styled a different way, (Italic, Bold, Highlighted or colored green) to indicate that the term is an exact match for an existing page.

If possible, subheadings being included in this function would be greatly beneficial, as certain basic patterns in GDScript (for loops, match, enums and the entire subheading "Statements and Control Flow) don't currently have their own pages, instead being placed under a subheading in the GDScript Reference page which has no contents page to allow fast navigation, and does not show the subheadings in the box on the left as most do:

Screenshot from 2024-08-25 14-27-45

(The GDScript Reference isn't even the first entry when you search "GDScript reference" anymore and is difficult to locate manually.)

I am aware that those last issues could be solved in other ways, making a separate page for the larger subheadings in the GDScript reference for example, but in my opinion, the issues in question would be solved by an improved Search function and would allow the reference page to remain as a single page, not breaking any previous links internal to the docs or on other sites that link to the page, and wouldn't break any current benefits, eg. still allowing users to print the entire reference page or save it as a single PDF file.

If this GitHub Issue gets denied, I'll create one that speaks on that issue directly as well as one on the slowness of the current search function, but with a few tweaks to the way the search works, it wouldn't be needed.

I believe these changes would aid both long time users and beginners in finding the topics and pages they need with less delay, and further improve the usability and feel of the Docs pages. Thank you for reading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    content:websiteIssues related to adding website features and fixing bugs, whether on the front or back-endenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions