Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
✨ Promoted email-only feature to general availability
Browse files Browse the repository at this point in the history
refs TryGhost/Product#1125

-- Email-only is not considered a general availability feature and can be used without special flags.
- It allows to publish a new post type "email only" that only goes out as an email newletter and is available through an undescoverable URL (does not appear anywhere publicly similarly to preview posts) on the site.
- The new "send" option in the post publishing menu allows to send this new type of post.
  • Loading branch information
naz committed Oct 7, 2021
1 parent 973503f commit c77d886
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/components/gh-publishmenu-draft.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class GhPublishMenuDraftComponent extends Component {
}

get showEmailOnlyInput() {
return this.feature.emailOnlyPosts && this.args.post.isPost;
return this.args.post.isPost;
}

constructor() {
Expand Down
4 changes: 1 addition & 3 deletions app/components/gh-publishmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,9 @@ export default Component.extend({
let buttonText;

if (postState === 'draft') {
let publishText = this.feature.emailOnlyPosts ? 'Publish & send' : 'Publish';

switch (distributionAction) {
case 'publish_send':
buttonText = (saveType === 'publish') ? publishText : 'Schedule';
buttonText = (saveType === 'publish') ? 'Publish & send' : 'Schedule';
break;
case 'publish':
buttonText = (saveType === 'publish') ? 'Publish' : 'Schedule';
Expand Down
1 change: 0 additions & 1 deletion app/services/feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export default Service.extend({
multipleProducts: feature('multipleProducts'),
offers: feature('offers', {developer: true}),
oauthLogin: feature('oauthLogin', {developer: true}),
emailOnlyPosts: feature('emailOnlyPosts', {developer: true}),
customThemeSettings: feature('customThemeSettings', {developer: true}),
membersActivity: feature('membersActivity', {developer: true}),

Expand Down
13 changes: 0 additions & 13 deletions app/templates/settings/labs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -261,19 +261,6 @@
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Email-only posts</h4>
<p class="gh-expandable-description">
Enable posts visible only in email
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="emailOnlyPosts" />
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
Expand Down

0 comments on commit c77d886

Please sign in to comment.