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 styling regression to autocompleters #14791

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/editor/src/components/autocompleters/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function createBlockCompleter( {
} = {} ) {
return {
name: 'blocks',
className: 'editor-autocompleters__block',
className: 'block-editor-autocompleters__block',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I have gone with block-editor, editor (changing the stylesheet instead), or both?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like we should go with editor as we're declaring these in the editor module. Not sure why these classNames were changed.

triggerPrefix: '/',
options() {
const selectedBlockName = getSelectedBlockName();
Expand Down
8 changes: 4 additions & 4 deletions packages/editor/src/components/autocompleters/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import apiFetch from '@wordpress/api-fetch';
*/
export default {
name: 'users',
className: 'editor-autocompleters__user',
className: 'block-editor-autocompleters__user',
triggerPrefix: '@',
options( search ) {
let payload = '';
Expand All @@ -25,9 +25,9 @@ export default {
},
getOptionLabel( user ) {
return [
<img key="avatar" className="editor-autocompleters__user-avatar" alt="" src={ user.avatar_urls[ 24 ] } />,
<span key="name" className="editor-autocompleters__user-name">{ user.name }</span>,
<span key="slug" className="editor-autocompleters__user-slug">{ user.slug }</span>,
<img key="avatar" className="block-editor-autocompleters__user-avatar" alt="" src={ user.avatar_urls[ 24 ] } />,
<span key="name" className="block-editor-autocompleters__user-name">{ user.name }</span>,
<span key="slug" className="block-editor-autocompleters__user-slug">{ user.slug }</span>,
];
},
getOptionCompletion( user ) {
Expand Down