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

fix: navbar search input zoom on focus #308

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

hichemfantar
Copy link
Contributor

@hichemfantar hichemfantar commented Jun 1, 2024

closes #306

This is because inputs should have a minimum font size of 16px, anything lower will cause a zoom in on iOS.

https://stackoverflow.com/a/6394497/11334432

before:

RPReplay_Final1717247506.mp4

after:

RPReplay_Final1717247547.mp4

@facebook-github-bot
Copy link

Hi @hichemfantar!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Copy link

netlify bot commented Jun 1, 2024

Deploy Preview for infima ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4542b09
🔍 Latest deploy log https://app.netlify.com/sites/infima/deploys/665b4a62d9a5680008c44bcd
😎 Deploy Preview https://deploy-preview-308--infima.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hichemfantar
Copy link
Contributor Author

There's an issue with the cla signature, waiting for a fix

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 4, 2024
@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@hichemfantar hichemfantar changed the title Fix font size in navbar search input fix: navbar search input zoom on focus Jun 9, 2024
@hichemfantar
Copy link
Contributor Author

@slorber can we merge this please?

@slorber
Copy link
Collaborator

slorber commented Jun 27, 2024

Thanks

As far as I understand this does not really impact Docusaurus because most Docusaurus sites are using Algolia which already uses 1rem

Note that sooner or later I'll deprecate Infima and merge a part of its code back into the Docusaurus theme classic as an implementation detail, so I wouldn't recommend relying too much on it for your own site styling: you'd rather create your own custom CSS for that because things we don't use in Docusaurus core are likely to be removed.

@slorber
Copy link
Collaborator

slorber commented Jun 27, 2024

cc @praveenn77 it's preferable if your lunr plugin did not depend on Infima classes: https://github.com/praveenn77/docusaurus-lunr-search

If we create a Tailwind-based theme (which we plan to do), your plugin will not work by default because Infima won't be loaded. It is preferable that you provide your own stylesheet

@slorber slorber merged commit fde8a0e into facebookincubator:main Jun 27, 2024
4 of 5 checks passed
@hichemfantar
Copy link
Contributor Author

@slorber i agree that the plugin shouldn't rely on infima styles as they are prone to change but for now this a good enough fix (the plugin has 27,693 weekly downloads on npm)
Also the tailwind change will most likely warrant a major version bump for docusaurus (v4) and the plugin currently has a peer dep lock to docusaurus<v3 so technically it shouldn't break existing projects if docusaurus gets a v4 release which it should according to semver.

@hichemfantar
Copy link
Contributor Author

@slorber btw do you plan to publish a new release with this fix in order to fix existing websites?

@slorber
Copy link
Collaborator

slorber commented Jul 1, 2024

Alpha 44 is out: https://www.npmjs.com/package/infima?activeTab=versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: search bar input zooms in on focus on iOS
3 participants