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

[skeleton] Use datalist for query suggestions for autocomplete experience #2506

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

frontsideair
Copy link
Contributor

@frontsideair frontsideair commented Sep 9, 2024

WHY are these changes introduced?

Predictive query suggestions are listed as inline, and the experience is fine, but the HTML <datalist> element has better semantics and keyboard accessibility. Has good compatibility across the board. (Firefox has partial support, but in this case the problem is with date and time fields, not related in current case.)

WHAT is this pull request doing?

Uses <datalist> HTML element.

Predictive query via datalist
datalist.mov

HOW to test your changes?

  1. Open search sidebar
  2. Type "s"
  3. See query results (if using mock.shop there should be a few)

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

@wizardlyhel
Copy link
Contributor

Nice! Thank you for the contribution! We'll review this as soon as we can.

Copy link
Contributor

@wizardlyhel wizardlyhel left a comment

Choose a reason for hiding this comment

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

code looks good

Copy link
Contributor

@scottdixon scottdixon left a comment

Choose a reason for hiding this comment

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

Thanks @frontsideair! CI failed on typecheck - can you please adjust? 🙏

@frontsideair
Copy link
Contributor Author

@scottdixon I must've missed your comment, just saw it and fixed the type errors.

@scottdixon
Copy link
Contributor

Thanks @frontsideair! One last ask - can you please include a changeset (yarn changeset from Hydrogen root).

@frontsideair
Copy link
Contributor Author

Just did it @scottdixon!

@scottdixon scottdixon merged commit c1696a5 into Shopify:main Oct 4, 2024
6 checks passed
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.

3 participants