Skip to content

Commit 06924e5

Browse files
committed
Revert "fix(toolbar): use helper to adjust z-index for popups (#544)"
This reverts commit d452b02.
1 parent 503e4c0 commit 06924e5

File tree

6 files changed

+1
-36
lines changed

6 files changed

+1
-36
lines changed

src/bundle/ToolbarView.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import {useLayoutEffect, useRef} from 'react';
33
import type {QAProps} from '@gravity-ui/uikit';
44
import {useUpdate} from 'react-use';
55

6-
import {LAYOUT} from 'src/common/layout';
7-
86
import type {ClassNameProps} from '../classname';
97
import {i18n} from '../i18n/menubar';
108
import {useSticky} from '../react-utils/useSticky';
@@ -67,7 +65,6 @@ export function ToolbarView<T>({
6765
},
6866
[className],
6967
)}
70-
data-layout={LAYOUT.STICKY_TOOLBAR}
7168
>
7269
<FlexToolbar
7370
data={toolbarConfig}

src/bundle/settings/index.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ import {
1515
type QAProps,
1616
} from '@gravity-ui/uikit';
1717

18-
import {LAYOUT} from 'src/common/layout';
19-
import {getTargetZIndex} from 'src/utils/get-target-z-index';
20-
2118
import {type ClassNameProps, cn} from '../../classname';
2219
import {i18n} from '../../i18n/bundle';
2320
import WysiwygModeIcon from '../../icons/WysiwygMode';
@@ -93,7 +90,6 @@ export const EditorSettings = memo<EditorSettingsProps>(function EditorSettings(
9390
anchorElement={chevronElement}
9491
placement={placement}
9592
onOpenChange={hidePopup}
96-
zIndex={getTargetZIndex(LAYOUT.STICKY_TOOLBAR)}
9793
>
9894
<SettingsContent
9995
{...props}
@@ -178,7 +174,6 @@ const SettingsContent: React.FC<SettingsContentProps> = function SettingsContent
178174
popoverProps={{
179175
placement: mdHelpPlacement,
180176
modal: false,
181-
zIndex: getTargetZIndex(LAYOUT.STICKY_TOOLBAR),
182177
}}
183178
className={bContent('mode-help')}
184179
>

src/bundle/toolbar/ToolbarButtonWithPopupMenu.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ import {
1111
type PopupProps,
1212
} from '@gravity-ui/uikit';
1313

14-
import {LAYOUT} from 'src/common/layout';
15-
import {getTargetZIndex} from 'src/utils/get-target-z-index';
16-
1714
import {cn} from '../../classname';
1815
import type {Action} from '../../core';
1916
import {groupBy, isFunction} from '../../lodash';
@@ -130,7 +127,6 @@ export const ToolbarButtonWithPopupMenu: React.FC<ToolbarButtonWithPopupMenuProp
130127
onOpenChange={(open) => {
131128
if (!open) hide();
132129
}}
133-
zIndex={getTargetZIndex(LAYOUT.STICKY_TOOLBAR)}
134130
>
135131
<Menu size="l" qa={qaMenu} data-toolbar-menu-for={textTitle}>
136132
{Object.entries(groups).map(([label, items], key) => {

src/common/layout.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/toolbar/ToolbarListButton.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ import {Fragment, useEffect, useState} from 'react';
33
import {ChevronDown} from '@gravity-ui/icons';
44
import {HelpMark, Hotkey, Icon, Menu, Popover, Popup} from '@gravity-ui/uikit';
55

6-
import {LAYOUT} from 'src/common/layout';
7-
import {getTargetZIndex} from 'src/utils/get-target-z-index';
8-
96
import {cn} from '../classname';
107
import {i18n} from '../i18n/common';
118
import {isFunction} from '../lodash';
@@ -97,12 +94,7 @@ export function ToolbarListButton<E>({
9794
>
9895
{buttonContent}
9996
</ToolbarButtonView>
100-
<Popup
101-
anchorElement={anchorElement}
102-
open={popupOpen}
103-
onOpenChange={hide}
104-
zIndex={getTargetZIndex(LAYOUT.STICKY_TOOLBAR)}
105-
>
97+
<Popup anchorElement={anchorElement} open={popupOpen} onOpenChange={hide}>
10698
<Menu size="l" className={b('menu')} qa={qaMenu} data-toolbar-menu-for={titleText}>
10799
{data
108100
.map((data) => {

src/utils/get-target-z-index.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)