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

Improve search input on mobile #368

Merged
merged 2 commits into from
Jul 27, 2023
Merged

Improve search input on mobile #368

merged 2 commits into from
Jul 27, 2023

Conversation

valtlai
Copy link
Contributor

@valtlai valtlai commented Jul 26, 2023

This does two things to optimize the search input on mobile browsers:

  • Disables the autocapitalization of the first letter as that does not make sense for search terms.
  • Shows the Search icon/label on the mobile keyboard instead of the Go icon/label.

Before:
Screenshot of Android keyboard. Capitalization is turned on and the Enter key has an arrow icon.

After:
Screenshot of Android keyboard. Capitalization is turned off and the Enter key has a search icon.

@bglw
Copy link
Contributor

bglw commented Jul 27, 2023

Nice! Good calls. To keep this in one PR, would you be open to adding these attributes to the (upcoming) modular UI input as well?

Relevant input:

this.inputEl = new El("input").id(`pfmod-input-${id}`).class("pagefind-modular-input").addTo(wrapper);

(All good if not! I can jump in tomorrow and add it to the branch before merging)

This does two things to optimize the search input on mobile browsers:
- Disables the autocapitalization of the first letter
  as that does not make sense for search terms.
- Shows the Search icon/label on the mobile keyboard
  instead of the Go icon/label.
@valtlai
Copy link
Contributor Author

valtlai commented Jul 27, 2023

To keep this in one PR, would you be open to adding these attributes to the (upcoming) modular UI input as well?

Done.

@bglw bglw enabled auto-merge July 27, 2023 04:33
@bglw bglw merged commit 060563c into CloudCannon:main Jul 27, 2023
4 checks passed
@valtlai valtlai deleted the autocapitalize-off branch July 27, 2023 04:56
@bglw bglw mentioned this pull request Sep 6, 2023
41 tasks
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