Skip to content

Fix google search snippet, add search-on-enter feature

Marcia Ramos requested to merge fix-search-snippet into master

What I did

  • Wrapped the input in a <form> with the correct search action and made it work
    • The autocomplete function was preserved
    • On pressing enter, it takes the user to the search results page with the query parsed to the URL and preloaded with the page
  • This way I made sure parsing the search query through the URL was working
  • Implemented the SearchAction microdata directly to the form, so that there's more chance it will work properly and Google will hopefully display the search snippet for us

How the search works now

  • Type to search as you normally do
    • If you found what you want, select one of the results and we're done
    • If you didn't, press enter
  • It will take you to the search page loading all the results for your query

Review apps:

cc/ @axil

Edited by Marcia Ramos

Merge request reports