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

Block Editor: Remove (more) legacy "editor-" class name compatibility #19489

Merged
merged 1 commit into from
Jan 9, 2020
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default function BlockConvertButton( { shouldRender, onClick, small } ) {
const label = __( 'Convert to Blocks' );
return (
<MenuItem
className="block-editor-block-settings-menu__control"
onClick={ onClick }
icon="screenoptions"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export function BlockModeToggle( { blockType, mode, onToggleMode, small = false,

return (
<MenuItem
className="block-editor-block-settings-menu__control"
onClick={ onToggleMode }
icon="html"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export function BlockSettingsMenu( { clientIds } ) {
) }
{ canDuplicate && (
<MenuItem
className="block-editor-block-settings-menu__control"
onClick={ flow( onClose, onDuplicate ) }
icon="admin-page"
shortcut={ shortcuts.duplicate }
Expand All @@ -92,15 +91,13 @@ export function BlockSettingsMenu( { clientIds } ) {
{ canInsertDefaultBlock && (
<>
<MenuItem
className="block-editor-block-settings-menu__control"
onClick={ flow( onClose, onInsertBefore ) }
icon="insert-before"
shortcut={ shortcuts.insertBefore }
>
{ __( 'Insert Before' ) }
</MenuItem>
<MenuItem
className="block-editor-block-settings-menu__control"
onClick={ flow( onClose, onInsertAfter ) }
icon="insert-after"
shortcut={ shortcuts.insertAfter }
Expand All @@ -122,7 +119,6 @@ export function BlockSettingsMenu( { clientIds } ) {
<MenuGroup>
{ ! isLocked && (
<MenuItem
className="block-editor-block-settings-menu__control"
onClick={ flow( onClose, onRemove ) }
icon="trash"
shortcut={ shortcuts.remove }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ const ImageURLInputUI = ( {
>
{ ( ! url || isEditingLink ) && (
<URLPopover.LinkEditor
className="editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content"
className="block-editor-format-toolbar__link-container-content"
value={ linkEditorValue }
onChangeInputValue={ setUrlInput }
onKeyDown={ stopPropagationRelevantKeys }
Expand All @@ -288,7 +288,7 @@ const ImageURLInputUI = ( {
{ ( url && ! isEditingLink ) && (
<>
<URLPopover.LinkViewer
className="editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content"
className="block-editor-format-toolbar__link-container-content"
onKeyPress={ stopPropagation }
url={ url }
onEditLinkClick={ startEditLink }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/social-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => {
event.preventDefault();
setPopover( false );
} } >
<div className="editor-url-input block-editor-url-input">
<div className="block-editor-url-input">
<URLInput
value={ url }
onChange={ ( nextURL ) => setAttributes( { url: nextURL } ) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ const PluginBlockSettingsMenuItem = ( { allowedBlocks, icon, label, onClick, sma
return null;
}
return ( <MenuItem
className="editor-block-settings-menu__control block-editor-block-settings-menu__control"
onClick={ compose( onClick, onClose ) }
icon={ icon || 'admin-plugins' }
label={ small ? label : undefined }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export function BlockInspectorButton( {

return (
<MenuItem
className="block-editor-block-settings-menu__control"
onClick={ () => {
if ( areAdvancedSettingsOpened ) {
closeGeneralSidebar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export function ConvertToGroupButton( {
<Fragment>
{ isGroupable && (
<MenuItem
className="editor-block-settings-menu__control block-editor-block-settings-menu__control"
icon={ Group }
onClick={ onConvertToGroup }
>
Expand All @@ -37,7 +36,6 @@ export function ConvertToGroupButton( {
) }
{ isUngroupable && (
<MenuItem
className="editor-block-settings-menu__control block-editor-block-settings-menu__control"
icon={ Ungroup }
onClick={ onConvertFromGroup }
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export function ReusableBlockConvertButton( {
<>
{ ! isReusable && (
<MenuItem
className="editor-block-settings-menu__control block-editor-block-settings-menu__control"
icon="controls-repeat"
onClick={ onConvertToReusable }
>
Expand All @@ -35,7 +34,6 @@ export function ReusableBlockConvertButton( {
) }
{ isReusable && (
<MenuItem
className="editor-block-settings-menu__control block-editor-block-settings-menu__control"
icon="controls-repeat"
onClick={ onConvertToStatic }
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export function ReusableBlockDeleteButton( { isVisible, isDisabled, onDelete } )

return (
<MenuItem
className="editor-block-settings-menu__control block-editor-block-settings-menu__control"
icon="no"
disabled={ isDisabled }
onClick={ () => onDelete() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

exports[`ReusableBlockDeleteButton matches the snapshot 1`] = `
<MenuItem
className="editor-block-settings-menu__control block-editor-block-settings-menu__control"
disabled={false}
icon="no"
onClick={[Function]}
Expand Down
4 changes: 2 additions & 2 deletions packages/format-library/src/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const image = {
{ // Disable reason: KeyPress must be suppressed so the block doesn't hide the toolbar
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ }
<form
className="editor-format-toolbar__image-container-content block-editor-format-toolbar__image-container-content"
className="block-editor-format-toolbar__image-container-content"
onKeyPress={ stopKeyPropagation }
onKeyDown={ this.onKeyDown }
onSubmit={ ( event ) => {
Expand All @@ -147,7 +147,7 @@ export const image = {
} }
>
<TextControl
className="editor-format-toolbar__image-container-value block-editor-format-toolbar__image-container-value"
className="block-editor-format-toolbar__image-container-value"
type="number"
label={ __( 'Width' ) }
value={ this.state.width }
Expand Down
4 changes: 2 additions & 2 deletions packages/format-library/src/link/inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class InlineLinkUI extends Component {
>
{ showInput ? (
<URLPopover.LinkEditor
className="editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content"
className="block-editor-format-toolbar__link-container-content"
value={ inputValue }
onChangeInputValue={ this.onChangeInputValue }
onKeyDown={ this.onKeyDown }
Expand All @@ -221,7 +221,7 @@ class InlineLinkUI extends Component {
/>
) : (
<URLPopover.LinkViewer
className="editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content"
className="block-editor-format-toolbar__link-container-content"
onKeyPress={ stopKeyPropagation }
url={ url }
onEditLinkClick={ this.editLink }
Expand Down