Add a mobile minimum size for form fields#13639
Merged
jorgefilipecosta merged 6 commits intomasterfrom Feb 4, 2019
Merged
Conversation
This implements our min-font size of 16px for form fields, in order to prevent zoom-in when Safari focuses on the fields.
This should fall back to the default, with the new minimum mobile font size.
|
Yes, thank you @kjellr ! Based on the videos above it looks right to my eyes, but wouldn't hurt to get other reviewers. Well done! 👏 |
4 tasks
gziolo
approved these changes
Feb 4, 2019
jorgefilipecosta
approved these changes
Feb 4, 2019
Member
jorgefilipecosta
left a comment
There was a problem hiding this comment.
Works great I tested on a real device I was able to replicate the zoom issue on master, and on this PR the problem is fixed.
No noticeable changes happened while testing on the desktop.
daniloercoli
added a commit
that referenced
this pull request
Feb 5, 2019
…rnmobile/372-use-RichText-on-Title-block * 'master' of https://github.com/WordPress/gutenberg: (22 commits) Make the modal title styling consistent (#13669) Disable navigation block for text mode. (#12185) Fix: Linting problem in modal example code (#13671) Add myself as a code owner to the annotations (#13672) Add more reviewers to CODEOWNERS.md file (#13667) Plugin: Remove jQuery heartbeat-to-hooks proxying (#13576) Workflow: Add repository CODEOWNERS file (#13604) Add a mobile minimum size for form fields (#13639) Update edit-save documentation (#13578) Alt image setting (#13631) Fix: Allow years lower than 1970 in DateTime component. (#13602) Using addQueryArgs to generate Manage All Reusable Blocks link (#13653) Bump plugin version to 5.0.0-rc.1 (#13652) Update lodash to 4.17.10 (#13651) Refreshed PR (#9469) Set default values of the width and height input fields according to the actual image dimensions (#7687) 12647 fix css color picker (#12747) Remove "we" from messages (#13644) Fix: Font size picker max width on mobile (#13264) Fix/issue 12501 menu item aria label ...
This was referenced Feb 18, 2019
youknowriad
pushed a commit
that referenced
this pull request
Mar 6, 2019
On Safari for iOS, the browser automatically zooms into any form field that contains text with a font size less than `16px`. When this occurs, users must manually zoom back out after dismissing the keyboard. This happens frequently in our interface, since many of our text fields use `13px` text. It breaks up the flow, and makes editing feel _very_ non-mobile-optimized. We already have a [`$mobile-text-min-font-size` variable](https://github.com/WordPress/gutenberg/blob/286317c8e61b1a2922243875fe1f98c868d7859b/assets/stylesheets/_variables.scss#L15), and use this to avoid this behavior in the block inserter: https://github.com/WordPress/gutenberg/blob/ce864a6f9aff4eea9b4bd3994b2cf4bae30105cb/packages/editor/src/components/inserter/style.scss#L75-L79 This PR expands that fix out to as many different form fields as I could find: - General form fields, defined in `/edit-post/` (this covers most fields by itself) - Preformatted, Code, and HTML blocks - Form Token Field (used in the tags panel of the document sidebar) - URL Input field⚠️ _This worked fine in my testing, but since it effects a lot of fields, it could use a lot of testing!_ In addition, the Code Editor extended off-screen on small screens. This PR adds a `max-width` to clean that up. ## Screenshots Before: 🎥 [**Screencast of the issue**](https://cloudup.com/cf1VqxNV5LN)  <img width="376" alt="screen shot 2019-02-01 at 10 16 56 am" src="https://user-images.githubusercontent.com/1202812/52131610-2e03af80-260b-11e9-83d1-15c66590f62a.png"> After: 🎥 [**Screencast with this fix**](https://cloudup.com/cRQNYsDRsmx)  <img width="375" alt="screen shot 2019-02-01 at 10 02 16 am" src="https://user-images.githubusercontent.com/1202812/52131615-322fcd00-260b-11e9-88af-5407e32388ee.png"> --- cc @iamthomasbishop for some thoughts/testing too.
youknowriad
pushed a commit
that referenced
this pull request
Mar 6, 2019
On Safari for iOS, the browser automatically zooms into any form field that contains text with a font size less than `16px`. When this occurs, users must manually zoom back out after dismissing the keyboard. This happens frequently in our interface, since many of our text fields use `13px` text. It breaks up the flow, and makes editing feel _very_ non-mobile-optimized. We already have a [`$mobile-text-min-font-size` variable](https://github.com/WordPress/gutenberg/blob/286317c8e61b1a2922243875fe1f98c868d7859b/assets/stylesheets/_variables.scss#L15), and use this to avoid this behavior in the block inserter: https://github.com/WordPress/gutenberg/blob/ce864a6f9aff4eea9b4bd3994b2cf4bae30105cb/packages/editor/src/components/inserter/style.scss#L75-L79 This PR expands that fix out to as many different form fields as I could find: - General form fields, defined in `/edit-post/` (this covers most fields by itself) - Preformatted, Code, and HTML blocks - Form Token Field (used in the tags panel of the document sidebar) - URL Input field⚠️ _This worked fine in my testing, but since it effects a lot of fields, it could use a lot of testing!_ In addition, the Code Editor extended off-screen on small screens. This PR adds a `max-width` to clean that up. ## Screenshots Before: 🎥 [**Screencast of the issue**](https://cloudup.com/cf1VqxNV5LN)  <img width="376" alt="screen shot 2019-02-01 at 10 16 56 am" src="https://user-images.githubusercontent.com/1202812/52131610-2e03af80-260b-11e9-83d1-15c66590f62a.png"> After: 🎥 [**Screencast with this fix**](https://cloudup.com/cRQNYsDRsmx)  <img width="375" alt="screen shot 2019-02-01 at 10 02 16 am" src="https://user-images.githubusercontent.com/1202812/52131615-322fcd00-260b-11e9-88af-5407e32388ee.png"> --- cc @iamthomasbishop for some thoughts/testing too.
This was referenced Apr 30, 2020
This was referenced Apr 30, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Safari for iOS, the browser automatically zooms into any form field that contains text with a font size less than
16px. When this occurs, users must manually zoom back out after dismissing the keyboard. This happens frequently in our interface, since many of our text fields use13pxtext. It breaks up the flow, and makes editing feel very non-mobile-optimized.We already have a
$mobile-text-min-font-sizevariable, and use this to avoid this behavior in the block inserter:gutenberg/packages/editor/src/components/inserter/style.scss
Lines 75 to 79 in ce864a6
This PR expands that fix out to as many different form fields as I could find:
/edit-post/(this covers most fields by itself)In addition, the Code Editor extended off-screen on small screens. This PR adds a
max-widthto clean that up.Screenshots
Before:
🎥 Screencast of the issue
After:
🎥 Screencast with this fix
cc @iamthomasbishop for some thoughts/testing too.