refactor: remove unused highlight option from BarMenu and improve focus styles in block editor (#19184)

This commit is contained in:
Sachin Chaurasiya 2024-12-28 12:40:45 +05:30 committed by GitHub
parent 4f3ae5d083
commit c736f06bbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View File

@ -11,13 +11,12 @@
* limitations under the License.
*/
import classNames from 'classnames';
import { noop, uniqueId } from 'lodash';
import { uniqueId } from 'lodash';
import React, { FC, Fragment } from 'react';
import BlockQuoteIcon from '../../../assets/svg/ic-format-block-quote.svg';
import BoldIcon from '../../../assets/svg/ic-format-bold.svg';
import UnorderedListIcon from '../../../assets/svg/ic-format-bullet-list.svg';
import CodeBlockIcon from '../../../assets/svg/ic-format-code-block.svg';
import HighlightIcon from '../../../assets/svg/ic-format-highlight.svg';
import HorizontalLineIcon from '../../../assets/svg/ic-format-horizontal-line.svg';
import ImageIcon from '../../../assets/svg/ic-format-image-inline.svg';
import InlineCodeIcon from '../../../assets/svg/ic-format-inline-code.svg';
@ -57,12 +56,6 @@ const BarMenu: FC<BarMenuProps> = ({ editor, onLinkToggle }) => {
command: () => editor.chain().focus().toggleCode().run(),
isActive: () => editor.isActive('code'),
},
{
name: 'highlight',
icon: HighlightIcon,
command: () => noop,
isActive: () => editor.isActive('highlight'),
},
],
[
{

View File

@ -219,6 +219,14 @@
}
}
&.block-editor-wrapper--bubble-menu {
.om-block-editor {
&:focus-visible {
outline: none;
}
}
}
// if contenteditable is false, remove padding-bottom from last p tag
.om-block-editor[contenteditable='false'] {
> p:last-child {