From 71919a3e92e1d3fc5332c4d349b34ebe112ffb39 Mon Sep 17 00:00:00 2001 From: Ash Date: Wed, 18 Sep 2024 21:48:00 +0100 Subject: [PATCH] feat(sanity): add "Copy error details" button to document list error UI --- packages/sanity/src/structure/i18n/resources.ts | 2 -- .../documentList/DocumentListPaneContent.tsx | 15 ++------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/packages/sanity/src/structure/i18n/resources.ts b/packages/sanity/src/structure/i18n/resources.ts index 800fda3727d..be49b3c61e2 100644 --- a/packages/sanity/src/structure/i18n/resources.ts +++ b/packages/sanity/src/structure/i18n/resources.ts @@ -320,8 +320,6 @@ const structureLocaleStrings = defineLocalesResources('structure', { 'panes.document-header-title.new.text': 'New {{schemaType}}', /** The text used in the document header title if no other title can be determined */ 'panes.document-header-title.untitled.text': 'Untitled', - /** The text for the retry button on the document list pane */ - 'panes.document-list-pane.error.retry-button.text': 'Retry', /** The error text on the document list pane */ 'panes.document-list-pane.error.text': 'Error: {{error}}', /** The error title on the document list pane */ diff --git a/packages/sanity/src/structure/panes/documentList/DocumentListPaneContent.tsx b/packages/sanity/src/structure/panes/documentList/DocumentListPaneContent.tsx index b3e81cabc11..30d34900fb6 100644 --- a/packages/sanity/src/structure/panes/documentList/DocumentListPaneContent.tsx +++ b/packages/sanity/src/structure/panes/documentList/DocumentListPaneContent.tsx @@ -1,10 +1,10 @@ -import {SyncIcon} from '@sanity/icons' import {type SanityDocument} from '@sanity/types' import {Box, Container, Flex, Heading, Stack, Text} from '@sanity/ui' import {useCallback, useEffect, useMemo, useState} from 'react' import { CommandList, type CommandListRenderItemCallback, + ErrorActions, type GeneralPreviewLayoutKey, getPublishedId, LoadingBlock, @@ -15,7 +15,6 @@ import { } from 'sanity' import {styled} from 'styled-components' -import {Button} from '../../../ui-components' import {Delay, PaneContent, PaneItem, usePane, usePaneLayout} from '../../components' import {structureLocaleNamespace} from '../../i18n' import {FULL_LIST_LIMIT} from './constants' @@ -198,17 +197,7 @@ export function DocumentListPaneContent(props: DocumentListPaneContentProps) { components={{Code: ({children}) => {children}}} /> - - {onRetry && ( - -