diff --git a/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsCard.tsx b/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsCard.tsx index 099f4a0dd23..01a34276bdb 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsCard.tsx +++ b/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsCard.tsx @@ -81,7 +81,7 @@ interface StudioAnnouncementCardProps { id: string name: string isOpen: boolean - subtitle: string + preHeader: string onCardClick: () => void onCardDismiss: () => void } @@ -95,7 +95,7 @@ export function StudioAnnouncementsCard({ id, isOpen, name, - subtitle, + preHeader, onCardClick, onCardDismiss, }: StudioAnnouncementCardProps) { @@ -139,7 +139,7 @@ export function StudioAnnouncementsCard({ - {subtitle} + {preHeader} diff --git a/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsProvider.tsx b/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsProvider.tsx index 143c6464098..0d72632078d 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsProvider.tsx +++ b/packages/sanity/src/core/studio/studioAnnouncements/StudioAnnouncementsProvider.tsx @@ -140,7 +140,7 @@ export function StudioAnnouncementsProvider({children}: StudioAnnouncementsProvi {children} {unseenAnnouncements.length > 0 && ( ({ const announcementCardProps = { title: 'New Features Available', id: 'foo', - subtitle: "What's new", + preHeader: "What's new", name: 'new-features', } as const @@ -73,16 +73,16 @@ describe('StudioAnnouncementsCard', () => { expect(screen.getByText("What's new")).toBeInTheDocument() expect(screen.getByText(announcementCardProps.title)).toBeInTheDocument() }) - test('renders a different subtitle', async () => { + test('renders a different preHeader', async () => { const onCardClickMock = jest.fn() const onCardDismissMock = jest.fn() - const subtitle = 'Check out the new features' + const preHeader = 'Check out the new features' const wrapper = await createAnnouncementWrapper() render( { {wrapper}, ) - expect(screen.getByText(subtitle)).toBeInTheDocument() + expect(screen.getByText(preHeader)).toBeInTheDocument() expect(screen.getByText(announcementCardProps.title)).toBeInTheDocument() }) test('does not render when isOpen is false', async () => { diff --git a/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsDialog.test.tsx b/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsDialog.test.tsx index b41c262b4e1..a08184cbfca 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsDialog.test.tsx +++ b/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsDialog.test.tsx @@ -31,7 +31,7 @@ const MOCKED_ANNOUNCEMENTS: StudioAnnouncementDocument[] = [ _updatedAt: '', title: 'Announcement 1', name: 'announcement-1', - subtitle: "What's new", + preHeader: "What's new", body: [ { _type: 'block', @@ -72,7 +72,7 @@ const MOCKED_ANNOUNCEMENTS: StudioAnnouncementDocument[] = [ _updatedAt: '', title: 'Announcement 2', name: 'announcement-2', - subtitle: "What's new", + preHeader: "What's new", body: [ { _type: 'block', diff --git a/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsMenuItem.test.tsx b/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsMenuItem.test.tsx index 92bfe2ffafb..718bd861c32 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsMenuItem.test.tsx +++ b/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsMenuItem.test.tsx @@ -34,7 +34,7 @@ const MOCKED_ANNOUNCEMENT: StudioAnnouncementDocument = { publishedDate: '2024-09-10T14:44:00.000Z', audience: 'everyone', name: 'announcement-1', - subtitle: "What's new", + preHeader: "What's new", } const useStudioAnnouncementsMock = useStudioAnnouncements as jest.Mock< typeof useStudioAnnouncements diff --git a/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsProvider.test.tsx b/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsProvider.test.tsx index 54e67c62d85..32b218d77e1 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsProvider.test.tsx +++ b/packages/sanity/src/core/studio/studioAnnouncements/__tests__/StudioAnnouncementsProvider.test.tsx @@ -76,7 +76,7 @@ const mockAnnouncements: StudioAnnouncementDocument[] = [ title: 'Announcement 1', body: [], announcementType: 'whats-new', - subtitle: "What's new", + preHeader: "What's new", publishedDate: '2024-09-10T14:44:00.000Z', audience: 'everyone', name: 'announcement-1', @@ -90,7 +90,7 @@ const mockAnnouncements: StudioAnnouncementDocument[] = [ title: 'Announcement 2', body: [], announcementType: 'whats-new', - subtitle: "What's new", + preHeader: "What's new", publishedDate: '2024-09-10T14:44:00.000Z', audience: 'everyone', name: 'announcement-2', diff --git a/packages/sanity/src/core/studio/studioAnnouncements/types.ts b/packages/sanity/src/core/studio/studioAnnouncements/types.ts index a744132a6cd..28bae67cea7 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/types.ts +++ b/packages/sanity/src/core/studio/studioAnnouncements/types.ts @@ -30,7 +30,7 @@ export interface StudioAnnouncementDocument { | 'below-than-or-equal-version' audienceRole?: AudienceRole[] | undefined studioVersion?: string - subtitle: string + preHeader: string } export interface StudioAnnouncementsContextValue {