Skip to content

Conversation

randyl
Copy link
Contributor

@randyl randyl commented Jul 13, 2018

The problem

Issue #1391 describes a desire to always have a google search option in the search autocomplete menu, not just when there are no results.

Solution provided

In the _renderMenu function of search_template.js, a new menu item is added after all other items are sorted. It uses a new category of "Site Search", and contains a link to a google search for the current keywords. See screenshot.

menu_screenshot

If the wording of the category and menu item is deemed appropriate, we might consider changing the no-results text from "try web search" to "try site search" to be consistent.

I did not see any existing tests for the search autocomplete menu, so there are no tests to accompany this change.

@zoffixznet zoffixznet merged commit 74d38f6 into Raku:master Jul 13, 2018
@zoffixznet
Copy link
Contributor

👍 Thanks!

@zoffixznet
Copy link
Contributor

If the wording of the category and menu item is deemed appropriate, we might consider changing the no-results text from "try web search" to "try site search" to be consistent.

I sent you an invite to perl6 GitHub org. You can accept it here https://github.com/perl6/ and commit any further changes you wanted to make directly.

@randyl randyl deleted the google-search-option branch July 13, 2018 01:23
@randyl
Copy link
Contributor Author

randyl commented Jul 13, 2018

Thanks. I did change the no-results text to "try site search". I'll close #1391 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants