0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Added Header Card V2 feature flags (#17263)

refs https://github.com/TryGhost/Product/issues/3508

- added a feature flag for Header Cards that's being upgraded.

---

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

This pull request adds a new feature flag `headerUpgrade` to the server
and the admin settings, which allows the user to opt-in to a new header
design. The feature flag is only available if the labs toggle is
enabled.
This commit is contained in:
Ronald Langeveld 2023-07-10 13:53:42 +02:00 committed by GitHub
parent ea9cc21a0c
commit 4a07e857e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 2 deletions

View file

@ -277,7 +277,8 @@ export default class KoenigLexicalEditor extends Component {
fetchAutocompleteLinks,
fetchLabels,
feature: {
signupCard: true
signupCard: true,
headerV2: this.feature.get('headerUpgrade')
},
membersEnabled: this.settings.get('membersSignupAccess') === 'all',
siteTitle: this.settings.title,

View file

@ -76,6 +76,7 @@ export default class FeatureService extends Service {
@feature('pageImprovements') pageImprovements;
@feature('flatUrls') flatUrls;
@feature('mailEvents') mailEvents;
@feature('headerUpgrade') headerUpgrade;
_user = null;

View file

@ -338,6 +338,20 @@
</div>
</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>
</div>
{{/if}}

View file

@ -41,7 +41,8 @@ const ALPHA_FEATURES = [
'adminXSettings',
'pageImprovements',
'flatUrls',
'mailEvents'
'mailEvents',
'headerUpgrade'
];
module.exports.GA_KEYS = [...GA_FEATURES];