Skip to content

Commit

Permalink
fix(pte): updates zoffset for PopoverEditDialog to not be on top of I…
Browse files Browse the repository at this point in the history
…nspectDialog (#5882)

* fix(pte): updates zoffset for PopoverEditDialog to not be on top of InspectDialog

* fix(pte): update to use new default instead of hardcoding zoffset

* fix(core): add missing file
  • Loading branch information
jtpetty authored Mar 8, 2024
1 parent 642224f commit 69b3552
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/sanity/src/core/components/zOffsets/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const defaults: ZIndexContextValue = {
paneHeader: [110, 15000],
paneFooter: [120, 20000],
paneResizer: [130, 25000],
paneDialog: [140, 5000],

//
popover: 200,
Expand Down
1 change: 1 addition & 0 deletions packages/sanity/src/core/components/zOffsets/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface ZIndexContextValue {
paneHeader: number | number[]
paneFooter: number | number[]
paneResizer: number | number[]
paneDialog: number | number[]

/** Used by: EditItemFoldOut, Spinner, ConnectorsOverlay, tippy.css, BaseDateTimeInput */
portal: number | number[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export function DocumentLayout() {
>
<DocumentPanelHeader ref={setHeaderElement} menuItems={menuItems} />

<DialogProvider position={DIALOG_PROVIDER_POSITION} zOffset={zOffsets.portal}>
<DialogProvider position={DIALOG_PROVIDER_POSITION} zOffset={zOffsets.paneDialog}>
<Flex direction="column" flex={1} height={layoutCollapsed ? undefined : 'fill'}>
<StyledChangeConnectorRoot
data-testid="change-connector-root"
Expand Down

0 comments on commit 69b3552

Please sign in to comment.