Added signupCard feature flags (#16763)

no issue

This pull request adds a new experimental feature flag `signupCard` to
the Ghost admin app, which enables a signup card component in the
lexical editor that's currently being worked on. 
The feature flag can be toggled from the settings/labs
UI and is read from the server-side configuration.
This commit is contained in:
Ronald Langeveld 2023-05-09 16:27:36 +02:00 committed by GitHub
parent 35d02fd3ec
commit 8a08cf3628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 2 deletions

View File

@ -251,7 +251,10 @@ export default class KoenigLexicalEditor extends Component {
},
tenor: this.config.tenor?.googleApiKey ? this.config.tenor : null,
fetchEmbed: fetchEmbed,
fetchAutocompleteLinks
fetchAutocompleteLinks,
feature: {
signupCard: this.feature.get('signupCard')
}
};
const cardConfig = Object.assign({}, defaultCardConfig, props.cardConfig, {pinturaConfig: this.pinturaConfig});

View File

@ -74,6 +74,7 @@ export default class FeatureService extends Service {
@feature('postDiffing') postDiffing;
@feature('announcementBar') announcementBar;
@feature('imageEditor') imageEditor;
@feature('signupCard') signupCard;
_user = null;

View File

@ -346,6 +346,21 @@
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Signup Card</h4>
<p class="gh-expandable-description">
Enables the signup card in the Lexical editor
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="signupCard" />
</div>
</div>
</div>
</div>
</div>
{{/if}}

View File

@ -40,7 +40,8 @@ const ALPHA_FEATURES = [
'makingItRain',
'postHistory',
'postDiffing',
'imageEditor'
'imageEditor',
'signupCard'
];
module.exports.GA_KEYS = [...GA_FEATURES];