Added new enhanced Header Card (#17654)

no issue

- Keep an eye on Ghost's changelog (https://ghost.org/changelog/) for
the full feature announcement. 🎉

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 8367091</samp>

This pull request removes the `headerUpgrade` feature flag and enables
the new header card by default in the editor. It also hides the old
header card from the editor menu unless the `labs.headerV1` setting is
enabled.
This commit is contained in:
Ronald Langeveld 2023-08-10 10:40:10 +02:00 committed by GitHub
parent 3833c24034
commit 04ce1154a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 19 deletions

View File

@ -323,8 +323,10 @@ export default class KoenigLexicalEditor extends Component {
fetchLabels,
feature: {
collectionsCard: this.feature.get('collectionsCard'),
collections: this.feature.get('collections'),
headerV2: this.feature.get('headerUpgrade')
collections: this.feature.get('collections')
},
depreciated: {
headerV1: true // if false, shows header v1 in the menu
},
membersEnabled: this.settings.get('membersSignupAccess') === 'all',
siteTitle: this.settings.title,

View File

@ -75,7 +75,6 @@ export default class FeatureService extends Service {
@feature('adminXSettings') adminXSettings;
@feature('mailEvents') mailEvents;
@feature('collectionsCard') collectionsCard;
@feature('headerUpgrade') headerUpgrade;
@feature('importMemberTier') importMemberTier;
@feature('tipsAndDonations') tipsAndDonations;
@feature('convertToLexical') convertToLexical;

View File

@ -325,20 +325,6 @@
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Header Card v2</h4>
<p class="gh-expandable-description">
A new enhanced version of the header card
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="headerUpgrade" />
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>

View File

@ -200,7 +200,7 @@
},
"editor": {
"url": "https://cdn.jsdelivr.net/ghost/koenig-lexical@~{version}/dist/koenig-lexical.umd.js",
"version": "0.3"
"version": "0.4"
},
"adminX": {
"url": "https://cdn.jsdelivr.net/ghost/admin-x-settings@~{version}/dist/admin-x-settings.umd.js",

View File

@ -40,7 +40,6 @@ const ALPHA_FEATURES = [
'adminXSettings',
'mailEvents',
'collectionsCard',
'headerUpgrade',
'tipsAndDonations',
'importMemberTier',
'convertToLexical'