Cleaned up newsletterExcerpt flag

no issue

- feature is GA so the flag and related conditionals are no longer required
This commit is contained in:
Kevin Ansfield 2024-07-03 17:59:57 +01:00
parent 194205769b
commit e6df014f84
8 changed files with 10 additions and 26 deletions

View File

@ -60,10 +60,6 @@ const features = [{
description: '(Highly) Experimental support for ActivityPub.',
flag: 'ActivityPub'
},{
title: 'Excerpt in newsletter',
description: 'Showing excerpt in newsletter',
flag: 'newsletterExcerpt'
}, {
title: 'Content Visibility',
description: 'Enables content visibility in Emails',
flag: 'contentVisibility'

View File

@ -103,7 +103,6 @@ const Sidebar: React.FC<{
const {mutateAsync: uploadImage} = useUploadImage();
const [selectedTab, setSelectedTab] = useState('generalSettings');
const hasEmailCustomization = useFeatureFlag('emailCustomization');
const hasNewsletterExcerpt = useFeatureFlag('newsletterExcerpt');
const {localSettings} = useSettingGroup();
const [siteTitle] = getSettingValues(localSettings, ['title']) as string[];
const handleError = useHandleError();
@ -418,7 +417,7 @@ const Sidebar: React.FC<{
onChange={color => updateNewsletter({title_color: color})}
/>}
<ToggleGroup gap='lg'>
{(hasNewsletterExcerpt && newsletter.show_post_title_section) &&
{newsletter.show_post_title_section &&
<Toggle
checked={newsletter.show_excerpt}
direction="rtl"

View File

@ -77,7 +77,6 @@ const NewsletterPreviewContent: React.FC<{
const showHeader = headerIcon || headerTitle;
const {config} = useGlobalData();
const hasNewEmailAddresses = useFeatureFlag('newEmailAddresses');
const hasNewsletterExcerpt = useFeatureFlag('newsletterExcerpt');
const currentDate = new Date().toLocaleDateString('default', {
year: 'numeric',
@ -154,7 +153,7 @@ const NewsletterPreviewContent: React.FC<{
)} style={{color: titleColor}}>
Your email newsletter
</h2>
{(hasNewsletterExcerpt && showExcerpt) && (
{showExcerpt && (
<p className={excerptClasses}>A subtitle to highlight key points and engage your readers</p>
)}
<div className={clsx(

View File

@ -83,7 +83,6 @@ export default class FeatureService extends Service {
@feature('ActivityPub') ActivityPub;
@feature('internalLinking') internalLinking;
@feature('editorExcerpt') editorExcerpt;
@feature('newsletterExcerpt') newsletterExcerpt;
@feature('contentVisibility') contentVisibility;
_user = null;

View File

@ -25,7 +25,6 @@ const GA_FEATURES = [
'filterEmailDisabled',
'newEmailAddresses',
'portalImprovements',
'newsletterExcerpt',
'internalLinking'
];

View File

@ -1155,7 +1155,7 @@ exports[`Settings API Edit Can edit a setting 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": "4614",
"content-length": "4587",
"content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,

View File

@ -79,7 +79,6 @@
<a href="{{post.url}}" class="{{classes.titleLink}}">{{post.title}}</a>
</td>
</tr>
{{#hasFeature 'newsletterExcerpt'}}
{{#if (and newsletter.showExcerpt post.customExcerpt)}}
<tr>
<td class="post-excerpt-wrapper" style="width: 100%">
@ -87,7 +86,6 @@
</td>
</tr>
{{/if}}
{{/hasFeature}}
<tr>
<td style="width: 100%">
<table class="post-meta-wrapper" role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-bottom: 32px;">

View File

@ -1770,12 +1770,6 @@ describe('Email renderer', function () {
});
describe('show excerpt', function () {
beforeEach(function () {
labsEnabled = {
newsletterExcerpt: true
};
});
it('is rendered when enabled and customExcerpt is present', async function () {
const post = createModel(Object.assign({}, basePost, {custom_excerpt: 'This is an excerpt'}));
const newsletter = createModel({