Fix Blocker Picker autocompleter icon spacing#14772
Merged
Conversation
During the creation of block-editor the className on the autocompleter wasn’t updated. This change updates the class to use the `block-editor-` prefix. This causes the CSS to apply again thereby correcting the margin that was missing.
youknowriad
reviewed
Apr 3, 2019
| return { | ||
| name: 'blocks', | ||
| className: 'editor-autocompleters__block', | ||
| className: 'block-editor-autocompleters__block', |
Contributor
There was a problem hiding this comment.
I think this className shouldn't be updated since it's the editor package. Any reasons for this @aduth and are there other similar use-cases?
Member
There was a problem hiding this comment.
This does appear to have been included in the updates from editor- to block-editor- in #14420, and in retrospect, I can't see any reason why it should have been (there are no other references outside the editor package). I think the correct course of action then would be to change the applied styles back from .block-editor- to .editor- in src/components/autocompleters/style.scss.
This appears to have been the only file changed in packages/editor/ in #14420.
5 tasks
This reverts commit 28eb706.
Co-Authored-By: Daniel Richards <[email protected]>
aduth
pushed a commit
that referenced
this pull request
Apr 16, 2019
* Fixes classname to match package and CSS rule During the creation of block-editor the className on the autocompleter wasn’t updated. This change updates the class to use the `block-editor-` prefix. This causes the CSS to apply again thereby correcting the margin that was missing. * Revert "Fixes classname to match package and CSS rule" This reverts commit 28eb706. * Editor: Revert autocompleters classnames to editor prefix Co-Authored-By: Daniel Richards <[email protected]>
aduth
pushed a commit
that referenced
this pull request
Apr 16, 2019
* Fixes classname to match package and CSS rule During the creation of block-editor the className on the autocompleter wasn’t updated. This change updates the class to use the `block-editor-` prefix. This causes the CSS to apply again thereby correcting the margin that was missing. * Revert "Fixes classname to match package and CSS rule" This reverts commit 28eb706. * Editor: Revert autocompleters classnames to editor prefix Co-Authored-By: Daniel Richards <[email protected]>
This was referenced Apr 17, 2019
Closed
Closed
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.
During the creation of the
block-editorpackage theclassNamein the JSX on the autocompleter wasn’t updated. However the CSS rule was updated. This inconsistency meant that a number to CSS rules were no longer being applied.The main result was that the Block autocompeleter lost its right hand margin thereby making the icon too close to the text.
What was fixed?
This PR updates the
classNamein the JSX to use theblock-editor-prefix. This causes the CSS to apply again thereby correcting the margin that was missing.Fixed version - note the space between icon and text has been restored:

Types of changes
Bug fix (non-breaking change which fixes an issue).
Checklist: