diff --git a/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx b/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx index 5c632a9e74..b0f1859bd6 100644 --- a/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx +++ b/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx @@ -68,9 +68,13 @@ const features = [{ description: '(Highly) Experimental support for ActivityPub.', flag: 'ActivityPub' },{ - title: 'Subhead', - description: 'Using custom excerpts as subheads in editor and newsletter', - flag: 'subhead' + title: 'Subtitle in editor', + description: 'Using custom excerpt as subtitle in editor', + flag: 'editorSubtitle' +},{ + title: 'Subtitle in newsletter', + description: 'Showing subtitle in newsletter', + flag: 'newsletterSubtitle' }]; const AlphaFeatures: React.FC = () => { diff --git a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx index ebb5bf11b4..bf4d768cdf 100644 --- a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx +++ b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx @@ -103,7 +103,7 @@ const Sidebar: React.FC<{ const {mutateAsync: uploadImage} = useUploadImage(); const [selectedTab, setSelectedTab] = useState('generalSettings'); const hasEmailCustomization = useFeatureFlag('emailCustomization'); - const hasSubhead = useFeatureFlag('subhead'); + const hasNewsletterSubtitle = useFeatureFlag('newsletterSubtitle'); const {localSettings} = useSettingGroup(); const [siteTitle] = getSettingValues(localSettings, ['title']) as string[]; const handleError = useHandleError(); @@ -424,11 +424,11 @@ const Sidebar: React.FC<{ title='Body style' onSelect={option => updateNewsletter({body_font_category: option?.value})} /> - {hasSubhead && + {hasNewsletterSubtitle && updateNewsletter({show_subhead: e.target.checked})} /> } diff --git a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx index dbd46cfe59..e5c32a0c87 100644 --- a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx +++ b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx @@ -77,7 +77,7 @@ const NewsletterPreviewContent: React.FC<{ const showHeader = headerIcon || headerTitle; const {config} = useGlobalData(); const hasNewEmailAddresses = useFeatureFlag('newEmailAddresses'); - const hasSubhead = useFeatureFlag('subhead'); + const hasNewsletterSubtitle = useFeatureFlag('newsletterSubtitle'); const currentDate = new Date().toLocaleDateString('default', { year: 'numeric', @@ -134,8 +134,8 @@ const NewsletterPreviewContent: React.FC<{ )} style={{color: titleColor}}> Your email newsletter - {(hasSubhead && showSubhead) && ( -

A subhead that highlights the key points of your newsletter.

+ {(hasNewsletterSubtitle && showSubhead) && ( +

A subtitle that highlights the key points of your newsletter.

)}
- {{#if (feature 'subhead')}} + {{#if (feature 'editorSubtitle')}} {{post.title}} - {{#hasFeature 'subhead'}} + {{#hasFeature 'newsletterSubtitle'}} {{#if newsletter.showSubhead}} - -

Jonathan Haidt wrote a best-selling book about teens and social media. Not everyone buys its thesis.

+ +

Jonathan Haidt wrote a best-selling book about teens and social media. Not everyone buys its thesis.

{{/if}} diff --git a/ghost/email-service/test/email-renderer.test.js b/ghost/email-service/test/email-renderer.test.js index ad0f337d40..c7402c8b11 100644 --- a/ghost/email-service/test/email-renderer.test.js +++ b/ghost/email-service/test/email-renderer.test.js @@ -1995,7 +1995,7 @@ describe('Email renderer', function () { title: 'post-title post-title-serif post-title-left', titleLink: 'post-title-link post-title-link-left', meta: 'post-meta post-meta-left', - subhead: 'post-subhead post-subhead-left', + subtitle: 'post-subtitle post-subtitle-left', body: 'post-content-sans-serif' }); });