mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Teardown premium features discoverability and implement variant
GitOrigin-RevId: 46dfa1aae117e1862c828bed568085dcd59acd8b
This commit is contained in:
parent
7c812162a1
commit
37b598fa5a
8 changed files with 4 additions and 61 deletions
|
@ -222,16 +222,6 @@ async function userSubscriptionPage(req, res) {
|
|||
|
||||
const cancelButtonNewCopy = cancelButtonAssignment?.variant === 'new-copy'
|
||||
|
||||
const premiumFeaturesDiscoverabilityAssignment =
|
||||
await SplitTestHandler.promises.getAssignment(
|
||||
req,
|
||||
res,
|
||||
'premium-features-discoverability'
|
||||
)
|
||||
|
||||
const premiumFeaturesDiscoverability =
|
||||
premiumFeaturesDiscoverabilityAssignment?.variant === 'active'
|
||||
|
||||
const data = {
|
||||
title: 'your_subscription',
|
||||
plans,
|
||||
|
@ -248,7 +238,6 @@ async function userSubscriptionPage(req, res) {
|
|||
currentInstitutionsWithLicence,
|
||||
groupPlanModalOptions,
|
||||
cancelButtonNewCopy,
|
||||
premiumFeaturesDiscoverability,
|
||||
}
|
||||
res.render('subscriptions/dashboard', data)
|
||||
}
|
||||
|
@ -332,16 +321,6 @@ async function successfulSubscription(req, res) {
|
|||
user
|
||||
)
|
||||
|
||||
const premiumFeaturesDiscoverabilityAssignment =
|
||||
await SplitTestHandler.promises.getAssignment(
|
||||
req,
|
||||
res,
|
||||
'premium-features-discoverability'
|
||||
)
|
||||
|
||||
const premiumFeaturesDiscoverability =
|
||||
premiumFeaturesDiscoverabilityAssignment?.variant === 'active'
|
||||
|
||||
const postCheckoutRedirect = req.session?.postCheckoutRedirect
|
||||
|
||||
if (!personalSubscription) {
|
||||
|
@ -350,7 +329,6 @@ async function successfulSubscription(req, res) {
|
|||
res.render('subscriptions/successful_subscription', {
|
||||
title: 'thank_you',
|
||||
personalSubscription,
|
||||
premiumFeaturesDiscoverability,
|
||||
postCheckoutRedirect,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -79,10 +79,7 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
|||
webRouter.get(
|
||||
'*',
|
||||
expressify(
|
||||
SplitTestMiddleware.loadAssignmentsInLocals([
|
||||
'unified-navigation',
|
||||
'premium-features-discoverability',
|
||||
])
|
||||
SplitTestMiddleware.loadAssignmentsInLocals(['unified-navigation'])
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -93,19 +93,6 @@ nav.navbar.navbar-default.navbar-main
|
|||
each child in item.dropdown
|
||||
if child.divider
|
||||
li.divider
|
||||
if child.splitTest
|
||||
if (splitTestVariants && (splitTestVariants[child.splitTest.name] === child.splitTest.variant))
|
||||
li
|
||||
if child.url
|
||||
a(
|
||||
href=child.url,
|
||||
class=child.class,
|
||||
event-tracking=child.event
|
||||
event-tracking-mb="true"
|
||||
event-tracking-trigger="click"
|
||||
) !{translate(child.text)}
|
||||
else
|
||||
| !{translate(child.text)}
|
||||
else
|
||||
li
|
||||
if child.url
|
||||
|
|
|
@ -67,19 +67,6 @@ nav.navbar.navbar-default.navbar-main
|
|||
each child in item.dropdown
|
||||
if child.divider
|
||||
li.divider
|
||||
if child.splitTest
|
||||
if (splitTestVariants && (splitTestVariants[child.splitTest.name] === child.splitTest.variant))
|
||||
li
|
||||
if child.url
|
||||
a(
|
||||
href=child.url,
|
||||
class=child.class,
|
||||
event-tracking=child.event
|
||||
event-tracking-mb="true"
|
||||
event-tracking-trigger="click"
|
||||
) !{translate(child.text)}
|
||||
else
|
||||
| !{translate(child.text)}
|
||||
else
|
||||
li
|
||||
if child.url
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
if premiumFeaturesDiscoverability
|
||||
p !{translate("get_most_subscription_by_checking_premium_features", {}, [{name: 'a', attrs: {href: '/learn/how-to/Overleaf_premium_features'}}])}
|
||||
p !{translate("get_most_subscription_by_checking_premium_features", {}, [{name: 'a', attrs: {href: '/learn/how-to/Overleaf_premium_features'}}])}
|
|
@ -58,10 +58,7 @@ block content
|
|||
else
|
||||
p(ng-non-bindable)
|
||||
| You are on the #{settings.appName} Free plan. Upgrade to access these
|
||||
if premiumFeaturesDiscoverability
|
||||
a(href="/learn/how-to/Overleaf_premium_features") Premium Features:
|
||||
else
|
||||
| Premium Features:
|
||||
a(href="/learn/how-to/Overleaf_premium_features") Premium Features:
|
||||
ul
|
||||
li #{translate('invite_more_collabs')}
|
||||
for feature in ['realtime_track_changes', 'full_doc_history', 'reference_search', 'reference_sync', 'dropbox_integration_lowercase', 'github_integration_lowercase', 'priority_support']
|
||||
|
|
|
@ -20,8 +20,7 @@ block content
|
|||
a.btn.btn-success.btn-large(href=`/manage/groups/${personalSubscription._id}/members`) #{translate("add_your_first_group_member_now")}
|
||||
p.letter-from-founders
|
||||
p #{translate("thanks_for_subscribing_you_help_sl", {planName:personalSubscription.plan.name})}
|
||||
if premiumFeaturesDiscoverability
|
||||
p !{translate("get_most_subscription_by_checking_premium_features", {}, [{name: 'a', attrs: {href: 'https://www.overleaf.com/learn/how-to/Overleaf_premium_features'}}])}
|
||||
p !{translate("get_most_subscription_by_checking_premium_features", {}, [{name: 'a', attrs: {href: 'https://www.overleaf.com/learn/how-to/Overleaf_premium_features'}}])}
|
||||
p #{translate("need_anything_contact_us_at")}
|
||||
a(href=`mailto:${settings.adminEmail}`, ng-non-bindable) #{settings.adminEmail}
|
||||
| .
|
||||
|
|
|
@ -403,7 +403,6 @@ describe('SubscriptionController', function () {
|
|||
assert.deepEqual(variables, {
|
||||
title: 'thank_you',
|
||||
personalSubscription: 'foo',
|
||||
premiumFeaturesDiscoverability: false,
|
||||
postCheckoutRedirect: undefined,
|
||||
})
|
||||
done()
|
||||
|
|
Loading…
Reference in a new issue