diff --git a/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx b/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx index f23705753d..8ad29a6770 100644 --- a/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx +++ b/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx @@ -59,6 +59,10 @@ const features = [{ title: 'Content Visibility', description: 'Enables content visibility in Emails', flag: 'contentVisibility' +},{ + title: 'Publish Flow — End Screen', + description: 'Enables improved publish flow', + flag: 'publishFlowEndScreen' }]; const AlphaFeatures: React.FC = () => { diff --git a/ghost/admin/app/components/editor/modals/publish-flow.hbs b/ghost/admin/app/components/editor/modals/publish-flow.hbs index 5efa915609..e202eb7bff 100644 --- a/ghost/admin/app/components/editor/modals/publish-flow.hbs +++ b/ghost/admin/app/components/editor/modals/publish-flow.hbs @@ -45,13 +45,14 @@ @close={{@close}} /> {{else if this.isComplete}} - {{!-- --}} + {{#unless (feature "publishFlowEndScreen")}} + + {{/unless}} {{else}} -
- - {{#unless this.post.emailOnly}} - - {{/unless}} + {{#unless (feature "publishFlowEndScreen")}} + + {{svg-jar "pen" title=""}}Edit post + + {{else}} +
+ {{#if (feature "publishFlowEndScreen")}} + + {{/if}} + {{#unless this.post.emailOnly}} + + {{/unless}} - - - - {{svg-jar "dotdotdot"}} - - - - -
  • - Edit post -
  • -
  • - View in browser -
  • -
  • - -
  • -
    -
    -
    + + + + {{svg-jar "dotdotdot"}} + + + + +
  • + Edit post +
  • +
  • + View in browser +
  • +
  • + +
  • +
    +
    +
    + {{/unless}} diff --git a/ghost/admin/app/components/posts/analytics.js b/ghost/admin/app/components/posts/analytics.js index c7b38343e4..bbd035091e 100644 --- a/ghost/admin/app/components/posts/analytics.js +++ b/ghost/admin/app/components/posts/analytics.js @@ -43,7 +43,9 @@ export default class Analytics extends Component { constructor() { super(...arguments); - this.checkPublishFlowModal(); + if (this.feature.publishFlowEndScreen) { + this.checkPublishFlowModal(); + } } openPublishFlowModal() { @@ -64,7 +66,11 @@ export default class Analytics extends Component { } get post() { - return this._post ?? this.args.post; + if (this.feature.publishFlowEndScreen) { + return this._post ?? this.args.post; + } + + return this.args.post; } set post(value) { diff --git a/ghost/admin/app/services/feature.js b/ghost/admin/app/services/feature.js index 2af398c3b0..b58fd84c45 100644 --- a/ghost/admin/app/services/feature.js +++ b/ghost/admin/app/services/feature.js @@ -79,6 +79,7 @@ export default class FeatureService extends Service { @feature('internalLinking') internalLinking; @feature('editorExcerpt') editorExcerpt; @feature('contentVisibility') contentVisibility; + @feature('publishFlowEndScreen') publishFlowEndScreen; _user = null; diff --git a/ghost/core/core/shared/labs.js b/ghost/core/core/shared/labs.js index e8b68426b1..eb2a483148 100644 --- a/ghost/core/core/shared/labs.js +++ b/ghost/core/core/shared/labs.js @@ -46,7 +46,8 @@ const ALPHA_FEATURES = [ 'importMemberTier', 'lexicalIndicators', 'adminXDemo', - 'contentVisibility' + 'contentVisibility', + 'publishFlowEndScreen' ]; module.exports.GA_KEYS = [...GA_FEATURES];