Skip to content

Commit

Permalink
fix(core/form/inputs): clean up rebase leftovers (next branch)
Browse files Browse the repository at this point in the history
  • Loading branch information
skogsmaskin committed May 30, 2023
1 parent 121e906 commit 3923b6c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {PortableTextBlock} from '@sanity/types'
import {Path, PortableTextBlock} from '@sanity/types'
import {
EditorChange,
Patch as EditorPatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {PortableTextEditor, usePortableTextEditor} from '@sanity/portable-text-editor'
import {ObjectSchemaType, Path, PortableTextObject} from '@sanity/types'
import {Tooltip} from '@sanity/ui'
import React, {ComponentType, useCallback, useMemo} from 'react'
import React, {ComponentType, useCallback, useMemo, useState} from 'react'
import {isEqual} from '@sanity/util/paths'
import {pathToString} from '../../../../field'
import {BlockAnnotationProps, RenderCustomMarkers} from '../../../types'
import {DefaultMarkers} from '../_legacyDefaultParts/Markers'
Expand Down Expand Up @@ -111,7 +112,7 @@ export function Annotation(props: AnnotationProps) {
const isOpen = Boolean(memberItem?.member.open)
const input = memberItem?.input
const nodePath = memberItem?.node.path || EMPTY_ARRAY
const referenceElement = memberItem?.elementRef?.current
const referenceElement = spanElm

const componentProps = useMemo(
(): BlockAnnotationProps => ({
Expand Down Expand Up @@ -154,7 +155,6 @@ export function Annotation(props: AnnotationProps) {
referenceElement,
schemaType,
selected,
spanElm,
text,
validation,
value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ import {
} from '@sanity/portable-text-editor'
import {ObjectSchemaType, Path, PortableTextBlock, isImage} from '@sanity/types'
import {Tooltip, Flex, ResponsivePaddingProps, Box} from '@sanity/ui'
import React, {ComponentType, PropsWithChildren, useCallback, useMemo, useState} from 'react'
import React, {
ComponentType,
PropsWithChildren,
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from 'react'
import {isEqual} from '@sanity/util/paths'
import {PatchArg} from '../../../patch'
import {BlockProps, RenderCustomMarkers, RenderPreviewCallback} from '../../../types'
import {RenderBlockActionsCallback} from '../types'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const InlineObject = (props: InlineObjectProps) => {
markers,
memberItem?.member,
nodePath,
onItemClose,
onClose,
onOpen,
onPathFocus,
onRemove,
Expand Down

0 comments on commit 3923b6c

Please sign in to comment.