Added TK Reminders feature (#19491)

no issue

- keep an eye on on https://ghost.org/changelog/ for full details
This commit is contained in:
Kevin Ansfield 2024-01-17 09:57:35 +01:00 committed by GitHub
parent c37642a67b
commit 100e7b70c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 4 additions and 12 deletions

View File

@ -59,10 +59,6 @@ const features = [{
title: 'AdminX Demo',
description: 'Adds a navigation link to the AdminX demo app',
flag: 'adminXDemo'
},{
title: 'TK Reminders',
description: 'Enables the TK Reminders feature in the editor',
flag: 'tkReminders'
},{
title: 'New email addresses',
description: 'For self hosters, forces the usage of the mail.from config as from address for all outgoing emails',

View File

@ -29,7 +29,7 @@
</span>
{{/if}}
{{#if (and (feature "tkReminders") @titleHasTk)}}
{{#if @titleHasTk}}
<div
class="tk-indicator" data-testid="tk-indicator"
{{on "click" this.focusTitle}}

View File

@ -537,7 +537,7 @@ export default class KoenigLexicalEditor extends Component {
multiplayerEndpoint={multiplayerEndpoint}
onError={this.onError}
darkMode={this.feature.nightShift}
isTKEnabled={this.feature.tkReminders}
isTKEnabled={true}
>
<KoenigEditor
editorResource={this.editorResource}
@ -548,7 +548,7 @@ export default class KoenigLexicalEditor extends Component {
registerAPI={this.args.registerAPI}
/>
<WordCountPlugin editorResource={this.editorResource} onChange={this.args.updateWordCount} />
{this.feature.tkReminders && <TKCountPlugin editorResource={this.editorResource} onChange={this.args.updatePostTkCount} />}
<TKCountPlugin editorResource={this.editorResource} onChange={this.args.updatePostTkCount} />
</KoenigComposer>
</Suspense>
</ErrorHandler>

View File

@ -79,7 +79,6 @@ export default class FeatureService extends Service {
@feature('lexicalIndicators') lexicalIndicators;
@feature('filterEmailDisabled') filterEmailDisabled;
@feature('adminXDemo') adminXDemo;
@feature('tkReminders') tkReminders;
@feature('portalImprovements') portalImprovements;
_user = null;

View File

@ -75,7 +75,7 @@
@onEditorCreated={{this.setKoenigEditor}}
@updateWordCount={{this.updateWordCount}}
@updatePostTkCount={{this.updatePostTkCount}}
@updateFeatureImageTkCount={{if (feature "tkReminders") this.updateFeatureImageTkCount}}
@updateFeatureImageTkCount={{this.updateFeatureImageTkCount}}
@featureImage={{this.post.featureImage}}
@featureImageAlt={{this.post.featureImageAlt}}
@featureImageCaption={{this.post.featureImageCaption}}

View File

@ -5,7 +5,6 @@ import {authenticateSession, invalidateSession} from 'ember-simple-auth/test-sup
import {beforeEach, describe, it} from 'mocha';
import {blur, click, currentRouteName, currentURL, fillIn, find, findAll, triggerEvent, typeIn} from '@ember/test-helpers';
import {datepickerSelect} from 'ember-power-datepicker/test-support';
import {enableLabsFlag} from '../helpers/labs-flag';
import {expect} from 'chai';
import {selectChoose} from 'ember-power-select/test-support';
import {setupApplicationTest} from 'ember-mocha';
@ -573,7 +572,6 @@ describe('Acceptance: Editor', function () {
});
it('handles TKs in title', async function () {
enableLabsFlag(this.server, 'tkReminders');
let post = this.server.create('post', {authors: [author]});
await visit(`/editor/post/${post.id}`);

View File

@ -47,7 +47,6 @@ const ALPHA_FEATURES = [
'adminXOffers',
'filterEmailDisabled',
'adminXDemo',
'tkReminders',
'newEmailAddresses',
'portalImprovements'
];