cid-harvard / atlas-economic-complexity

[DEPRECATED] The Atlas online is a powerful interactive tool that enables users to visualize a country’s total trade, track how these dynamics change over time and explore growth opportunities for more than a hundred countries worldwide.
http://atlas.cid.harvard.edu
81 stars 40 forks source link

Add free submit to search. #309

Closed gwezerek closed 9 years ago

gwezerek commented 9 years ago

Right now the only way to navigate to a new page via search is to select an option from the autocomplete menu. This is bad news for users who:

  1. Don't understand that those are the only options.
  2. See the option they want in the list and rather than select it, just finish typing the phrase and then submit (currently this behavior just refreshes the page).

I propose we use the input field as the canonical search term/value on submit. We will have to validate the input value on submit to ensure that the field contains a question in our database.

Therefore as users hover and focus on elements in the autocomplete list, the search input should update accordingly. We currently use an AJAX request in searchresults.js to populate the autocomplete list with the right labels and values, and I suggest we begin there when implementing this fix.

Fixing this bug will also streamline search analytics.