From 9ca1f3ce249176704546e44a4aa9fc8b747fae42 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 5 Jun 2024 17:59:30 +0100 Subject: [PATCH] Renamed subtitle to excerpt (#20334) no issue We've settled on using "excerpt" naming in place of "subtitle" to better reflect the underlying property name and tie in with themes and historical usage. - added migration to rename the `show_subtitle` newsletter setting to `show_excerpt` - renamed all places in the codebase that referenced subtitle --- apps/admin-x-framework/src/api/newsletters.ts | 2 +- .../src/test/responses/newsletters.json | 2 +- .../settings/advanced/labs/AlphaFeatures.tsx | 12 +- .../newsletters/NewsletterDetailModal.tsx | 10 +- .../email/newsletters/NewsletterPreview.tsx | 2 +- .../newsletters/NewsletterPreviewContent.tsx | 20 +- .../components/gh-koenig-editor-lexical.hbs | 16 +- .../components/gh-koenig-editor-lexical.js | 18 +- .../app/components/gh-post-settings-menu.hbs | 2 +- .../app/components/modal-post-history.hbs | 4 +- .../app/components/modals/restore-revision.js | 2 +- ghost/admin/app/controllers/lexical-editor.js | 4 +- ghost/admin/app/models/newsletter.js | 2 +- ghost/admin/app/services/feature.js | 4 +- ghost/admin/app/styles/app-dark.css | 4 +- ghost/admin/app/styles/layouts/editor.css | 8 +- ghost/admin/app/validators/post.js | 4 +- ghost/admin/tests/acceptance/editor-test.js | 40 ++-- .../acceptance/editor/post-revisions-test.js | 30 +-- ...-48-35-rename-newsletters-show-subtitle.js | 3 + ghost/core/core/server/data/schema/schema.js | 2 +- ghost/core/core/server/models/newsletter.js | 2 +- ghost/core/core/shared/labs.js | 4 +- .../admin/__snapshots__/members.test.js.snap | 2 +- .../__snapshots__/newsletters.test.js.snap | 218 +++++++++--------- .../unit/server/data/schema/integrity.test.js | 2 +- ghost/email-service/lib/EmailRenderer.js | 10 +- .../email-templates/partials/styles-old.hbs | 12 +- .../lib/email-templates/template-old.hbs | 8 +- .../email-service/test/email-renderer.test.js | 30 +-- 30 files changed, 241 insertions(+), 238 deletions(-) create mode 100644 ghost/core/core/server/data/migrations/versions/5.84/2024-06-05-13-48-35-rename-newsletters-show-subtitle.js diff --git a/apps/admin-x-framework/src/api/newsletters.ts b/apps/admin-x-framework/src/api/newsletters.ts index 6e6bd102ed..b74f8cbbbb 100644 --- a/apps/admin-x-framework/src/api/newsletters.ts +++ b/apps/admin-x-framework/src/api/newsletters.ts @@ -21,7 +21,7 @@ export type Newsletter = { show_header_title: boolean; title_font_category: string; title_alignment: string; - show_subtitle: boolean; + show_excerpt: boolean; show_feature_image: boolean; body_font_category: string; footer_content: string | null; diff --git a/apps/admin-x-framework/src/test/responses/newsletters.json b/apps/admin-x-framework/src/test/responses/newsletters.json index 179e57b9f6..7c94e4ccea 100644 --- a/apps/admin-x-framework/src/test/responses/newsletters.json +++ b/apps/admin-x-framework/src/test/responses/newsletters.json @@ -19,7 +19,7 @@ "show_header_title": true, "title_font_category": "serif", "title_alignment": "center", - "show_subtitle": true, + "show_excerpt": true, "show_feature_image": true, "body_font_category": "serif", "footer_content": "", 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 489276944c..4950480925 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,13 +68,13 @@ const features = [{ description: '(Highly) Experimental support for ActivityPub.', flag: 'ActivityPub' },{ - title: 'Subtitle in editor', - description: 'Using custom excerpt as subtitle in editor', - flag: 'editorSubtitle' + title: 'Show post excerpt inline', + description: 'Adds the excerpt input below the post title in the editor', + flag: 'editorExcerpt' },{ - title: 'Subtitle in newsletter', - description: 'Showing subtitle in newsletter', - flag: 'newsletterSubtitle' + title: 'Excerpt in newsletter', + description: 'Showing excerpt in newsletter', + flag: 'newsletterExcerpt' }]; 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 139920ac3b..d89ae8a92a 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,8 +103,8 @@ const Sidebar: React.FC<{ const {mutateAsync: uploadImage} = useUploadImage(); const [selectedTab, setSelectedTab] = useState('generalSettings'); const hasEmailCustomization = useFeatureFlag('emailCustomization'); - const hasNewsletterSubtitle = useFeatureFlag('newsletterSubtitle'); - const hasEditorSubtitle = useFeatureFlag('editorSubtitle'); + const hasNewsletterExcerpt = useFeatureFlag('newsletterExcerpt'); + const hasEditorSubtitle = useFeatureFlag('editorExcerpt'); const {localSettings} = useSettingGroup(); const [siteTitle] = getSettingValues(localSettings, ['title']) as string[]; const handleError = useHandleError(); @@ -419,12 +419,12 @@ const Sidebar: React.FC<{ onChange={color => updateNewsletter({title_color: color})} />} - {(hasNewsletterSubtitle && newsletter.show_post_title_section) && + {(hasNewsletterExcerpt && newsletter.show_post_title_section) && updateNewsletter({show_subtitle: e.target.checked})} + onChange={e => updateNewsletter({show_excerpt: e.target.checked})} /> } = ({newsletter}) => senderReplyTo={renderReplyToEmail(newsletter, config, supportEmailAddress, defaultEmailAddress)} showBadge={newsletter.show_badge} showCommentCta={showCommentCta} + showExcerpt={newsletter.show_excerpt} showFeatureImage={newsletter.show_feature_image} showFeedback={showFeedback} showLatestPosts={newsletter.show_latest_posts} showPostTitleSection={newsletter.show_post_title_section} showSubscriptionDetails={newsletter.show_subscription_details} - showSubtitle={newsletter.show_subtitle} siteTitle={title} titleAlignment={newsletter.title_alignment} titleFontCategory={newsletter.title_font_category} 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 d17c98b8d3..af6b10886d 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 @@ -18,7 +18,7 @@ const NewsletterPreviewContent: React.FC<{ headerTitle?: string | null; headerSubtitle?: string | null; showPostTitleSection: boolean; - showSubtitle: boolean; + showExcerpt: boolean; titleAlignment?: string; titleFontCategory?: string; bodyFontCategory?: string; @@ -50,7 +50,7 @@ const NewsletterPreviewContent: React.FC<{ headerTitle, headerSubtitle, showPostTitleSection, - showSubtitle, + showExcerpt, titleAlignment, titleFontCategory, bodyFontCategory, @@ -77,7 +77,7 @@ const NewsletterPreviewContent: React.FC<{ const showHeader = headerIcon || headerTitle; const {config} = useGlobalData(); const hasNewEmailAddresses = useFeatureFlag('newEmailAddresses'); - const hasNewsletterSubtitle = useFeatureFlag('newsletterSubtitle'); + const hasNewsletterExcerpt = useFeatureFlag('newsletterExcerpt'); const currentDate = new Date().toLocaleDateString('default', { year: 'numeric', @@ -101,16 +101,16 @@ const NewsletterPreviewContent: React.FC<{

To: Jamie Larson jamie@example.com

; } - let subtitleClasses = 'mb-5 text-pretty leading-[1.7] text-black'; + let excerptClasses = 'mb-5 text-pretty leading-[1.7] text-black'; if (titleFontCategory === 'serif' && bodyFontCategory === 'serif') { - subtitleClasses = clsx(subtitleClasses, 'font-serif text-[1.8rem]'); + excerptClasses = clsx(excerptClasses, 'font-serif text-[1.8rem]'); } else if (titleFontCategory !== 'serif' && bodyFontCategory === 'serif') { - subtitleClasses = clsx(subtitleClasses, 'text-[1.7rem] tracking-tight'); + excerptClasses = clsx(excerptClasses, 'text-[1.7rem] tracking-tight'); } else if (titleFontCategory === 'serif' && bodyFontCategory !== 'serif') { - subtitleClasses = clsx(subtitleClasses, 'font-serif text-[1.8rem]'); + excerptClasses = clsx(excerptClasses, 'font-serif text-[1.8rem]'); } else { - subtitleClasses = clsx(subtitleClasses, 'text-[1.7rem] tracking-tight'); + excerptClasses = clsx(excerptClasses, 'text-[1.7rem] tracking-tight'); } return ( @@ -146,8 +146,8 @@ const NewsletterPreviewContent: React.FC<{ )} style={{color: titleColor}}> Your email newsletter - {(hasNewsletterSubtitle && showSubtitle) && ( -

A subtitle to highlight key points and engage your readers

+ {(hasNewsletterExcerpt && showExcerpt) && ( +

A subtitle to highlight key points and engage your readers

)}
- {{#if (feature 'editorSubtitle')}} + {{#if (feature 'editorExcerpt')}}
{{#if @excerptHasTk}}
TK @@ -82,7 +82,7 @@ {{/if}}
{{#if @excerptErrorMessage}} -
+
{{@excerptErrorMessage}}
{{/if}} @@ -96,7 +96,7 @@ @cardConfig={{@cardOptions}} @onChange={{@onBodyChange}} @registerAPI={{this.registerEditorAPI}} - @cursorDidExitAtTop={{if this.feature.editorSubtitle this.focusSubtitle this.focusTitle}} + @cursorDidExitAtTop={{if this.feature.editorExcerpt this.focusSubtitle this.focusTitle}} @updateWordCount={{@updateWordCount}} @updatePostTkCount={{@updatePostTkCount}} /> diff --git a/ghost/admin/app/components/gh-koenig-editor-lexical.js b/ghost/admin/app/components/gh-koenig-editor-lexical.js index 2cff08ec4f..4521b5fa74 100644 --- a/ghost/admin/app/components/gh-koenig-editor-lexical.js +++ b/ghost/admin/app/components/gh-koenig-editor-lexical.js @@ -10,7 +10,7 @@ export default class GhKoenigEditorReactComponent extends Component { containerElement = null; titleElement = null; - subtitleElement = null; + excerptElement = null; mousedownY = 0; uploadUrl = `${ghostPaths().apiRoot}/images/upload/`; @@ -114,8 +114,8 @@ export default class GhKoenigEditorReactComponent extends Component { @action onTitleKeydown(event) { - if (this.feature.get('editorSubtitle')) { - // move cursor to the subtitle on + if (this.feature.get('editorExcerpt')) { + // move cursor to the excerpt on // - Tab (handled by browser) // - Arrow Down/Right when input is empty or caret at end of input // - Enter @@ -124,7 +124,7 @@ export default class GhKoenigEditorReactComponent extends Component { if (key === 'Enter') { event.preventDefault(); - this.subtitleElement?.focus(); + this.excerptElement?.focus(); } if ((key === 'ArrowDown' || key === 'ArrowRight') && !event.shiftKey) { @@ -132,7 +132,7 @@ export default class GhKoenigEditorReactComponent extends Component { if (couldLeaveTitle) { event.preventDefault(); - this.subtitleElement?.focus(); + this.excerptElement?.focus(); } } } else { @@ -167,17 +167,17 @@ export default class GhKoenigEditorReactComponent extends Component { // Subtitle ("excerpt") Actions ------------------------------------------- @action - registerSubtitleElement(element) { - this.subtitleElement = element; + excerptSubtitleElement(element) { + this.excerptElement = element; } @action focusSubtitle() { - this.subtitleElement?.focus(); + this.excerptElement?.focus(); // timeout ensures this occurs after the keyboard events setTimeout(() => { - this.subtitleElement?.setSelectionRange(-1, -1); + this.excerptElement?.setSelectionRange(-1, -1); }, 0); } diff --git a/ghost/admin/app/components/gh-post-settings-menu.hbs b/ghost/admin/app/components/gh-post-settings-menu.hbs index 99c9aa24b5..1d01dcc5bc 100644 --- a/ghost/admin/app/components/gh-post-settings-menu.hbs +++ b/ghost/admin/app/components/gh-post-settings-menu.hbs @@ -93,7 +93,7 @@ {{/if}} {{/if}} - {{#unless (feature 'editorSubtitle')}} + {{#unless (feature 'editorExcerpt')}} {{this.currentTitle}}
- {{#if (feature "editorSubtitle")}} -
+ {{#if (feature "editorExcerpt")}} +
{{this.selectedRevision.custom_excerpt}}

diff --git a/ghost/admin/app/components/modals/restore-revision.js b/ghost/admin/app/components/modals/restore-revision.js index 69ef9c3d62..81981d2eb1 100644 --- a/ghost/admin/app/components/modals/restore-revision.js +++ b/ghost/admin/app/components/modals/restore-revision.js @@ -39,7 +39,7 @@ export default class RestoreRevisionModal extends Component { post.featureImageAlt = revision.feature_image_alt; post.featureImageCaption = revision.feature_image_caption; - if (this.feature.editorSubtitle) { + if (this.feature.editorExcerpt) { post.customExcerpt = revision.custom_excerpt; } diff --git a/ghost/admin/app/controllers/lexical-editor.js b/ghost/admin/app/controllers/lexical-editor.js index 071f44747e..a472228884 100644 --- a/ghost/admin/app/controllers/lexical-editor.js +++ b/ghost/admin/app/controllers/lexical-editor.js @@ -272,7 +272,7 @@ export default class LexicalEditorController extends Controller { @computed('post.customExcerpt') get excerptHasTk() { - if (!this.feature.editorSubtitle) { + if (!this.feature.editorExcerpt) { return false; } @@ -282,7 +282,7 @@ export default class LexicalEditorController extends Controller { @computed('titleHasTk', 'excerptHasTk', 'postTkCount', 'featureImageTkCount') get tkCount() { const titleTk = this.titleHasTk ? 1 : 0; - const excerptTk = (this.feature.editorSubtitle && this.excerptHasTk) ? 1 : 0; + const excerptTk = (this.feature.editorExcerpt && this.excerptHasTk) ? 1 : 0; return titleTk + excerptTk + this.postTkCount + this.featureImageTkCount; } diff --git a/ghost/admin/app/models/newsletter.js b/ghost/admin/app/models/newsletter.js index e8257a3ef2..041b10f500 100644 --- a/ghost/admin/app/models/newsletter.js +++ b/ghost/admin/app/models/newsletter.js @@ -24,7 +24,7 @@ export default class Newsletter extends Model.extend(ValidationEngine) { @attr({defaultValue: true}) showHeaderTitle; @attr({defaultValue: true}) showHeaderName; @attr({defaultValue: true}) showPostTitleSection; - @attr({defaultValue: false}) showSubtitle; + @attr({defaultValue: false}) showExcerpt; @attr({defaultValue: true}) showCommentCta; @attr({defaultValue: false}) showSubscriptionDetails; @attr({defaultValue: false}) showLatestPosts; diff --git a/ghost/admin/app/services/feature.js b/ghost/admin/app/services/feature.js index 34727a51d9..f9c6010f5d 100644 --- a/ghost/admin/app/services/feature.js +++ b/ghost/admin/app/services/feature.js @@ -84,8 +84,8 @@ export default class FeatureService extends Service { @feature('ActivityPub') ActivityPub; @feature('internalLinking') internalLinking; @feature('internalLinkingAtLinks') internalLinkingAtLinks; - @feature('editorSubtitle') editorSubtitle; - @feature('newsletterSubtitle') newsletterSubtitle; + @feature('editorExcerpt') editorExcerpt; + @feature('newsletterExcerpt') newsletterExcerpt; _user = null; diff --git a/ghost/admin/app/styles/app-dark.css b/ghost/admin/app/styles/app-dark.css index 354e3e1fe2..a6f40e77ff 100644 --- a/ghost/admin/app/styles/app-dark.css +++ b/ghost/admin/app/styles/app-dark.css @@ -745,7 +745,7 @@ input:focus, /* Editor */ .gh-editor-title, -.gh-editor-subtitle { +.gh-editor-excerpt { background: var(--white); } @@ -1435,4 +1435,4 @@ Onboarding checklist: Share publication modal */ .gh-sidebar-banner.gh-error-banner { background: var(--lightgrey-d1); -} \ No newline at end of file +} diff --git a/ghost/admin/app/styles/layouts/editor.css b/ghost/admin/app/styles/layouts/editor.css index 1919cb5eee..42914d25d0 100644 --- a/ghost/admin/app/styles/layouts/editor.css +++ b/ghost/admin/app/styles/layouts/editor.css @@ -788,7 +788,7 @@ body[data-user-is-dragging] .gh-editor-feature-image-dropzone { height: 2.4rem; } -.gh-editor-subtitle { +.gh-editor-excerpt { display: block; width: 100%; max-width: unset; @@ -807,12 +807,12 @@ body[data-user-is-dragging] .gh-editor-feature-image-dropzone { box-shadow: none; } -.gh-editor-subtitle:focus { +.gh-editor-excerpt:focus { box-shadow: none !important; border: none !important; } -.gh-editor-subtitle-error { +.gh-editor-excerpt-error { margin-top: .8rem; margin-bottom: 4.8rem; color: var(--red-d1); @@ -840,7 +840,7 @@ body[data-user-is-dragging] .gh-editor-feature-image-dropzone { cursor: pointer; } -.gh-editor .tk-indicator-subtitle { +.gh-editor .tk-indicator-excerpt { top: -1px; } diff --git a/ghost/admin/app/validators/post.js b/ghost/admin/app/validators/post.js index ee4f39bb21..f157e4d2f6 100644 --- a/ghost/admin/app/validators/post.js +++ b/ghost/admin/app/validators/post.js @@ -62,8 +62,8 @@ export default BaseValidator.create({ customExcerpt(model) { if (!validator.isLength(model.customExcerpt || '', 0, 300)) { - if (model.feature.editorSubtitle) { - model.errors.add('customExcerpt', 'Subtitle cannot be longer than 300 characters.'); + if (model.feature.editorExcerpt) { + model.errors.add('customExcerpt', 'Excerpt cannot be longer than 300 characters.'); } else { model.errors.add('customExcerpt', 'Excerpt cannot be longer than 300 characters.'); } diff --git a/ghost/admin/tests/acceptance/editor-test.js b/ghost/admin/tests/acceptance/editor-test.js index 45af936aa9..8e1ce1176f 100644 --- a/ghost/admin/tests/acceptance/editor-test.js +++ b/ghost/admin/tests/acceptance/editor-test.js @@ -492,19 +492,19 @@ describe('Acceptance: Editor', function () { }); it('handles in-editor excerpt update and validation', async function () { - enableLabsFlag(this.server, 'editorSubtitle'); + enableLabsFlag(this.server, 'editorExcerpt'); let post = this.server.create('post', {authors: [author], customExcerpt: 'Existing excerpt'}); await visit(`/editor/post/${post.id}`); - expect(find('[data-test-textarea="subtitle"]'), 'initial textarea').to.be.visible; - expect(find('[data-test-textarea="subtitle"]'), 'initial textarea').to.have.value('Existing excerpt'); + expect(find('[data-test-textarea="excerpt"]'), 'initial textarea').to.be.visible; + expect(find('[data-test-textarea="excerpt"]'), 'initial textarea').to.have.value('Existing excerpt'); - await fillIn('[data-test-textarea="subtitle"]', 'New excerpt'); - expect(find('[data-test-textarea="subtitle"]'), 'updated textarea').to.have.value('New excerpt'); + await fillIn('[data-test-textarea="excerpt"]', 'New excerpt'); + expect(find('[data-test-textarea="excerpt"]'), 'updated textarea').to.have.value('New excerpt'); - await triggerEvent('[data-test-textarea="subtitle"]', 'keydown', { + await triggerEvent('[data-test-textarea="excerpt"]', 'keydown', { key: 's', keyCode: 83, // s metaKey: ctrlOrCmd === 'command', @@ -513,14 +513,14 @@ describe('Acceptance: Editor', function () { expect(post.customExcerpt, 'saved excerpt').to.equal('New excerpt'); - await fillIn('[data-test-textarea="subtitle"]', Array(302).join('a')); + await fillIn('[data-test-textarea="excerpt"]', Array(302).join('a')); - expect(find('[data-test-error="subtitle"]'), 'subtitle error').to.exist; - expect(find('[data-test-error="subtitle"]')).to.have.trimmed.text('Subtitle cannot be longer than 300 characters.'); + expect(find('[data-test-error="excerpt"]'), 'excerpt error').to.exist; + expect(find('[data-test-error="excerpt"]')).to.have.trimmed.text('Excerpt cannot be longer than 300 characters.'); - await fillIn('[data-test-textarea="subtitle"]', Array(300).join('a')); + await fillIn('[data-test-textarea="excerpt"]', Array(300).join('a')); - expect(find('[data-test-error="subtitle"]'), 'subtitle error').to.not.exist; + expect(find('[data-test-error="excerpt"]'), 'excerpt error').to.not.exist; }); // https://github.com/TryGhost/Ghost/issues/11786 @@ -636,28 +636,28 @@ describe('Acceptance: Editor', function () { ).to.exist; }); - it('handles TKs in subtitle', async function () { - enableLabsFlag(this.server, 'editorSubtitle'); + it('handles TKs in excerpt', async function () { + enableLabsFlag(this.server, 'editorExcerpt'); const post = this.server.create('post', {authors: [author]}); await visit(`/editor/post/${post.id}`); expect( - find('[data-test-textarea="subtitle"]').value, - 'initial subtitle' + find('[data-test-textarea="excerpt"]').value, + 'initial excerpt' ).to.equal(''); - await fillIn('[data-test-textarea="subtitle"]', 'Test TK subtitle'); + await fillIn('[data-test-textarea="excerpt"]', 'Test TK excerpt'); expect( - find('[data-test-textarea="subtitle"]').value, - 'subtitle after typing' - ).to.equal('Test TK subtitle'); + find('[data-test-textarea="excerpt"]').value, + 'excerpt after typing' + ).to.equal('Test TK excerpt'); // check for TK indicator expect( - find('[data-testid="tk-indicator-subtitle"]'), + find('[data-testid="tk-indicator-excerpt"]'), 'TK indicator text' ).to.exist; diff --git a/ghost/admin/tests/acceptance/editor/post-revisions-test.js b/ghost/admin/tests/acceptance/editor/post-revisions-test.js index 13c97ec0c3..fc2ce08864 100644 --- a/ghost/admin/tests/acceptance/editor/post-revisions-test.js +++ b/ghost/admin/tests/acceptance/editor/post-revisions-test.js @@ -26,7 +26,7 @@ describe('Acceptance: Post revisions', function () { this.server.create('post-revision', { post, title: post.title, - customExcerpt: 'New subtitle', + customExcerpt: 'New excerpt', featureImage: 'https://example.com/new-image.jpg', featureImageAlt: 'New feature alt text', featureImageCaption: 'New feature caption', @@ -38,7 +38,7 @@ describe('Acceptance: Post revisions', function () { this.server.create('post-revision', { post, title: 'Old Title', - customExcerpt: 'Old subtitle', + customExcerpt: 'Old excerpt', featureImage: 'https://example.com/old-image.jpg', featureImageAlt: 'Old feature alt text', featureImageCaption: 'Old feature caption', @@ -70,8 +70,8 @@ describe('Acceptance: Post revisions', function () { expect(find('[data-test-post-history-preview-feature-image]')).to.have.attribute('alt', 'New feature alt text'); expect(find('[data-test-post-history-preview-feature-image-caption]')).to.have.trimmed.text('New feature caption'); - // subtitle is not visible (needs feature flag) - expect(find('[data-test-post-history-preview-subtitle]')).to.not.exist; + // excerpt is not visible (needs feature flag) + expect(find('[data-test-post-history-preview-excerpt]')).to.not.exist; // previous post can be previewed await click('[data-test-revision-item="1"] [data-test-button="preview-revision"]'); @@ -90,22 +90,22 @@ describe('Acceptance: Post revisions', function () { expect(post.attrs.featureImageAlt).to.equal('Old feature alt text'); expect(post.attrs.featureImageCaption).to.equal('Old feature caption'); - // subtitle (customExcerpt) is not restored (needs feature flag) + // excerpt (customExcerpt) is not restored (needs feature flag) expect(post.attrs.customExcerpt).to.equal('Current excerpt'); }); - it('can preview and restore subtitle (with editorSubtitle feature flag)', async function () { - enableLabsFlag(this.server, 'editorSubtitle'); + it('can preview and restore excerpt (with editorExcerpt feature flag)', async function () { + enableLabsFlag(this.server, 'editorExcerpt'); const post = this.server.create('post', { title: 'Current Title', - customExcerpt: 'Current subtitle', + customExcerpt: 'Current excerpt', status: 'draft' }); this.server.create('post-revision', { post, title: post.title, - customExcerpt: 'New subtitle', + customExcerpt: 'New excerpt', postStatus: 'draft', author: post.authors.models[0], createdAt: moment(post.updatedAt).subtract(1, 'hour'), @@ -114,7 +114,7 @@ describe('Acceptance: Post revisions', function () { this.server.create('post-revision', { post, title: 'Old Title', - customExcerpt: 'Old subtitle', + customExcerpt: 'Old excerpt', postStatus: 'draft', author: post.authors.models[0], createdAt: moment(post.updatedAt).subtract(1, 'day'), @@ -127,19 +127,19 @@ describe('Acceptance: Post revisions', function () { await click('[data-test-psm-trigger]'); await click('[data-test-toggle="post-history"]'); - // subtitle is visible - expect(find('[data-test-post-history-preview-subtitle]')).to.exist; - expect(find('[data-test-post-history-preview-subtitle]')).to.have.trimmed.text('New subtitle'); + // excerpt is visible + expect(find('[data-test-post-history-preview-excerpt]')).to.exist; + expect(find('[data-test-post-history-preview-excerpt]')).to.have.trimmed.text('New excerpt'); // previous post can be previewed await click('[data-test-revision-item="1"] [data-test-button="preview-revision"]'); - expect(find('[data-test-post-history-preview-subtitle]')).to.have.trimmed.text('Old subtitle'); + expect(find('[data-test-post-history-preview-excerpt]')).to.have.trimmed.text('Old excerpt'); // previous post can be restored await click('[data-test-revision-item="1"] [data-test-button="restore-revision"]'); await click('[data-test-modal="restore-revision"] [data-test-button="restore"]'); // post has been saved with correct data - expect(post.attrs.customExcerpt).to.equal('Old subtitle'); + expect(post.attrs.customExcerpt).to.equal('Old excerpt'); }); }); diff --git a/ghost/core/core/server/data/migrations/versions/5.84/2024-06-05-13-48-35-rename-newsletters-show-subtitle.js b/ghost/core/core/server/data/migrations/versions/5.84/2024-06-05-13-48-35-rename-newsletters-show-subtitle.js new file mode 100644 index 0000000000..8a91ffcad8 --- /dev/null +++ b/ghost/core/core/server/data/migrations/versions/5.84/2024-06-05-13-48-35-rename-newsletters-show-subtitle.js @@ -0,0 +1,3 @@ +const {createRenameColumnMigration} = require('../../utils'); + +module.exports = createRenameColumnMigration('newsletters', 'show_subtitle', 'show_excerpt'); diff --git a/ghost/core/core/server/data/schema/schema.js b/ghost/core/core/server/data/schema/schema.js index 4b74db297c..cd08c4b0f4 100644 --- a/ghost/core/core/server/data/schema/schema.js +++ b/ghost/core/core/server/data/schema/schema.js @@ -30,7 +30,7 @@ module.exports = { header_image: {type: 'string', maxlength: 2000, nullable: true}, show_header_icon: {type: 'boolean', nullable: false, defaultTo: true}, show_header_title: {type: 'boolean', nullable: false, defaultTo: true}, - show_subtitle: {type: 'boolean', nullable: false, defaultTo: false}, + show_excerpt: {type: 'boolean', nullable: false, defaultTo: false}, title_font_category: {type: 'string', maxlength: 191, nullable: false, defaultTo: 'sans_serif', validations: {isIn: [['serif', 'sans_serif']]}}, title_alignment: {type: 'string', maxlength: 191, nullable: false, defaultTo: 'center', validations: {isIn: [['center', 'left']]}}, show_feature_image: {type: 'boolean', nullable: false, defaultTo: true}, diff --git a/ghost/core/core/server/models/newsletter.js b/ghost/core/core/server/models/newsletter.js index c2122cd5f4..2e41447c60 100644 --- a/ghost/core/core/server/models/newsletter.js +++ b/ghost/core/core/server/models/newsletter.js @@ -30,7 +30,7 @@ const Newsletter = ghostBookshelf.Model.extend({ border_color: null, title_color: null, feedback_enabled: false, - show_subtitle: false + show_excerpt: false }; }, diff --git a/ghost/core/core/shared/labs.js b/ghost/core/core/shared/labs.js index d241508576..657b53eff3 100644 --- a/ghost/core/core/shared/labs.js +++ b/ghost/core/core/shared/labs.js @@ -52,8 +52,8 @@ const ALPHA_FEATURES = [ 'importMemberTier', 'lexicalIndicators', 'adminXDemo', - 'editorSubtitle', - 'newsletterSubtitle', + 'editorExcerpt', + 'newsletterExcerpt', 'internalLinkingAtLinks' ]; diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap index 3c927e3617..447dca53c7 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap @@ -5351,7 +5351,7 @@ exports[`Members API Can subscribe to a newsletter 5: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "4604", + "content-length": "4601", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap index 4c13130828..d97120bc4b 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap @@ -19,6 +19,7 @@ Object { "sender_reply_to": "support", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -26,7 +27,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -46,7 +46,7 @@ exports[`Newsletters API [Legacy] Can only set newsletter reply to to newsletter Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "948", + "content-length": "947", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -75,6 +75,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -82,7 +83,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -102,7 +102,7 @@ exports[`Newsletters API [Legacy] Can only set newsletter reply to to newsletter Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "951", + "content-length": "950", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -227,6 +227,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -234,7 +235,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "new-newsletter-with-existing-members-subscribed", "sort_order": 8, "status": "active", @@ -254,7 +254,7 @@ exports[`Newsletters API Can add a newsletter - and subscribe existing members 2 Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "973", + "content-length": "972", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -289,6 +289,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -296,7 +297,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "my-test-newsletter-with-custom-sender_email", "sort_order": 7, "status": "active", @@ -316,7 +316,7 @@ exports[`Newsletters API Can add a newsletter - with custom sender_email 2: [hea Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "982", + "content-length": "981", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -555,6 +555,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -562,7 +563,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "my-test-newsletter-with-custom-sender_email-and-subscribe-existing", "sort_order": 10, "status": "active", @@ -582,7 +582,7 @@ exports[`Newsletters API Can add a newsletter - with custom sender_email and sub Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "1055", + "content-length": "1054", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1001,6 +1001,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1008,7 +1009,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "my-test-newsletter", "sort_order": 3, "status": "active", @@ -1028,7 +1028,7 @@ exports[`Newsletters API Can add a newsletter 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "938", + "content-length": "937", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1058,6 +1058,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1065,7 +1066,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "my-first-test-newsletter", "sort_order": 5, "status": "active", @@ -1085,7 +1085,7 @@ exports[`Newsletters API Can add multiple newsletters 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "900", + "content-length": "899", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1115,6 +1115,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1122,7 +1123,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "my-second-test-newsletter", "sort_order": 6, "status": "active", @@ -1142,7 +1142,7 @@ exports[`Newsletters API Can add multiple newsletters 4: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "902", + "content-length": "901", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1182,6 +1182,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1189,7 +1190,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "default-newsletter", "sort_order": 0, "status": "active", @@ -1217,6 +1217,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1224,7 +1225,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -1252,6 +1252,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1259,7 +1260,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "weekly-newsletter", "sort_order": 2, "status": "active", @@ -1287,6 +1287,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1294,7 +1295,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "old-newsletter", "sort_order": 2, "status": "archived", @@ -1314,7 +1314,7 @@ exports[`Newsletters API Can browse newsletters 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3755", + "content-length": "3751", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1347,6 +1347,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1354,7 +1355,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -1374,7 +1374,7 @@ exports[`Newsletters API Can edit a newsletters and update the sender_email when Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "1003", + "content-length": "1002", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1606,6 +1606,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1613,7 +1614,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -1633,7 +1633,7 @@ exports[`Newsletters API Can edit newsletters 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "951", + "content-length": "950", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1727,6 +1727,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1734,7 +1735,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "my-test-newsletter-2", "sort_order": 4, "status": "active", @@ -1754,7 +1754,7 @@ exports[`Newsletters API Can include members, active members & posts counts when Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "935", + "content-length": "934", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1799,6 +1799,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1806,7 +1807,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "default-newsletter", "sort_order": 0, "status": "active", @@ -1839,6 +1839,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1846,7 +1847,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -1879,6 +1879,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1886,7 +1887,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "weekly-newsletter", "sort_order": 2, "status": "active", @@ -1919,6 +1919,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1926,7 +1927,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "old-newsletter", "sort_order": 2, "status": "archived", @@ -1946,7 +1946,7 @@ exports[`Newsletters API Can include members, active members & posts counts when Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3959", + "content-length": "3955", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1979,6 +1979,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -1986,7 +1987,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -2006,7 +2006,7 @@ exports[`Newsletters API Can include members, active members & posts counts when Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "1004", + "content-length": "1003", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2040,6 +2040,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -2047,7 +2048,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -2067,7 +2067,7 @@ exports[`Newsletters API Can include members, active members & posts counts when Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "995", + "content-length": "994", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2095,6 +2095,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -2102,7 +2103,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -2122,7 +2122,7 @@ exports[`Newsletters API Can read a newsletter 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "944", + "content-length": "943", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2397,6 +2397,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -2404,7 +2405,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -2439,6 +2439,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -2446,7 +2447,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "duplicate-newsletter", "sort_order": Any, "status": "active", @@ -2466,7 +2466,7 @@ exports[`Newsletters API Can't add multiple newsletters with same name 2: [heade Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "892", + "content-length": "891", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2561,6 +2561,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -2568,7 +2569,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "naughty-newsletter", "sort_order": 3, "status": "active", @@ -2588,7 +2588,7 @@ exports[`Newsletters API Host Settings: newsletter limits Max limit Adding a new Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "923", + "content-length": "922", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2621,6 +2621,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -2628,7 +2629,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "archived-newsletter", "sort_order": 3, "status": "archived", @@ -2648,7 +2648,7 @@ exports[`Newsletters API Host Settings: newsletter limits Max limit Adding an ar Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "927", + "content-length": "926", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2722,6 +2722,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -2729,7 +2730,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "default-newsletter", "sort_order": 0, "status": "archived", @@ -2749,7 +2749,7 @@ exports[`Newsletters API Host Settings: newsletter limits Max limit Archiving a Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "890", + "content-length": "889", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2778,6 +2778,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -2785,7 +2786,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "old-newsletter", "sort_order": 2, "status": "archived", @@ -2805,7 +2805,7 @@ exports[`Newsletters API Host Settings: newsletter limits Max limit Editing an a Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "957", + "content-length": "956", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2834,6 +2834,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -2841,7 +2842,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "old-newsletter", "sort_order": 2, "status": "archived", @@ -2861,7 +2861,7 @@ exports[`Newsletters API Host Settings: newsletter limits Max limit Editing an a Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "959", + "content-length": "958", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2917,7 +2917,7 @@ exports[`Newsletters API Managed email with custom sending domain Auto correctin Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "5507", + "content-length": "5501", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2945,6 +2945,7 @@ Object { "sender_reply_to": "notvalid@acme.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -2952,7 +2953,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -2972,7 +2972,7 @@ exports[`Newsletters API Managed email with custom sending domain Auto correctin Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "946", + "content-length": "945", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3001,6 +3001,7 @@ Object { "sender_reply_to": "notvalid@acme.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -3008,7 +3009,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3028,7 +3028,7 @@ exports[`Newsletters API Managed email with custom sending domain Auto correctin Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "946", + "content-length": "945", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3056,6 +3056,7 @@ Object { "sender_reply_to": "support", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -3063,7 +3064,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3083,7 +3083,7 @@ exports[`Newsletters API Managed email with custom sending domain Auto correctin Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "936", + "content-length": "935", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3112,6 +3112,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -3119,7 +3120,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3139,7 +3139,7 @@ exports[`Newsletters API Managed email with custom sending domain Can clear send Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "939", + "content-length": "938", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3168,6 +3168,7 @@ Object { "sender_reply_to": "existing@acme.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -3175,7 +3176,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3195,7 +3195,7 @@ exports[`Newsletters API Managed email with custom sending domain Can keep sende Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "946", + "content-length": "945", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3229,6 +3229,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -3236,7 +3237,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3256,7 +3256,7 @@ exports[`Newsletters API Managed email with custom sending domain Can set newsle Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "994", + "content-length": "993", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3544,6 +3544,7 @@ Object { "sender_reply_to": "anything@sendingdomain.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -3551,7 +3552,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3571,7 +3571,7 @@ exports[`Newsletters API Managed email with custom sending domain Can set newsle Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "955", + "content-length": "954", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3600,6 +3600,7 @@ Object { "sender_reply_to": "support", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -3607,7 +3608,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3627,7 +3627,7 @@ exports[`Newsletters API Managed email with custom sending domain Can set newsle Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "936", + "content-length": "935", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3656,6 +3656,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -3663,7 +3664,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3683,7 +3683,7 @@ exports[`Newsletters API Managed email with custom sending domain Can set newsle Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "939", + "content-length": "938", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3712,6 +3712,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -3719,7 +3720,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3739,7 +3739,7 @@ exports[`Newsletters API Managed email with custom sending domain Can set sender Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "963", + "content-length": "962", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3877,7 +3877,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "5497", + "content-length": "5491", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3905,6 +3905,7 @@ Object { "sender_reply_to": "notvalid@acme.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -3912,7 +3913,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3932,7 +3932,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "936", + "content-length": "935", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -3961,6 +3961,7 @@ Object { "sender_reply_to": "notvalid@acme.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -3968,7 +3969,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -3988,7 +3988,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "946", + "content-length": "945", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4072,6 +4072,7 @@ Object { "sender_reply_to": "notvalid@acme.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -4079,7 +4080,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4099,7 +4099,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "936", + "content-length": "935", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4127,6 +4127,7 @@ Object { "sender_reply_to": "support", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -4134,7 +4135,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4154,7 +4154,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "926", + "content-length": "925", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4188,6 +4188,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -4195,7 +4196,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4215,7 +4215,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "984", + "content-length": "983", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4249,6 +4249,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -4256,7 +4257,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4276,7 +4276,7 @@ exports[`Newsletters API Managed email without custom sending domain Auto correc Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "984", + "content-length": "983", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4359,6 +4359,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -4366,7 +4367,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4386,7 +4386,7 @@ exports[`Newsletters API Managed email without custom sending domain Can clear s Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "929", + "content-length": "928", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4415,6 +4415,7 @@ Object { "sender_reply_to": "existing@acme.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -4422,7 +4423,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4442,7 +4442,7 @@ exports[`Newsletters API Managed email without custom sending domain Can keep se Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "936", + "content-length": "935", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4586,6 +4586,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -4593,7 +4594,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4613,7 +4613,7 @@ exports[`Newsletters API Managed email without custom sending domain Can set new Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "984", + "content-length": "983", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4846,6 +4846,7 @@ Object { "sender_reply_to": "support", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -4853,7 +4854,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4873,7 +4873,7 @@ exports[`Newsletters API Managed email without custom sending domain Can set new Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "926", + "content-length": "925", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4902,6 +4902,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -4909,7 +4910,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4929,7 +4929,7 @@ exports[`Newsletters API Managed email without custom sending domain Can set new Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "929", + "content-length": "928", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -4958,6 +4958,7 @@ Object { "sender_reply_to": "default@email.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -4965,7 +4966,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -4985,7 +4985,7 @@ exports[`Newsletters API Managed email without custom sending domain Can set new Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "936", + "content-length": "935", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5014,6 +5014,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -5021,7 +5022,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5041,7 +5041,7 @@ exports[`Newsletters API Managed email without custom sending domain Can set sen Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "944", + "content-length": "943", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5194,6 +5194,7 @@ Object { "sender_reply_to": "hello@acme.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -5201,7 +5202,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5221,7 +5221,7 @@ exports[`Newsletters API Self hoster without managed email Can change sender_ema Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "955", + "content-length": "954", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5250,6 +5250,7 @@ Object { "sender_reply_to": "hello@acme.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -5257,7 +5258,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5277,7 +5277,7 @@ exports[`Newsletters API Self hoster without managed email Can clear sender_emai Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "943", + "content-length": "942", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5361,6 +5361,7 @@ Object { "sender_reply_to": "hello@acme.com", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -5368,7 +5369,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5388,7 +5388,7 @@ exports[`Newsletters API Self hoster without managed email Can set newsletter re Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "943", + "content-length": "942", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5417,6 +5417,7 @@ Object { "sender_reply_to": "support", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -5424,7 +5425,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5444,7 +5444,7 @@ exports[`Newsletters API Self hoster without managed email Can set newsletter re Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "936", + "content-length": "935", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -5473,6 +5473,7 @@ Object { "sender_reply_to": "newsletter", "show_badge": true, "show_comment_cta": true, + "show_excerpt": false, "show_feature_image": true, "show_header_icon": true, "show_header_name": true, @@ -5480,7 +5481,6 @@ Object { "show_latest_posts": false, "show_post_title_section": true, "show_subscription_details": false, - "show_subtitle": false, "slug": "daily-newsletter", "sort_order": 1, "status": "active", @@ -5500,7 +5500,7 @@ exports[`Newsletters API Self hoster without managed email Can set newsletter re Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "939", + "content-length": "938", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/unit/server/data/schema/integrity.test.js b/ghost/core/test/unit/server/data/schema/integrity.test.js index dadce05a1a..ef24cb5aab 100644 --- a/ghost/core/test/unit/server/data/schema/integrity.test.js +++ b/ghost/core/test/unit/server/data/schema/integrity.test.js @@ -35,7 +35,7 @@ const validateRouteSettings = require('../../../../../core/server/services/route */ describe('DB version integrity', function () { // Only these variables should need updating - const currentSchemaHash = 'e6fff125e9a6cd6167acaf9983a21319'; + const currentSchemaHash = '7ad5a5720c29fab6b8cebb19da496935'; const currentFixturesHash = 'a489d615989eab1023d4b8af0ecee7fd'; const currentSettingsHash = '5c957ceb48c4878767d7d3db484c592d'; const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01'; diff --git a/ghost/email-service/lib/EmailRenderer.js b/ghost/email-service/lib/EmailRenderer.js index 797a5a8ffc..67248bf723 100644 --- a/ghost/email-service/lib/EmailRenderer.js +++ b/ghost/email-service/lib/EmailRenderer.js @@ -1017,14 +1017,14 @@ class EmailRenderer { } } - let subtitleFontClass = ''; + let excerptFontClass = ''; const bodyFont = newsletter.get('body_font_category'); const titleFont = newsletter.get('title_font_category'); if (titleFont === 'serif' && bodyFont === 'serif') { - subtitleFontClass = 'post-subtitle-serif-serif'; + excerptFontClass = 'post-excerpt-serif-serif'; } else if (titleFont === 'serif' && bodyFont !== 'serif') { - subtitleFontClass = 'post-subtitle-serif-sans'; + excerptFontClass = 'post-excerpt-serif-sans'; } const data = { @@ -1056,7 +1056,7 @@ class EmailRenderer { newsletter: { name: newsletter.get('name'), showPostTitleSection: newsletter.get('show_post_title_section'), - showSubtitle: newsletter.get('show_subtitle'), + showExcerpt: newsletter.get('show_excerpt'), showCommentCta: newsletter.get('show_comment_cta') && this.#settingsCache.get('comments_enabled') !== 'off' && !hasEmailOnlyFlag, showSubscriptionDetails: newsletter.get('show_subscription_details') }, @@ -1090,7 +1090,7 @@ class EmailRenderer { classes: { title: 'post-title' + (newsletter.get('title_font_category') === 'serif' ? ` post-title-serif` : ``) + (newsletter.get('title_alignment') === 'left' ? ` post-title-left` : ``), titleLink: 'post-title-link' + (newsletter.get('title_alignment') === 'left' ? ` post-title-link-left` : ``), - subtitle: 'post-subtitle' + ` ` + subtitleFontClass + (newsletter.get('title_alignment') === 'left' ? ` post-subtitle-left` : ``), + excerpt: 'post-excerpt' + ` ` + excerptFontClass + (newsletter.get('title_alignment') === 'left' ? ` post-excerpt-left` : ``), meta: 'post-meta' + (newsletter.get('title_alignment') === 'left' ? ` post-meta-left` : ` post-meta-center`), body: newsletter.get('body_font_category') === 'sans_serif' ? `post-content-sans-serif` : `post-content` }, diff --git a/ghost/email-service/lib/email-templates/partials/styles-old.hbs b/ghost/email-service/lib/email-templates/partials/styles-old.hbs index e8af744c1e..83222112b2 100644 --- a/ghost/email-service/lib/email-templates/partials/styles-old.hbs +++ b/ghost/email-service/lib/email-templates/partials/styles-old.hbs @@ -377,12 +377,12 @@ figure blockquote p { text-align: left; } -.post-subtitle-wrapper { +.post-excerpt-wrapper { width: 100%; max-width: 600px !important; } -.post-subtitle { +.post-excerpt { margin: 0; padding-bottom: 20px; color: #15212A; @@ -391,17 +391,17 @@ figure blockquote p { text-align: center; } -.post-subtitle-serif-serif { +.post-excerpt-serif-serif { font-family: Georgia, serif; font-size: 18px; } -.post-subtitle-serif-sans { +.post-excerpt-serif-sans { font-size: 18px; font-family: Georgia, serif; } -.post-subtitle-left { +.post-excerpt-left { text-align: left; } @@ -1313,7 +1313,7 @@ a[data-flickr-embed] img { font-size: 16px; } - table.body .post-subtitle { + table.body .post-excerpt { font-size: 16px !important; } diff --git a/ghost/email-service/lib/email-templates/template-old.hbs b/ghost/email-service/lib/email-templates/template-old.hbs index 074e8442e4..aee60dbeea 100644 --- a/ghost/email-service/lib/email-templates/template-old.hbs +++ b/ghost/email-service/lib/email-templates/template-old.hbs @@ -79,11 +79,11 @@ {{post.title}} - {{#hasFeature 'newsletterSubtitle'}} - {{#if (and newsletter.showSubtitle post.customExcerpt)}} + {{#hasFeature 'newsletterExcerpt'}} + {{#if (and newsletter.showExcerpt post.customExcerpt)}} - -

{{post.customExcerpt}}

+ +

{{post.customExcerpt}}

{{/if}} diff --git a/ghost/email-service/test/email-renderer.test.js b/ghost/email-service/test/email-renderer.test.js index 48cee5305b..945667e11e 100644 --- a/ghost/email-service/test/email-renderer.test.js +++ b/ghost/email-service/test/email-renderer.test.js @@ -1769,18 +1769,18 @@ describe('Email renderer', function () { assert.equal(response.html.includes('width="auto" height="auto"'), false, 'Should not replace img height and width with auto from css'); }); - describe('show subtitle', function () { + describe('show excerpt', function () { beforeEach(function () { labsEnabled = { - newsletterSubtitle: true + newsletterExcerpt: true }; }); it('is rendered when enabled and customExcerpt is present', async function () { - const post = createModel(Object.assign({}, basePost, {custom_excerpt: 'This is a subtitle'})); + const post = createModel(Object.assign({}, basePost, {custom_excerpt: 'This is an excerpt'})); const newsletter = createModel({ show_post_title_section: true, - show_subtitle: true + show_excerpt: true }); const segment = null; const options = {}; @@ -1794,14 +1794,14 @@ describe('Email renderer', function () { await validateHtml(response.html); - assert.equal(response.html.match(/This is a subtitle/g).length, 2, 'Subtitle should appear twice (preheader and subtitle section)'); + assert.equal(response.html.match(/This is an excerpt/g).length, 2, 'Excerpt should appear twice (preheader and excerpt section)'); }); it('is not rendered when disabled and customExcerpt is present', async function () { - const post = createModel(Object.assign({}, basePost, {custom_excerpt: 'This is a subtitle'})); + const post = createModel(Object.assign({}, basePost, {custom_excerpt: 'This is an excerpt'})); const newsletter = createModel({ show_post_title_section: true, - show_subtitle: false + show_excerpt: false }); const segment = null; const options = {}; @@ -1815,15 +1815,15 @@ describe('Email renderer', function () { await validateHtml(response.html); - assert.equal(response.html.match(/This is a subtitle/g).length, 1, 'Subtitle should only appear once (preheader, subtitle section skipped)'); - response.html.should.not.containEql('post-subtitle-wrapper'); + assert.equal(response.html.match(/This is an excerpt/g).length, 1, 'Subtitle should only appear once (preheader, excerpt section skipped)'); + response.html.should.not.containEql('post-excerpt-wrapper'); }); it('does not render when enabled and customExcerpt is not present', async function () { const post = createModel(Object.assign({}, basePost, {custom_excerpt: null})); const newsletter = createModel({ show_post_title_section: true, - show_subtitle: true + show_excerpt: true }); const segment = null; const options = {}; @@ -1837,7 +1837,7 @@ describe('Email renderer', function () { await validateHtml(response.html); - response.html.should.not.containEql('post-subtitle-wrapper'); + response.html.should.not.containEql('post-excerpt-wrapper'); }); }); }); @@ -2073,12 +2073,12 @@ 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', - subtitle: 'post-subtitle post-subtitle-serif-sans post-subtitle-left', + excerpt: 'post-excerpt post-excerpt-serif-sans post-excerpt-left', body: 'post-content-sans-serif' }); }); - it('has correct subtitle classes for serif title+body', async function () { + it('has correct excerpt classes for serif title+body', async function () { const html = ''; const post = createModel({ posts_meta: createModel({}), @@ -2089,10 +2089,10 @@ describe('Email renderer', function () { title_font_category: 'serif', title_alignment: 'left', body_font_category: 'serif', - show_subtitle: true + show_excerpt: true }); const data = await emailRenderer.getTemplateData({post, newsletter, html, addPaywall: false}); - assert.equal(data.classes.subtitle, 'post-subtitle post-subtitle-serif-serif post-subtitle-left'); + assert.equal(data.classes.excerpt, 'post-excerpt post-excerpt-serif-serif post-excerpt-left'); }); it('show comment CTA is enabled if labs disabled', async function () {