Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ add autofocus to homepage search and data catalog #4008

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Oct 4, 2024

Implements #3982

Avoids the issue of having to recreate the google.com behaviour on the homepage search by disabling the dropdown panel until there the user has typed something.

@ikesau ikesau requested a review from larsyencken October 4, 2024 13:37
@ikesau ikesau self-assigned this Oct 4, 2024
@ikesau
Copy link
Member Author

ikesau commented Oct 4, 2024

@larsyencken I realized while investigating for your questions it was simple enough to just try making the changes and see how it feels in staging.

@owidbot
Copy link
Contributor

owidbot commented Oct 4, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-autofocus-inputs

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2024-10-04 13:52:23 UTC
Execution time: 1.20 seconds

Copy link
Contributor

@larsyencken larsyencken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nice! This is a subtle change, but I feel like it would increase the number of searches people do, and it's really nice for power users.

@marcelgerber
Copy link
Member

The things about the homepage I'm slightly concerned about with this PR are:

  • Not showing the "Featured searches" section any more, and to some degree also the "Recent searches" section
  • While the search bar is focused, the arrow keys and PageUp/Down keys no longer work to scroll the homepage (which I'm honestly using all the time).

@ikesau
Copy link
Member Author

ikesau commented Oct 8, 2024

Yeah, I agree that removing suggested searches is significant, seeing as they're each among our top 10 searched terms according to Algolia analytics.

Correlation != causation, these terms might just be popular in their own right, but maybe it's reason to think a bit about what we think the value of suggesting searches is, and how much of that value we lose by removing them.

i.e. do suggested searches increase the likelihood that someone will submit a search, which increases the likelihood that they'll find interesting content? or do suggested searches only make it slightly faster to submit a search without affecting overall search rates.

Changing arrow key behaviour would be harder to test, but yeah it's for reasons like that that people disable autofocus in the browsers.

@marcelgerber
Copy link
Member

This is hard to test for, of course, but my hunch is that Suggested Searches give some idea of what to search for in our publication.

Obviously there's also other such hints on the homepage - the search box placeholder text, the row of topic pages at the top, etc. - but it's probably nice to have that right in the users face when they are attempting to search?

@ikesau
Copy link
Member Author

ikesau commented Oct 11, 2024

@larsyencken how do you want to proceed? Autofocus on the catalog only?

@larsyencken
Copy link
Contributor

@larsyencken how do you want to proceed? Autofocus on the catalog only?

I'm happy for you to split out and ship the catalog improvement. For the homepage, I made a Slack thread with you, me and Joe to make a call.

@ikesau ikesau marked this pull request as ready for review October 18, 2024 14:24
@ikesau
Copy link
Member Author

ikesau commented Oct 18, 2024

The decision has been to not autofocus the homepage 👍

@ikesau ikesau merged commit 23438df into master Oct 18, 2024
21 checks passed
@ikesau ikesau deleted the autofocus-inputs branch October 18, 2024 15:47
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.

4 participants