Fix too much spacing between Optimize input field and errors
See original GitHub issueBug Description
See https://google.github.io/site-kit-wp/storybook/main/?path=/story/optimize-module-setup--start-with-invalid-values: The space between the Optimize ID field and the error text below is way too much. This is likely happening because the error text is placed outside the .googlesitekit-setup-module__inputs
wrapper, which shouldn’t be the case as it includes extra margin etc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- In the Optimize setup (and settings as well), any input error text should have the correct space from its associated input field, specifically an error for the Optimize ID shouldn’t have the extra margin that it currently has (compared to e.g. an error for the AMP experiment JSON field).
Implementation Brief
- The extra space is caused by the following CSS Rules in the
assets/sass/components/setup/_googlesitekit-setup-module.scss
file. - https://github.com/google/site-kit-wp/blob/8bff83f9f11742dee8aca49b04f0f55121d040e1/assets/sass/components/setup/_googlesitekit-setup-module.scss#L109-L115
- Add new CSS Rules that overrides and sets the bottom margin (ie.
margin-bottom: 0
) to thediv.mdc-text-field--error
and the following helper textdiv.mdc-text-field-helper-line
elements insidediv.googlesitekit-setup-module__inputs
ofform.googlesitekit-optimize-setup__form
.- We can keep the change limited to the Optimize ID input field by targeting the div with
[name="optimizeID"]
attribute selector.
- We can keep the change limited to the Optimize ID input field by targeting the div with
Test Coverage
- N/A
Visual Regression Changes
- May need updating.
QA Brief
- Check whether spacing has been reduced in the following story: https://google.github.io/site-kit-wp/storybook/main/?path=/story/optimize-module-setup--start-with-invalid-values
Changelog entry
- Fix styles for errors on Optimize setup and settings forms.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14
Top Results From Across the Web
How to Fix Spacing in Word - Lifewire
To fix spacing between words, go to Find and Replace. Enter a space in both fields, then go to More > Format >...
Read more >Fixing spacing issues and using helper classes - Pega Academy
Using your browser-based developer tools, identify the remaining bottom spacing issue. Right-click on the screen and then click Inspect or press F12 to...
Read more >How to Fix Image Padding and Spacing in HTML Emails
Have you ever noticed the small spacing below images in Outlook.com and Gmail? Learn how to get rid of extra space under images...
Read more >How to remove extra spacing between words in Word 2010?
If there seems to be larger than normal spaces between the words when typing in Word 2010, go to: File> Options > Advanced...
Read more >How to Fix the "Clickable Elements Too Close Together" Error ...
Check the Input Method. If you're trying to fix the “Clickable elements too close together” error, it may help check the input method....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@eugene-manuilov Can you check @wpdarren 's comment about the release. I saw the PR was merged against develop but did not make its way to the main branch even though it’s tagged for the release. Also, updated PR to fix the issue Darren mentioned.
QA Update: ✅
Verified:
Screenshots