mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-22 23:56:23 +00:00
Merge pull request #18077 from overleaf/dp-teardown-share-modal-paywall-split-test
Tear down project-share-modal-paywall split test GitOrigin-RevId: b85e6cdf2243a76d071607e55a33f9909f704b76
This commit is contained in:
parent
2469c93da4
commit
2a725b3a26
11 changed files with 67 additions and 249 deletions
|
@ -538,14 +538,6 @@ const ProjectController = {
|
|||
flushToTpds: cb => {
|
||||
TpdsProjectFlusher.flushProjectToTpdsIfNeeded(projectId, cb)
|
||||
},
|
||||
sharingModalSplitTest(cb) {
|
||||
SplitTestHandler.getAssignment(
|
||||
req,
|
||||
res,
|
||||
'project-share-modal-paywall',
|
||||
cb
|
||||
)
|
||||
},
|
||||
sharingModalNullTest(cb) {
|
||||
// null test targeting logged in users, for front-end side
|
||||
SplitTestHandler.getAssignment(req, res, 'null-test-share-modal', cb)
|
||||
|
|
|
@ -772,7 +772,6 @@
|
|||
"need_to_add_new_primary_before_remove": "",
|
||||
"need_to_leave": "",
|
||||
"need_to_upgrade_for_more_collabs": "",
|
||||
"need_to_upgrade_for_more_collabs_variant": "",
|
||||
"new_compile_domain_notice": "",
|
||||
"new_file": "",
|
||||
"new_folder": "",
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
import Icon from '../../../shared/components/icon'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export default function AddCollaboratorsUpgradeContentDefault() {
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<>
|
||||
<p className="text-center">
|
||||
{t('need_to_upgrade_for_more_collabs')}. {t('also')}:
|
||||
</p>
|
||||
<ul className="list-unstyled">
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('unlimited_projects')}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('collabs_per_proj', {
|
||||
collabcount: 'Multiple',
|
||||
})}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('full_doc_history')}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('sync_to_dropbox')}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('sync_to_github')}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('compile_larger_projects')}
|
||||
</li>
|
||||
</ul>
|
||||
</>
|
||||
)
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
import Icon from '../../../shared/components/icon'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export default function AddCollaboratorsUpgradeContentVariant() {
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="row">
|
||||
<div className="col-xs-10 col-xs-offset-1">
|
||||
<p className="text-center">
|
||||
{t('need_to_upgrade_for_more_collabs_variant')}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<ul className="list-unstyled col-xs-7">
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('unlimited_projects')}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('collabs_per_proj', {
|
||||
collabcount: 'Multiple',
|
||||
})}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('full_doc_history')}
|
||||
</li>
|
||||
</ul>
|
||||
<ul className="list-unstyled col-xs-5">
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('sync_to_dropbox')}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('sync_to_github')}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('compile_larger_projects')}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<br />
|
||||
</>
|
||||
)
|
||||
}
|
|
@ -1,13 +1,10 @@
|
|||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Button } from 'react-bootstrap'
|
||||
|
||||
import { useUserContext } from '../../../shared/context/user-context'
|
||||
|
||||
import { upgradePlan } from '../../../main/account-upgrade'
|
||||
import StartFreeTrialButton from '../../../shared/components/start-free-trial-button'
|
||||
import AddCollaboratorsUpgradeContentDefault from './add-collaborators-upgrade-content-default'
|
||||
import AddCollaboratorsUpgradeContentVariant from './add-collaborators-upgrade-content-variant'
|
||||
import Icon from '../../../shared/components/icon'
|
||||
import { useSplitTestContext } from '../../../shared/context/split-test-context'
|
||||
|
||||
export default function AddCollaboratorsUpgrade() {
|
||||
|
@ -17,17 +14,47 @@ export default function AddCollaboratorsUpgrade() {
|
|||
const [startedFreeTrial, setStartedFreeTrial] = useState(false)
|
||||
const { splitTestVariants } = useSplitTestContext()
|
||||
|
||||
const variant = splitTestVariants['project-share-modal-paywall']
|
||||
const hasNewPaywallCta = splitTestVariants['paywall-cta'] === 'enabled'
|
||||
|
||||
return (
|
||||
<div className={variant === 'default' ? 'add-collaborators-upgrade' : ''}>
|
||||
{!variant || variant === 'default' ? (
|
||||
<AddCollaboratorsUpgradeContentDefault />
|
||||
) : (
|
||||
<AddCollaboratorsUpgradeContentVariant />
|
||||
)}
|
||||
|
||||
<div className="add-collaborators-upgrade">
|
||||
<p className="text-center">
|
||||
{t('need_to_upgrade_for_more_collabs')}. {t('also')}:
|
||||
</p>
|
||||
<ul className="list-unstyled">
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('unlimited_projects')}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('collabs_per_proj', {
|
||||
collabcount: 'Multiple',
|
||||
})}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('full_doc_history')}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('sync_to_dropbox')}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('sync_to_github')}
|
||||
</li>
|
||||
<li>
|
||||
<Icon type="check" />
|
||||
|
||||
{t('compile_larger_projects')}
|
||||
</li>
|
||||
</ul>
|
||||
<p className="text-center row-spaced-thin">
|
||||
{user.allowedFreeTrial ? (
|
||||
<StartFreeTrialButton
|
||||
|
|
|
@ -7,14 +7,10 @@ import OwnerInfo from './owner-info'
|
|||
import SendInvitesNotice from './send-invites-notice'
|
||||
import { useEditorContext } from '../../../shared/context/editor-context'
|
||||
import { useProjectContext } from '../../../shared/context/project-context'
|
||||
import { useSplitTestContext } from '../../../shared/context/split-test-context'
|
||||
import { useMemo } from 'react'
|
||||
import { Row } from 'react-bootstrap'
|
||||
import RecaptchaConditions from '../../../shared/components/recaptcha-conditions'
|
||||
|
||||
export default function ShareModalBody() {
|
||||
const { splitTestVariants } = useSplitTestContext()
|
||||
|
||||
const { members, invites, features } = useProjectContext()
|
||||
const { isProjectOwner } = useEditorContext()
|
||||
|
||||
|
@ -32,123 +28,37 @@ export default function ShareModalBody() {
|
|||
return members.length + invites.length < (features.collaborators ?? 1)
|
||||
}, [members, invites, features, isProjectOwner])
|
||||
|
||||
switch (splitTestVariants['project-share-modal-paywall']) {
|
||||
case 'new-copy-top':
|
||||
return (
|
||||
<>
|
||||
{isProjectOwner ? (
|
||||
<>
|
||||
<SendInvites canAddCollaborators={canAddCollaborators} />
|
||||
<Row className="public-access-level" />
|
||||
</>
|
||||
) : (
|
||||
<SendInvitesNotice />
|
||||
)}
|
||||
return (
|
||||
<>
|
||||
{isProjectOwner && <LinkSharing />}
|
||||
|
||||
<OwnerInfo />
|
||||
<OwnerInfo />
|
||||
|
||||
{members.map(member =>
|
||||
isProjectOwner ? (
|
||||
<EditMember key={member._id} member={member} />
|
||||
) : (
|
||||
<ViewMember key={member._id} member={member} />
|
||||
)
|
||||
)}
|
||||
{members.map(member =>
|
||||
isProjectOwner ? (
|
||||
<EditMember key={member._id} member={member} />
|
||||
) : (
|
||||
<ViewMember key={member._id} member={member} />
|
||||
)
|
||||
)}
|
||||
|
||||
{invites.map(invite => (
|
||||
<Invite
|
||||
key={invite._id}
|
||||
invite={invite}
|
||||
isProjectOwner={isProjectOwner}
|
||||
/>
|
||||
))}
|
||||
{invites.map(invite => (
|
||||
<Invite
|
||||
key={invite._id}
|
||||
invite={invite}
|
||||
isProjectOwner={isProjectOwner}
|
||||
/>
|
||||
))}
|
||||
|
||||
{isProjectOwner && (
|
||||
<>
|
||||
<br />
|
||||
<LinkSharing />
|
||||
</>
|
||||
)}
|
||||
{isProjectOwner ? (
|
||||
<SendInvites canAddCollaborators={canAddCollaborators} />
|
||||
) : (
|
||||
<SendInvitesNotice />
|
||||
)}
|
||||
|
||||
{!window.ExposedSettings.recaptchaDisabled?.invite && (
|
||||
<RecaptchaConditions />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
case 'new-copy-middle':
|
||||
return (
|
||||
<>
|
||||
<OwnerInfo />
|
||||
|
||||
{members.map(member =>
|
||||
isProjectOwner ? (
|
||||
<EditMember key={member._id} member={member} />
|
||||
) : (
|
||||
<ViewMember key={member._id} member={member} />
|
||||
)
|
||||
)}
|
||||
|
||||
{invites.map(invite => (
|
||||
<Invite
|
||||
key={invite._id}
|
||||
invite={invite}
|
||||
isProjectOwner={isProjectOwner}
|
||||
/>
|
||||
))}
|
||||
|
||||
{isProjectOwner ? (
|
||||
<SendInvites canAddCollaborators={canAddCollaborators} />
|
||||
) : (
|
||||
<SendInvitesNotice />
|
||||
)}
|
||||
|
||||
{isProjectOwner && (
|
||||
<>
|
||||
<br />
|
||||
<LinkSharing />
|
||||
</>
|
||||
)}
|
||||
|
||||
{!window.ExposedSettings.recaptchaDisabled?.invite && (
|
||||
<RecaptchaConditions />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
case 'new-copy-bottom':
|
||||
case 'default':
|
||||
default:
|
||||
return (
|
||||
<>
|
||||
{isProjectOwner && <LinkSharing />}
|
||||
|
||||
<OwnerInfo />
|
||||
|
||||
{members.map(member =>
|
||||
isProjectOwner ? (
|
||||
<EditMember key={member._id} member={member} />
|
||||
) : (
|
||||
<ViewMember key={member._id} member={member} />
|
||||
)
|
||||
)}
|
||||
|
||||
{invites.map(invite => (
|
||||
<Invite
|
||||
key={invite._id}
|
||||
invite={invite}
|
||||
isProjectOwner={isProjectOwner}
|
||||
/>
|
||||
))}
|
||||
|
||||
{isProjectOwner ? (
|
||||
<SendInvites canAddCollaborators={canAddCollaborators} />
|
||||
) : (
|
||||
<SendInvitesNotice />
|
||||
)}
|
||||
|
||||
{!window.ExposedSettings.recaptchaDisabled?.invite && (
|
||||
<RecaptchaConditions />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
{!window.ExposedSettings.recaptchaDisabled?.invite && (
|
||||
<RecaptchaConditions />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -909,7 +909,6 @@
|
|||
"need_to_add_new_primary_before_remove": "Du bliver nødt til at tilføje en ny primær e-mailaddresse før du kan slette denne.",
|
||||
"need_to_leave": "Nød til at gå?",
|
||||
"need_to_upgrade_for_more_collabs": "Du bliver nød til at opgradere din konto for at tilføje flere samarbejdspartnere",
|
||||
"need_to_upgrade_for_more_collabs_variant": "Du har nået det maksimale antal samarbejdspartnere. Opgradér din konto for at tilføje flere.",
|
||||
"new_file": "Ny fil",
|
||||
"new_folder": "Ny mappe",
|
||||
"new_name": "Nyt navn",
|
||||
|
|
|
@ -903,7 +903,6 @@
|
|||
"need_to_add_new_primary_before_remove": "Du musst eine neue primäre E-Mail-Adresse hinzufügen, bevor du diese entfernen kannst.",
|
||||
"need_to_leave": "Du musst gehen?",
|
||||
"need_to_upgrade_for_more_collabs": "Du musst dein Konto upgraden um mehr Mitarbeiter hinzuzufügen",
|
||||
"need_to_upgrade_for_more_collabs_variant": "Du hast die maximale Anzahl an Mitbearbeitern erreicht. Führe ein Upgrade für dein Konto aus, um weitere hinzuzufügen.",
|
||||
"new_file": "Neue Datei",
|
||||
"new_folder": "Neuer Ordner",
|
||||
"new_name": "Neuer Name",
|
||||
|
|
|
@ -1140,7 +1140,6 @@
|
|||
"need_to_add_new_primary_before_remove": "You’ll need to add a new primary email address before you can remove this one.",
|
||||
"need_to_leave": "Need to leave?",
|
||||
"need_to_upgrade_for_more_collabs": "You need to upgrade your account to add more collaborators",
|
||||
"need_to_upgrade_for_more_collabs_variant": "You have reached the maximum number of collaborators. Upgrade your account to add more.",
|
||||
"new_compile_domain_notice": "We’ve recently migrated PDF downloads to a new domain. Something might be blocking your browser from accessing that new domain, <0>__compilesUserContentDomain__</0>. This could be caused by network blocking or a strict browser plugin rule. Please follow our <1>troubleshooting guide</1>.",
|
||||
"new_file": "New File",
|
||||
"new_folder": "New Folder",
|
||||
|
|
|
@ -549,7 +549,6 @@
|
|||
"need_to_add_new_primary_before_remove": "Du måste lägga till en ny primär e-post-adress innan du kan ta bort den här.",
|
||||
"need_to_leave": "Vill du lämna?",
|
||||
"need_to_upgrade_for_more_collabs": "Du måste uppgradera ditt konto för att lägga till fler samarbetspartners",
|
||||
"need_to_upgrade_for_more_collabs_variant": "Du har nått det maximala antalet medarbetare. Uppgradera ditt konto för att lägga till fler.",
|
||||
"new_file": "Ny fil",
|
||||
"new_folder": "Ny mapp",
|
||||
"new_name": "Nytt namn",
|
||||
|
|
|
@ -1136,7 +1136,6 @@
|
|||
"need_to_add_new_primary_before_remove": "在删除此电子邮件地址之前,您需要添加一个新的主电子邮件地址。",
|
||||
"need_to_leave": "确定要删除账号?",
|
||||
"need_to_upgrade_for_more_collabs": "您的账户需要升级方可添加更多的合作者",
|
||||
"need_to_upgrade_for_more_collabs_variant": "您已达到协作者的最大数量。 升级您的帐户以添加更多协作者。",
|
||||
"new_compile_domain_notice": "我们最近将 PDF 下载迁移到了新域,可能会阻止您的浏览器访问新域 <0>__compilesUserContentDomain__</0>。 这可能是由网络阻止或严格的浏览器插件规则引起的。 请查阅我们的<1>问题排查指南</1>。",
|
||||
"new_file": "新建文件",
|
||||
"new_folder": "新建目录",
|
||||
|
|
Loading…
Add table
Reference in a new issue