diff --git a/packages/sanity/src/core/create/components/CreateLinkedDocumentBannerContent.tsx b/packages/sanity/src/core/create/components/CreateLinkedDocumentBannerContent.tsx index 0eb003c1b62..5d1e7230c1f 100644 --- a/packages/sanity/src/core/create/components/CreateLinkedDocumentBannerContent.tsx +++ b/packages/sanity/src/core/create/components/CreateLinkedDocumentBannerContent.tsx @@ -13,7 +13,7 @@ import { import {useCallback, useRef, useState} from 'react' import {Button, Popover} from '../../../ui-components' -import {Translate, useTranslation} from '../../i18n' +import {useTranslation} from '../../i18n' import {createLocaleNamespace} from '../i18n' import {type CreateLinkedDocumentBannerContentProps} from '../types' import {CreateLearnMoreButton} from './CreateLearnMoreButton' @@ -61,9 +61,7 @@ export function CreateLinkedDocumentBannerContent(props: CreateLinkedDocumentBan {t('create-link-info-popover.header')} - - - + {t('create-link-info-popover.text')} @@ -73,15 +71,17 @@ export function CreateLinkedDocumentBannerContent(props: CreateLinkedDocumentBan ) return ( - - - - - - - {t('studio-create-link-banner.text')} + + + + - + + + {t('studio-create-link-banner.text')} + + + diff --git a/packages/sanity/src/core/create/components/CreateUnlinkConfirmDialog.tsx b/packages/sanity/src/core/create/components/CreateUnlinkConfirmDialog.tsx index e6483d155b7..61bfcc96239 100644 --- a/packages/sanity/src/core/create/components/CreateUnlinkConfirmDialog.tsx +++ b/packages/sanity/src/core/create/components/CreateUnlinkConfirmDialog.tsx @@ -1,7 +1,7 @@ -import {Flex, Stack, Text} from '@sanity/ui' +import {Stack, Text} from '@sanity/ui' import {useCallback, useId, useState} from 'react' -import {Button, Dialog} from '../../../ui-components' +import {Dialog} from '../../../ui-components' import {PatchEvent, unset} from '../../form' import {Translate, useTranslation} from '../../i18n' import {createLocaleNamespace} from '../i18n' @@ -30,8 +30,24 @@ export function CreateUnlinkConfirmDialog(props: CreateUnlinkConfirmDialogProps) }, [onDocumentChange, telemetry]) return ( - - + + {t('unlink-from-create-dialog.second-paragraph')} - - - ) diff --git a/packages/sanity/src/core/create/i18n/resources.ts b/packages/sanity/src/core/create/i18n/resources.ts index b958a5374c1..6c865db4ecc 100644 --- a/packages/sanity/src/core/create/i18n/resources.ts +++ b/packages/sanity/src/core/create/i18n/resources.ts @@ -10,13 +10,13 @@ const createLocaleStrings = defineLocalesResources('create', { 'start-in-create-action.label': 'Start in Sanity Create', /** Header of the "Start writing in Create" dialog */ - 'start-in-create-dialog.header': 'Start authoring with Sanity Create', + 'start-in-create-dialog.header': 'Start authoring in Sanity Create', /** The lede text in the "Start writing in Create" dialog */ 'start-in-create-dialog.lede': - 'Map your free-form ideas back to the studio as structured content whilst you write.', + 'Author in a free-form editor and have it mapped back to the Studio as structured content, as you type.', /** The details on what "Start writing in Create" implies */ 'start-in-create-dialog.details': - 'This will open Sanity Create in a new window and automatically link this document.', + 'This will open Sanity Create in a new window and automatically link it to this document.', /** CTA in "Start writing in Create" dialog: Continue to create */ 'start-in-create-dialog.cta.continue': 'Continue', /** CTA in "Start writing in Create" dialog: Learn more */ @@ -29,29 +29,30 @@ const createLocaleStrings = defineLocalesResources('create', { /** Header of the "Linking in progress" dialog */ 'linking-in-progress-dialog.header': 'Linking in progress', /** Lede text for the "Linking in progress" dialog */ - 'linking-in-progress-dialog.lede': 'Please continue in the newly opened Sanity Create window.', + 'linking-in-progress-dialog.lede': + 'Please return to Sanity Create. Linking the document should only take a few seconds.', /** Details for the "Linking in progress" dialog */ 'linking-in-progress-dialog.details': - 'On completion, this dialog will automatically close and changes from Sanity Create will appear in this document in real-time.', + 'When complete, this dialog will close and edits made in Sanity Create will start appearing here as they happen.', /** "Linking in progress" troubleshooting button title */ - 'linking-in-progress-dialog.troubleshooting.button.title': 'Link failed?', + 'linking-in-progress-dialog.troubleshooting.button.title': 'Linking taking a while?', /** "Linking in progress" troubleshooting content */ 'linking-in-progress-dialog.troubleshooting.content': - "If you're unable to link to Sanity Create, please confirm that your deployed studio is up to date and you are logged in to both Sanity Studio and Create with the same user account.", + 'Did you close the Sanity Create window? Does the process appear to be stuck? Please reload this page and try again.', /** Text for the document pane banner informing users that the document is linked to Sanity Create */ 'studio-create-link-banner.text': 'This document is linked to Sanity Create', /** Tooltip for Create Link button */ - 'create-link-info.tooltip': 'Sanity Create information', + 'create-link-info.tooltip': 'Learn more', /** Text above header in Create Link info popover */ 'create-link-info-popover.eyebrow-title': 'Sanity Create', /** Text in badge above header in Create Link info popover */ 'create-link-info-popover.eyebrow-badge': 'Beta', /** Header in Create Link info popover */ - 'create-link-info-popover.header': 'Gather. Contextualize. Realize.', + 'create-link-info-popover.header': 'Idea first authoring', /** Informational text in Create Link info popover */ 'create-link-info-popover.text': - 'Map your free-form ideas back to the studio as structured content whilst you write.', + 'Sanity Create lets you author in a free-form editor that automatically maps back to the Studio as structured content - as you type.', /** Edit in Create button text */ 'edit-in-create-button.text': 'Edit in Sanity Create', diff --git a/packages/sanity/src/core/create/start-in-create/StartInCreateAction.tsx b/packages/sanity/src/core/create/start-in-create/StartInCreateAction.tsx index d4f0275be97..804de07e345 100644 --- a/packages/sanity/src/core/create/start-in-create/StartInCreateAction.tsx +++ b/packages/sanity/src/core/create/start-in-create/StartInCreateAction.tsx @@ -16,7 +16,8 @@ import {useStudioAppIdStore} from '../studio-app/useStudioAppIdStore' import {type CreateLinkedSanityDocument} from '../types' import {useSanityCreateTelemetry} from '../useSanityCreateTelemetry' import {CreateLinkingDialog} from './CreateLinkingDialog' -import {StartInCreateDialog} from './StartInCreateDialog' +import {StartInCreateActionContent} from './StartInCreateActionContent' +import {StartInCreateActionFooter} from './StartInCreateActionFooter' export function createStartInCreateAction(appIdCache: AppIdCache): DocumentActionComponent { const StartInCreateActionWrapper: DocumentActionComponent = function StartInCreateActionWrapper( @@ -69,10 +70,9 @@ export function StartInCreateAction( : isDialogOpen && { type: 'dialog', onClose: closeDialog, - header: t('start-in-create-dialog.header'), - width: 'small', - content: ( - , + footer: ( + ), + header: t('start-in-create-dialog.header'), + width: 'small', }, onHandle: () => { if (!isDialogOpen) { diff --git a/packages/sanity/src/core/create/start-in-create/StartInCreateActionContent.tsx b/packages/sanity/src/core/create/start-in-create/StartInCreateActionContent.tsx new file mode 100644 index 00000000000..f0539c472d3 --- /dev/null +++ b/packages/sanity/src/core/create/start-in-create/StartInCreateActionContent.tsx @@ -0,0 +1,21 @@ +import {Stack, Text} from '@sanity/ui' + +import {useTranslation} from '../../i18n' +import {CreateSvg} from '../components/media/CreateSvg' +import {createLocaleNamespace} from '../i18n' + +export function StartInCreateActionContent() { + const {t} = useTranslation(createLocaleNamespace) + + return ( + + + + {t('start-in-create-dialog.lede')} + + + {t('start-in-create-dialog.details')} + + + ) +} diff --git a/packages/sanity/src/core/create/start-in-create/StartInCreateDialog.tsx b/packages/sanity/src/core/create/start-in-create/StartInCreateActionFooter.tsx similarity index 85% rename from packages/sanity/src/core/create/start-in-create/StartInCreateDialog.tsx rename to packages/sanity/src/core/create/start-in-create/StartInCreateActionFooter.tsx index 962f4b4a5d1..8073e2b75c3 100644 --- a/packages/sanity/src/core/create/start-in-create/StartInCreateDialog.tsx +++ b/packages/sanity/src/core/create/start-in-create/StartInCreateActionFooter.tsx @@ -1,17 +1,16 @@ import {LaunchIcon} from '@sanity/icons' import {Checkbox, Flex, Stack, Text, useToast} from '@sanity/ui' import {useCallback, useEffect, useId, useState} from 'react' +import {useTranslation} from 'react-i18next' import {Button} from '../../../ui-components' -import {useTranslation} from '../../i18n' import {useWorkspace} from '../../studio' import {CreateLearnMoreButton} from '../components/CreateLearnMoreButton' -import {CreateSvg} from '../components/media/CreateSvg' import {getCreateLinkUrl} from '../createDocumentUrls' import {createLocaleNamespace} from '../i18n' import {useSanityCreateTelemetry} from '../useSanityCreateTelemetry' -export interface StartInCreateDialogProps { +interface StartInCreateActionFooterProps { createLinkId: string appId: string type: string @@ -19,7 +18,7 @@ export interface StartInCreateDialogProps { autoConfirm: boolean } -export function StartInCreateDialog(props: StartInCreateDialogProps) { +export function StartInCreateActionFooter(props: StartInCreateActionFooterProps) { const {createLinkId, appId, type, onLinkingStarted, autoConfirm} = props const {t} = useTranslation(createLocaleNamespace) const checkboxId = useId() @@ -61,13 +60,6 @@ export function StartInCreateDialog(props: StartInCreateDialogProps) { return ( - - - {t('start-in-create-dialog.lede')} - - - {t('start-in-create-dialog.details')} - diff --git a/packages/sanity/src/core/form/inputs/PortableText/object/BlockObject.tsx b/packages/sanity/src/core/form/inputs/PortableText/object/BlockObject.tsx index a0ec6ed88ef..337268f2efa 100644 --- a/packages/sanity/src/core/form/inputs/PortableText/object/BlockObject.tsx +++ b/packages/sanity/src/core/form/inputs/PortableText/object/BlockObject.tsx @@ -280,16 +280,8 @@ export function BlockObject(props: BlockObjectProps) { ref={memberItem?.elementRef as RefObject | undefined} contentEditable={false} > - - + + } style={debugRender()} > - +