From c736f06bbe4023f7e6d931944890883162e7277b Mon Sep 17 00:00:00 2001 From: Sachin Chaurasiya Date: Sat, 28 Dec 2024 12:40:45 +0530 Subject: [PATCH] refactor: remove unused highlight option from BarMenu and improve focus styles in block editor (#19184) --- .../ui/src/components/BlockEditor/BarMenu/BarMenu.tsx | 9 +-------- .../ui/src/components/BlockEditor/block-editor.less | 8 ++++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/BarMenu/BarMenu.tsx b/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/BarMenu/BarMenu.tsx index d718b61cd9e..8c6ff087e2d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/BarMenu/BarMenu.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/BarMenu/BarMenu.tsx @@ -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 = ({ editor, onLinkToggle }) => { command: () => editor.chain().focus().toggleCode().run(), isActive: () => editor.isActive('code'), }, - { - name: 'highlight', - icon: HighlightIcon, - command: () => noop, - isActive: () => editor.isActive('highlight'), - }, ], [ { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/block-editor.less b/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/block-editor.less index 6141fa7ff5b..6dfb77acf42 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/block-editor.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/block-editor.less @@ -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 {