0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Cleaned up GA Flags (#15762)

closes https://github.com/TryGhost/Team/issues/2126

- Cleaned up the following GA flags: `newsletterPaywall`, `freeTrial`, `compExpiring`, `searchHelper`, `emailAlerts`, `fixNewsletterLinks`.
This commit is contained in:
Ronald Langeveld 2022-11-18 16:09:25 +07:00 committed by GitHub
parent 33b959257c
commit 08232bd538
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 114 additions and 169 deletions

View file

@ -1008,7 +1008,76 @@ remove|ember-template-lint|no-action|33|35|33|35|85790bc3673715479aa2678f29d8a61
remove|ember-template-lint|no-action|34|39|34|39|e65f48edccba27e52c1f8358a9795dc8ff20d5ef|1662681600000|1673053200000|1678237200000|app/templates/signin.hbs
remove|ember-template-lint|no-action|50|35|50|35|7432725bd18c48f69bf22dc9487d14d25dc6c1b7|1662681600000|1673053200000|1678237200000|app/templates/signin.hbs
remove|ember-template-lint|no-passed-in-event-handlers|33|28|33|28|5b371baf419f247953b91b626611cb831c524af3|1662681600000|1673053200000|1678237200000|app/templates/signin.hbs
remove|ember-template-lint|no-passed-in-event-handlers|50|28|50|28|40caf07c7cebf6f4321c5b7e7f2f426b5c30217b|1662681600000|1673053200000|1678237200000|app/templates/signin.hbsremove|ember-template-lint|no-action|164|56|164|56|fa36149ee581ce634903cef877ccfdc133aa67ec|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|176|51|176|51|dcc09bb23a476d5b83b273b693cd8cb2aba68365|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|186|51|186|51|a80dd18e18dda6fb6f1f97d87bef2b8c2ce3d847|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-passed-in-event-handlers|176|44|176|44|dcb4785647a50814bcfce82f8d68ac8dd8f54ec2|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-passed-in-event-handlers|186|44|186|44|70487c008d7dda453fef82f0140699ee93c0055c|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|table-groups|29|12|29|12|fd6c7d9c26f38dac21ab2603a31d20617717ab33|1663977600000|1674349200000|1679533200000|app/templates/offers.hbs
remove|ember-template-lint|no-passed-in-event-handlers|50|28|50|28|40caf07c7cebf6f4321c5b7e7f2f426b5c30217b|1662681600000|1673053200000|1678237200000|app/templates/signin.hbs
remove|ember-template-lint|no-action|164|56|164|56|fa36149ee581ce634903cef877ccfdc133aa67ec|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
add|ember-template-lint|table-groups|29|12|29|12|22a05b8f3ce6682814afd256f64d33aa86cd5063|1667433600000|1677801600000|1682985600000|app/templates/offers.hbs
remove|ember-template-lint|no-action|21|39|21|39|c1c116347fcaf9f69d60fa7ae58d746e9994cdbd|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|37|39|37|39|7307d2c5d78fa732b959ced6823b3d82dcc07446|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|46|39|46|39|7307d2c5d78fa732b959ced6823b3d82dcc07446|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|75|56|75|56|fa36149ee581ce634903cef877ccfdc133aa67ec|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|87|51|87|51|dcc09bb23a476d5b83b273b693cd8cb2aba68365|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|97|51|97|51|a80dd18e18dda6fb6f1f97d87bef2b8c2ce3d847|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|226|47|226|47|73ac7d3892fcbcf15c3d5c44fca14dd21016daea|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|232|53|232|53|c76b92d7bdb6ed498238b647928748aa4146dc24|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|233|55|233|55|02efc45b808f4cfdbe5f7b72b784337aef4e98a7|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|234|56|234|56|4227b643fe44a6c343b819bbee7eecdfb7916ccc|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|235|57|235|57|115cc8adc4c0f98e2d93a59ff8efbee711541336|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|243|41|243|41|c76b92d7bdb6ed498238b647928748aa4146dc24|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|244|44|244|44|4227b643fe44a6c343b819bbee7eecdfb7916ccc|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|245|45|245|45|115cc8adc4c0f98e2d93a59ff8efbee711541336|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|375|71|375|71|141d456b03124abca146e58e4ae15825fdd040bb|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|377|8|377|8|d465b362b15b90cf42a093e72895155f49cdf6f2|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-down-event-binding|377|41|377|41|b3e87879e52edc06bb07f1ad0becc6ec762bbb39|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-passed-in-event-handlers|21|32|21|32|f69395e36c890a23e3f603ad3fd2cb384932af93|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-passed-in-event-handlers|37|32|37|32|86b5983929a27ca8d458ff051c95a50a406fbe57|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-passed-in-event-handlers|46|32|46|32|86b5983929a27ca8d458ff051c95a50a406fbe57|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-passed-in-event-handlers|87|44|87|44|dcb4785647a50814bcfce82f8d68ac8dd8f54ec2|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|no-passed-in-event-handlers|97|44|97|44|70487c008d7dda453fef82f0140699ee93c0055c|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|style-concatenation|297|54|297|54|23293f0c3838b23432d2b2daaf04b34504896d91|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
remove|ember-template-lint|style-concatenation|303|54|303|54|23293f0c3838b23432d2b2daaf04b34504896d91|1662681600000|1673053200000|1678237200000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|21|39|21|39|c1c116347fcaf9f69d60fa7ae58d746e9994cdbd|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|37|39|37|39|7307d2c5d78fa732b959ced6823b3d82dcc07446|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|46|39|46|39|7307d2c5d78fa732b959ced6823b3d82dcc07446|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|75|56|75|56|fa36149ee581ce634903cef877ccfdc133aa67ec|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|87|51|87|51|dcc09bb23a476d5b83b273b693cd8cb2aba68365|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|97|51|97|51|a80dd18e18dda6fb6f1f97d87bef2b8c2ce3d847|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|164|56|164|56|fa36149ee581ce634903cef877ccfdc133aa67ec|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|176|51|176|51|dcc09bb23a476d5b83b273b693cd8cb2aba68365|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|186|51|186|51|a80dd18e18dda6fb6f1f97d87bef2b8c2ce3d847|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|226|47|226|47|73ac7d3892fcbcf15c3d5c44fca14dd21016daea|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|232|53|232|53|c76b92d7bdb6ed498238b647928748aa4146dc24|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|233|55|233|55|02efc45b808f4cfdbe5f7b72b784337aef4e98a7|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|234|56|234|56|4227b643fe44a6c343b819bbee7eecdfb7916ccc|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|235|57|235|57|115cc8adc4c0f98e2d93a59ff8efbee711541336|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|243|41|243|41|c76b92d7bdb6ed498238b647928748aa4146dc24|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|244|44|244|44|4227b643fe44a6c343b819bbee7eecdfb7916ccc|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|245|45|245|45|115cc8adc4c0f98e2d93a59ff8efbee711541336|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|373|71|373|71|141d456b03124abca146e58e4ae15825fdd040bb|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-action|375|8|375|8|d465b362b15b90cf42a093e72895155f49cdf6f2|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-down-event-binding|375|41|375|41|b3e87879e52edc06bb07f1ad0becc6ec762bbb39|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-passed-in-event-handlers|21|32|21|32|f69395e36c890a23e3f603ad3fd2cb384932af93|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-passed-in-event-handlers|37|32|37|32|86b5983929a27ca8d458ff051c95a50a406fbe57|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-passed-in-event-handlers|46|32|46|32|86b5983929a27ca8d458ff051c95a50a406fbe57|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-passed-in-event-handlers|87|44|87|44|dcb4785647a50814bcfce82f8d68ac8dd8f54ec2|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-passed-in-event-handlers|97|44|97|44|70487c008d7dda453fef82f0140699ee93c0055c|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-passed-in-event-handlers|176|44|176|44|dcb4785647a50814bcfce82f8d68ac8dd8f54ec2|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|no-passed-in-event-handlers|186|44|186|44|70487c008d7dda453fef82f0140699ee93c0055c|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|style-concatenation|297|54|297|54|23293f0c3838b23432d2b2daaf04b34504896d91|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|style-concatenation|303|54|303|54|23293f0c3838b23432d2b2daaf04b34504896d91|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|164|56|164|56|fa36149ee581ce634903cef877ccfdc133aa67ec|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|176|51|176|51|dcc09bb23a476d5b83b273b693cd8cb2aba68365|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
remove|ember-template-lint|no-action|186|51|186|51|a80dd18e18dda6fb6f1f97d87bef2b8c2ce3d847|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
remove|ember-template-lint|no-passed-in-event-handlers|176|44|176|44|dcb4785647a50814bcfce82f8d68ac8dd8f54ec2|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
remove|ember-template-lint|no-passed-in-event-handlers|186|44|186|44|70487c008d7dda453fef82f0140699ee93c0055c|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
remove|ember-template-lint|style-concatenation|303|54|303|54|23293f0c3838b23432d2b2daaf04b34504896d91|1667520000000|1677888000000|1683072000000|app/components/modal-tier.hbs
add|ember-template-lint|simple-unless|86|30|86|30|17d2867a6155411eaf3c32cb83391e3118c2afc8|1667520000000|1677888000000|1683072000000|app/components/posts/links-table.hbs
add|ember-template-lint|simple-unless|98|26|98|26|17d2867a6155411eaf3c32cb83391e3118c2afc8|1667520000000|1677888000000|1683072000000|app/components/posts/links-table.hbs
remove|ember-template-lint|require-iframe-title|1|0|1|0|d1c9631d150af53ca33b16c8c280c9d815bf43da|1662681600000|1673053200000|1678237200000|app/components/gh-billing-iframe.hbs
add|ember-template-lint|no-action|28|60|28|60|190532b9954beb4e7e9e0f1c51d170e64d4a5315|1668643200000|1679011200000|1684195200000|app/components/modal-import-content.hbs
add|ember-template-lint|no-action|55|120|55|120|031d04576149d3034549aa3d14bc26da704cd70c|1668643200000|1679011200000|1684195200000|app/components/modal-import-content.hbs

View file

@ -88,14 +88,14 @@ export default class extends Component {
},
isComplimentary: !sub.id
};
if (this.feature.get('freeTrial') && sub.trial_end_at) {
if (sub.trial_end_at) {
const inTrialMode = moment(sub.trial_end_at).isAfter(new Date(), 'day');
if (inTrialMode) {
data.trialUntil = moment(sub.trial_end_at).format('D MMM YYYY');
}
}
if (!sub.id && this.feature.get('compExpiring') && sub.tier?.expiry_at) {
if (!sub.id && sub.tier?.expiry_at) {
data.compExpiry = moment(sub.tier.expiry_at).format('D MMM YYYY');
}
return data;

View file

@ -54,7 +54,7 @@
<div class="period">Yearly</div>
</div>
</div>
{{#if (and (feature 'freeTrial') this.isFreeTrialEnabled)}}
{{#if this.isFreeTrialEnabled}}
<div class="gh-tier-free-trial-label">
<span class="gh-tier-free-trial-days">{{this.tierTrialDays}} day</span> free trial
</div>

View file

@ -41,7 +41,6 @@
</div>
{{/each}}
</div>
{{#if (feature 'compExpiring')}}
<GhFormGroup @errors={{this.errors}} @property="product-cadence">
<label for="product-cadence" class="fw6 mt5">Duration</label>
<span class="gh-select">
@ -58,7 +57,6 @@
</span>
<GhErrorMessage @errors={{this.errors}} @property="product-cadence" />
</GhFormGroup>
{{/if}}
{{/if}}
</div>
</form>

View file

@ -54,7 +54,6 @@
</GhFormGroup>
{{#unless this.isFreeTier}}
{{#if (feature 'freeTrial')}}
<div class="gh-settings-members-pricetrialcont">
<GhFormGroup @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}} @property="prices" data-test-formgroup="prices">
<div class="gh-settings-members-pricelabelcont free-trial-enabled">
@ -144,58 +143,6 @@
{{/if}}
</GhFormGroup>
</div>
{{else}}
<GhFormGroup @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}} @property="prices" data-test-formgroup="prices">
<div class="gh-settings-members-pricelabelcont">
<label for="monthlyPrice" class="fw6">Prices</label><span></span>
<div>
<span class="gh-setting-members-currency gh-select">
<div class="gh-setting-members-currencylabel">
<span>{{this.currency}}</span>
{{svg-jar "arrow-down-small"}}
</div>
<OneWaySelect
@value={{this.selectedCurrency}}
id="currency"
name="currency"
@options={{readonly this.allCurrencies}}
@optionValuePath="value"
@optionLabelPath="label"
@update={{action "setCurrency"}}
/>
</span>
</div>
</div>
<div class="gh-setting-members-prices">
<div class="gh-input-group">
<GhTextInput
@id="monthlyPrice"
@value={{readonly this.stripeMonthlyAmount}}
@type="number"
@input={{action (mut this.stripeMonthlyAmount) value="target.value"}}
@focus-out={{this.validateStripePlans}}
/>
<span class="gh-input-append"><span class="ttu">{{this.currency}}</span>/month</span>
</div>
<div class="gh-input-group">
<GhTextInput
@id="yearlyPrice"
@value={{readonly this.stripeYearlyAmount}}
@type="number"
@input={{action (mut this.stripeYearlyAmount) value="target.value"}}
@focus-out={{this.validateStripePlans}}
@placeholder=''
data-test-title-input={{true}}
/>
<span class="gh-input-append"><span class="ttu">{{this.currency}}</span>/year</span>
</div>
</div>
{{#if this.stripePlanError}}
<p class="response w-100"><span class="red">{{this.stripePlanError}}</span></p>
{{/if}}
</GhFormGroup>
{{/if}}
<GhFormGroup>
<label for="welcomePage" class="fw6">Welcome page</label>
@ -291,20 +238,11 @@
<span class="billing-period">/year</span>
{{/if}}
</div>
{{#if (feature 'freeTrial')}}
{{#if this.isFreeTrialEnabled}}
<span class="gh-portal-discount-label">
<span style="background-color: {{this.settings.accentColor}}"></span>
{{ this.tier.trialDays }} days free</span>
{{/if}}
{{else}}
{{#if (and (eq this.previewCadence "yearly") (gt this.discountValue 0))}}
<span class="gh-portal-discount-label">
<span style="background-color: {{this.settings.accentColor}}"></span>
{{this.discountValue}}% discount
</span>
{{/if}}
{{/if}}
{{else}}
<div class="gh-portal-tier-price placeholder">
<span class="currency-sign">{{currency-symbol this.currency}}</span>
@ -314,13 +252,11 @@
{{/if}}
{{/if}}
</div>
{{#if (feature 'freeTrial')}}
{{#if (and (eq this.previewCadence "yearly") (gt this.discountValue 0))}}
<span class="gh-portal-discount-label-trial" style={{this.accentColorStyle}}>
{{this.discountValue}}% discount
</span>
{{/if}}
{{/if}}
</div>
<div class="gh-portal-tier-card-details">

View file

@ -65,7 +65,7 @@ export default class ModalTierPrice extends ModalBase {
}
get isFreeTrialEnabled() {
return this.feature.get('freeTrial') && this.freeTrialEnabled && this.tier.get('trialDays') > 0;
return this.freeTrialEnabled && this.tier.get('trialDays') > 0;
}
init() {

View file

@ -7,7 +7,7 @@
{{#if (feature "audienceFeedback")}}<h3 class="gh-newsletter-clicks-header">Newsletter clicks</h3>{{/if}}
<div class="gh-links-list">
<div class="gh-links-list-header">
{{#if (and this.showPagination (feature "fixNewsletterLinks")) }}
{{#if this.showPagination}}
<div class="gh-links-pagination-progress">
Showing {{this.startOffset}}-{{this.endOffset}} of {{this.totalLinks}}
</div>
@ -23,7 +23,6 @@
<div class="gh-links-list-items">
{{#each this.visibleLinks as |link|}}
<div class="gh-links-list-item {{if (eq this.editingLink link.link.link_id) "gh-links-list-item-edit-mode"}}">
{{#if (feature "fixNewsletterLinks")}}
<div class="gh-links-list-url">
{{#if (eq this.editingLink link.link.link_id)}}
<div class="gh-links-list-input-container {{if (eq this.showError link.link.link_id) "error"}}">
@ -77,19 +76,14 @@
<span class="gh-links-list-item-success {{if (eq @showSuccess link.link.link_id) "gh-links-list-item-success-show"}}">{{svg-jar "check-circle"}}</span>
{{/if}}
</div>
{{else}}
<a href="{{link.link.to}}" target="_blank" rel="noopener noreferrer">{{link.link.title}}</a>
{{/if}}
<p class="gh-links-list-clicks">{{link.count.clicks}}</p>
</div>
{{/each}}
</div>
{{#if (or this.showPagination (feature "fixNewsletterLinks")) }}
<div class="gh-links-pagination">
{{#if (feature "fixNewsletterLinks")}}
<span class="gh-links-info">{{svg-jar "arrow-right-tail"}} <span class="gh-links-info-normal">Sent a broken link? You can update it!</span><span class="gh-links-info-short">Update your broken link!</span></span>
{{#if (not (feature "audienceFeedback"))}}
{{#unless (feature "audienceFeedback")}}
<div class="gh-links-pagination-actions">
<button type="button" class="gh-links-pagination-action gh-links-pagination-prev {{if this.disablePreviousPage "gh-links-pagination-disabled"}}" {{on "click" this.openPreviousPage}} disabled={{this.disablePreviousPage}}>
{{svg-jar "arrow-left-pagination"}}
@ -100,10 +94,8 @@
{{svg-jar "arrow-right-pagination"}}
</button>
</div>
{{/if}}
{{/if}}
{{#if (and (not (feature "fixNewsletterLinks")) (not (feature "audienceFeedback")))}}
{{/unless}}
{{#unless (feature "audienceFeedback")}}
<div class="gh-links-pagination-progress">
Showing {{this.startOffset}}-{{this.endOffset}} of {{this.totalLinks}}
</div>
@ -119,13 +111,11 @@
</button>
</div>
{{/if}}
{{/if}}
{{/unless}}
{{#if (feature "audienceFeedback")}}
<div class="gh-post-activity-feed-pagination">
{{#if (feature "fixNewsletterLinks")}}
Showing {{this.startOffset}}-{{this.endOffset}} of {{this.totalLinks}}
{{/if}}
Showing {{this.startOffset}}-{{this.endOffset}} of {{this.totalLinks}}
<div class="gh-post-activity-feed-pagination-group">
<button
class="gh-post-activity-feed-pagination-button gh-post-activity-feed-prev-button"
@ -147,12 +137,8 @@
{{svg-jar "arrow-right-pagination"}}
</button>
</div>
{{#if (not (feature "fixNewsletterLinks"))}}
Showing {{this.startOffset}}-{{this.endOffset}} of {{this.totalLinks}}
{{/if}}
</div>
{{/if}}
</div>
{{/if}}
</div>
</div>

View file

@ -58,16 +58,10 @@ export default class FeatureService extends Service {
// labs flags
@feature('urlCache') urlCache;
@feature('beforeAfterCard') beforeAfterCard;
@feature('newsletterPaywall') newsletterPaywall;
@feature('freeTrial') freeTrial;
@feature('compExpiring') compExpiring;
@feature('memberAttribution') memberAttribution;
@feature('emailAlerts') emailAlerts;
@feature('sourceAttribution') sourceAttribution;
@feature('lexicalEditor') lexicalEditor;
@feature('audienceFeedback') audienceFeedback;
@feature('fixNewsletterLinks') fixNewsletterLinks;
@feature('suppressionList') suppressionList;
_user = null;

View file

@ -47,18 +47,11 @@
<p>Visible to members on Stripe Checkout page.</p>
</GhFormGroup>
</div>
{{#if (feature 'freeTrial')}}
<h4 class="gh-main-section-header gh-main-section-header-with-info small bn">
<span>Discount information</span>
<span class="midgrey gh-main-section-header-info tooltip-left" data-tooltip="Once saved, this cannot be changed" >{{svg-jar "info"}}</span>
</h4>
{{else}}
<h4 class="gh-main-section-header small bn">
Discount information <span class="midgrey"> &ndash; Once saved, this cannot be changed.</span>
</h4>
{{/if}}
<div class="gh-main-section-content grey">
{{#if (feature 'freeTrial')}}
<GhFormGroup>
<div>
<label class="fw6">Offer type</label>
@ -81,7 +74,6 @@
</div>
</div>
</GhFormGroup>
{{/if}}
{{#if this.isTrialOffer}}
<div class="gh-offer-tier-and-trial">
<GhFormGroup @errors={{this.errors}} @property="product-cadence">

View file

@ -70,12 +70,10 @@
<span class="blue">{{svg-jar "offer"}}</span>
<span class="blue fw6">{{gh-price-amount offer.amount}} <span class="ttu">{{offer.currency}}</span> OFF</span>
{{/if}}
{{#if (feature 'freeTrial')}}
{{#if (eq offer.type 'trial')}}
<span class="pink">{{svg-jar "offer"}}</span>
<span class="pink fw6"><span class="ttu">{{offer.amount}}</span> DAYS FREE</span>
{{/if}}
{{/if}}
{{#if (not (eq offer.type 'trial'))}}
<span class="dib ml1 midgrey ttc">
{{if (eq offer.duration 'once') "First-payment" "Repeating"}}

View file

@ -265,7 +265,7 @@
</div>
</div>
{{#if this.user.isAdmin}}
{{#if (and this.canToggleMemberAlerts (feature 'emailAlerts'))}}
{{#if this.canToggleMemberAlerts}}
<div class="user-setting-toggle">
<div>
<label for="user-email">New signups</label>

View file

@ -14,7 +14,6 @@ import {
focus,
triggerEvent
} from '@ember/test-helpers';
import {enableLabsFlag} from '../helpers/labs-flag';
import {enableMembers} from '../helpers/members';
import {enableStripe} from '../helpers/stripe';
import {expect} from 'chai';
@ -80,7 +79,6 @@ describe('Acceptance: Staff', function () {
adminRole = this.server.schema.roles.find(1);
enableMembers(this.server);
enableStripe(this.server);
enableLabsFlag(this.server, 'emailAlerts');
admin = this.server.create('user', {email: 'admin@example.com', roles: [adminRole]});
@ -906,7 +904,6 @@ describe('Acceptance: Staff', function () {
adminRole = this.server.schema.roles.find(1);
enableMembers(this.server);
enableStripe(this.server);
enableLabsFlag(this.server, 'emailAlerts');
ownerRole = this.server.create('role', {name: 'Owner'});
admin = this.server.create('user', {email: 'admin@example.com', roles: [ownerRole]});

View file

@ -3,7 +3,6 @@ const uuid = require('uuid');
const _ = require('lodash');
const config = require('../../shared/config');
const {gravatar} = require('../lib/image');
const labs = require('../../shared/labs');
const Member = ghostBookshelf.Model.extend({
tableName: 'members',
@ -154,11 +153,7 @@ const Member = ghostBookshelf.Model.extend({
.query((qb) => {
// avoids bookshelf adding a `DISTINCT` to the query
// we know the result set will already be unique and DISTINCT hurts query performance
if (labs.isSet('compExpiring')) {
qb.columns('products.*', 'expiry_at');
} else {
qb.columns('products.*');
}
qb.columns('products.*', 'expiry_at');
});
},
@ -207,9 +202,6 @@ const Member = ghostBookshelf.Model.extend({
},
async updateTierExpiry(products = [], options = {}) {
if (!labs.isSet('compExpiring')) {
return;
}
for (const product of products) {
if (product?.expiry_at) {
const expiry = new Date(product.expiry_at);

View file

@ -1,6 +1,5 @@
const ghostBookshelf = require('./base');
const _ = require('lodash');
const labs = require('../../shared/labs');
const StripeCustomerSubscription = ghostBookshelf.Model.extend({
tableName: 'members_stripe_customers_subscriptions',
@ -40,14 +39,11 @@ const StripeCustomerSubscription = ghostBookshelf.Model.extend({
default_payment_card_last4: defaultSerializedObject.default_payment_card_last4,
cancel_at_period_end: defaultSerializedObject.cancel_at_period_end,
cancellation_reason: defaultSerializedObject.cancellation_reason,
current_period_end: defaultSerializedObject.current_period_end
current_period_end: defaultSerializedObject.current_period_end,
trial_start_at: defaultSerializedObject.trial_start_at,
trial_end_at: defaultSerializedObject.trial_end_at
};
if (labs.isSet('freeTrial')) {
serialized.trial_start_at = defaultSerializedObject.trial_start_at;
serialized.trial_end_at = defaultSerializedObject.trial_end_at;
}
if (!_.isEmpty(defaultSerializedObject.stripePrice)) {
serialized.price = {
id: defaultSerializedObject.stripePrice.stripe_price_id,

View file

@ -1,5 +1,3 @@
const labs = require('../../../shared/labs');
const getSegmentsFromHtml = (html) => {
const cheerio = require('cheerio');
const $ = cheerio.load(html);
@ -11,7 +9,7 @@ const getSegmentsFromHtml = (html) => {
/**
* Always add free and paid segments if email has paywall card
*/
if (labs.isSet('newsletterPaywall') && html.indexOf('<!--members-only-->') !== -1) {
if (html.indexOf('<!--members-only-->') !== -1) {
allSegments = allSegments.concat(['status:free', 'status:-free']);
}

View file

@ -15,12 +15,6 @@ const messages = {
// flags in this list always return `true`, allows quick global enable prior to full flag removal
const GA_FEATURES = [
'newsletterPaywall',
'freeTrial',
'compExpiring',
'searchHelper',
'emailAlerts',
'fixNewsletterLinks',
'sourceAttribution',
'memberAttribution',
'audienceFeedback'

View file

@ -635,7 +635,7 @@ exports[`Settings API Edit Can edit a setting 2: [headers] 1`] = `
Object {
"access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "3603",
"content-length": "3464",
"content-type": "application/json; charset=utf-8",
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
"vary": "Accept-Version, Origin, Accept-Encoding",

View file

@ -1055,46 +1055,41 @@ module.exports = class MemberRepository {
} else {
status = 'paid';
}
if (this._labsService.isSet('compExpiring')) {
// This is an active subscription! Update member to have only this product
if (ghostProduct) {
memberProducts = [ghostProduct.toJSON()];
}
} else {
// This is an active subscription! Add the product
if (ghostProduct) {
memberProducts.push(ghostProduct.toJSON());
}
if (model) {
if (model.get('stripe_price_id') !== subscriptionData.stripe_price_id) {
// The subscription has changed plan - we may need to update the products
const subscriptions = await member.related('stripeSubscriptions').fetch(options);
const changedProduct = await this._productRepository.get({
stripe_price_id: model.get('stripe_price_id')
}, options);
// This is an active subscription! Add the product
if (ghostProduct) {
// memberProducts.push(ghostProduct.toJSON());
memberProducts = [ghostProduct.toJSON()];
}
if (model) {
if (model.get('stripe_price_id') !== subscriptionData.stripe_price_id) {
// The subscription has changed plan - we may need to update the products
let activeSubscriptionForChangedProduct = false;
const subscriptions = await member.related('stripeSubscriptions').fetch(options);
const changedProduct = await this._productRepository.get({
stripe_price_id: model.get('stripe_price_id')
}, options);
for (const subscriptionModel of subscriptions.models) {
if (this.isActiveSubscriptionStatus(subscriptionModel.get('status'))) {
try {
const subscriptionProduct = await this._productRepository.get({stripe_price_id: subscriptionModel.get('stripe_price_id')}, options);
if (subscriptionProduct && changedProduct && subscriptionProduct.id === changedProduct.id) {
activeSubscriptionForChangedProduct = true;
}
} catch (e) {
logging.error(`Failed to attach products to member - ${data.id}`);
logging.error(e);
let activeSubscriptionForChangedProduct = false;
for (const subscriptionModel of subscriptions.models) {
if (this.isActiveSubscriptionStatus(subscriptionModel.get('status'))) {
try {
const subscriptionProduct = await this._productRepository.get({stripe_price_id: subscriptionModel.get('stripe_price_id')}, options);
if (subscriptionProduct && changedProduct && subscriptionProduct.id === changedProduct.id) {
activeSubscriptionForChangedProduct = true;
}
} catch (e) {
logging.error(`Failed to attach products to member - ${data.id}`);
logging.error(e);
}
}
}
if (!activeSubscriptionForChangedProduct) {
memberProducts = memberProducts.filter((product) => {
return product.id !== changedProduct.id;
});
}
if (!activeSubscriptionForChangedProduct) {
memberProducts = memberProducts.filter((product) => {
return product.id !== changedProduct.id;
});
}
}
}