Fix Blocker Picker autocompleter icon spacing#14772
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.
| return { | ||
| name: 'blocks', | ||
| className: 'editor-autocompleters__block', | ||
| className: 'block-editor-autocompleters__block', |
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?
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.
https://github.com/WordPress/gutenberg/pull/14420/files#diff-ea8f473f0650959558c8075aac355a73
This appears to have been the only file changed in packages/editor/ in #14420.
This reverts commit 28eb706.
Co-Authored-By: Daniel Richards <talldan@users.noreply.github.com>
* 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 <talldan@users.noreply.github.com>
* 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 <talldan@users.noreply.github.com>
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: