Use winning website redesign variant (#17200)

* Implement redesign on the default urls and redirect variants to defaults

* Fix Features & Benefits inconsistent case, cleanup temp translation

* Replace header_extras with the website redesign header extras

* Delete old home page

* Remove real time edits javascript (old home page)

* Cleanup unused locales

* Temporarily disable test that checked about/features-overview page

* Fix business/universities links in customer stories

GitOrigin-RevId: 9d2ee64c2622ffea7a2c2f7448a5e5beae3187e9
This commit is contained in:
Thomas 2024-02-20 11:45:31 +01:00 committed by Copybot
parent 826020effe
commit 1019142457
10 changed files with 29 additions and 177 deletions

View file

@ -26,7 +26,10 @@ const SplitTestHandler = require('../SplitTests/SplitTestHandler')
const logger = require('@overleaf/logger')
const homepageExists = fs.existsSync(
Path.join(__dirname, '/../../../views/external/home/v2.pug')
Path.join(
__dirname,
'/../../../views/external/home/website-redesign/index.pug'
)
)
module.exports = HomeController = {
@ -44,16 +47,6 @@ module.exports = HomeController = {
async home(req, res) {
if (Features.hasFeature('homepage') && homepageExists) {
const websiteRedesignVariant =
res.locals.splitTestVariants?.['website-redesign']
const websiteRedesignActive =
websiteRedesignVariant === 'new-design' ||
websiteRedesignVariant === 'new-design-registration'
if (websiteRedesignActive) {
return res.redirect(302, '/home-2')
}
const onboardingFlowAssignment =
await SplitTestHandler.promises.getAssignment(
req,
@ -62,33 +55,6 @@ module.exports = HomeController = {
)
AnalyticsManager.recordEventForSession(req.session, 'home-page-view', {
page: req.path,
'website-redesign': websiteRedesignVariant,
})
return res.render('external/home/v2', {
onboardingFlowVariant: onboardingFlowAssignment.variant,
hideNewsletterCheckbox:
onboardingFlowAssignment.variant === 'token-confirmation-odc',
})
} else {
return res.redirect('/login')
}
},
async homeNew(req, res) {
if (Features.hasFeature('homepage') && homepageExists) {
const websiteRedesignVariant =
res.locals.splitTestVariants?.['website-redesign']
const onboardingFlowAssignment =
await SplitTestHandler.promises.getAssignment(
req,
res,
'onboarding-flow'
)
AnalyticsManager.recordEventForSession(req.session, 'home-page-view', {
page: req.path,
'website-redesign': websiteRedesignVariant,
})
return res.render('external/home/website-redesign/index', {

View file

@ -15,7 +15,6 @@ module.exports = {
apply(webRouter) {
webRouter.get('/', HomeController.index)
webRouter.get('/home', HomeController.home)
webRouter.get('/home-2', HomeController.homeNew)
webRouter.get(
'/planned_maintenance',

View file

@ -90,16 +90,12 @@ async function plansPage(req, res) {
'annual-trials'
)
const websiteRedesignVariant =
res.locals.splitTestVariants?.['website-redesign']
const plansPageViewSegmentation = {
currency: recommendedCurrency,
countryCode,
'geo-pricing-inr-group': geoPricingINRTestVariant,
'geo-pricing-inr-page': currency === 'INR' ? 'inr' : 'default',
'annual-trials': annualTrialsAssignment.variant,
'website-redesign': websiteRedesignVariant,
}
if (inrGeoBannerSplitTestName) {
plansPageViewSegmentation[inrGeoBannerSplitTestName] = inrGeoBannerVariant

View file

@ -43,17 +43,10 @@ async function recordRegistrationEvent(user) {
'onboarding-flow'
)
const websiteRedesignAssignment =
await SplitTestHandler.promises.getAssignmentForUser(
user._id,
'website-redesign'
)
try {
const segmentation = {
'home-registration': 'default',
'onboarding-flow': onboardingFlowAssignment.variant,
'website-redesign': websiteRedesignAssignment.variant,
}
if (user.thirdPartyIdentifiers && user.thirdPartyIdentifiers.length > 0) {
segmentation.provider = user.thirdPartyIdentifiers[0].providerId

View file

@ -9,7 +9,6 @@ const request = require('request')
const contentDisposition = require('content-disposition')
const Features = require('./Features')
const SessionManager = require('../Features/Authentication/SessionManager')
const SplitTestMiddleware = require('../Features/SplitTests/SplitTestMiddleware')
const PackageVersions = require('./PackageVersions')
const Modules = require('./Modules')
const {
@ -19,7 +18,6 @@ const {
const {
addOptionalCleanupHandlerAfterDrainingConnections,
} = require('./GracefulShutdown')
const { expressify } = require('@overleaf/promise-utils')
const IEEE_BRAND_ID = Settings.ieeeBrandId
@ -78,12 +76,6 @@ function getWebpackAssets(entrypoint, section) {
}
module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
webRouter.use(
expressify(
SplitTestMiddleware.loadAssignmentsInLocals(['website-redesign'])
)
)
if (process.env.NODE_ENV === 'development') {
// In the dev-env, delay requests until we fetched the manifest once.
webRouter.use(function (req, res, next) {

View file

@ -1,5 +1,3 @@
- var websiteRedesignActive = splitTestVariants && (splitTestVariants['website-redesign'] === 'new-design' || splitTestVariants['website-redesign'] === 'new-design-registration')
footer.fat-footer.hidden-print
.fat-footer-container(role="navigation" aria-label=translate('footer_navigation'))
.fat-footer-sections(class=hideFatFooter ? 'hidden' : undefined)
@ -71,9 +69,8 @@ footer.fat-footer.hidden-print
h2.footer-section-heading #{translate('help')}
ul.list-unstyled
if websiteRedesignActive
li
a(href="/about/why-latex") #{translate('why_latex')}
li
a(href="/about/why-latex") #{translate('why_latex')}
li
a(href="/learn") #{translate('Documentation')}
li

View file

@ -1,5 +1,3 @@
- var websiteRedesignActive = splitTestVariants && (splitTestVariants['website-redesign'] === 'new-design' || splitTestVariants['website-redesign'] === 'new-design-registration')
nav.navbar.navbar-default.navbar-main
.container-fluid
.navbar-header
@ -66,8 +64,7 @@ nav.navbar.navbar-default.navbar-main
a(href="/admin/survey") Manage Surveys
// loop over header_extras
- var headerExtras = websiteRedesignActive ? nav.header_extras_website_redesign : nav.header_extras
each item in headerExtras
each item in nav.header_extras
-
if ((item.only_when_logged_in && getSessionUser())
|| (item.only_when_logged_out && (!getSessionUser()))
@ -130,48 +127,26 @@ nav.navbar.navbar-default.navbar-main
if !getSessionUser()
// register link
if hasFeature('registration-page')
if websiteRedesignActive
li.primary
a(
href="/register"
event-tracking="menu-clicked-register"
event-tracking-action="clicked"
event-tracking-trigger="click"
event-tracking-mb="true"
event-segmentation={ page: currentUrl }
) #{translate('sign_up')}
else
li
a(
href="/register"
event-tracking="menu-clicked-register"
event-tracking-action="clicked"
event-tracking-trigger="click"
event-tracking-mb="true"
event-segmentation={ page: currentUrl }
) #{translate('register')}
li.primary
a(
href="/register"
event-tracking="menu-clicked-register"
event-tracking-action="clicked"
event-tracking-trigger="click"
event-tracking-mb="true"
event-segmentation={ page: currentUrl }
) #{translate('sign_up')}
// login link
if websiteRedesignActive
li
a(
href="/login"
event-tracking="menu-clicked-login"
event-tracking-action="clicked"
event-tracking-trigger="click"
event-tracking-mb="true"
event-segmentation={ page: currentUrl }
) #{translate('log_in')}
else
li
a(
href="/login"
event-tracking="menu-clicked-login"
event-tracking-action="clicked"
event-tracking-trigger="click"
event-tracking-mb="true"
event-segmentation={ page: currentUrl }
).text-capitalize #{translate('log_in')}
li
a(
href="/login"
event-tracking="menu-clicked-login"
event-tracking-action="clicked"
event-tracking-trigger="click"
event-tracking-mb="true"
event-segmentation={ page: currentUrl }
) #{translate('log_in')}
// projects link and account menu
if getSessionUser()

View file

@ -64,7 +64,7 @@ nav.navbar.navbar-default.navbar-main.website-redesign-navbar
a(href="/admin/survey") Manage Surveys
// loop over header_extras
each item in nav.header_extras_website_redesign
each item in nav.header_extras
-
if ((item.only_when_logged_in && getSessionUser())
|| (item.only_when_logged_out && (!getSessionUser()))

View file

@ -1,36 +1,5 @@
import '../../marketing'
function realTimeEditsDemo() {
const frames = [
{ before: '', time: 1000 },
{ before: 'i', time: 100 },
{ before: 'in', time: 200 },
{ before: 'in ', time: 300 },
{ before: 'in r', time: 100 },
{ before: 'in re', time: 200 },
{ before: 'in rea', time: 100 },
{ before: 'in real', time: 200 },
{ before: 'in real ', time: 400 },
{ before: 'in real t', time: 200 },
{ before: 'in real ti', time: 100 },
{ before: 'in real tim', time: 200 },
{ before: 'in real time', time: 2000 },
]
let index = 0
function nextFrame() {
const frame = frames[index]
index = (index + 1) % frames.length
$('.real-time-example').html(frame.before + "<div class='cursor'>|</div>")
setTimeout(nextFrame, frame.time)
}
nextFrame()
}
if (document.querySelector('.real-time-example')) {
realTimeEditsDemo()
}
function homepageAnimation(homepageAnimationEl) {
function createFrames(word, { buildTime, holdTime, breakTime }) {
const frames = []

View file

@ -34,7 +34,6 @@
"accept_terms_and_conditions": "Accept terms and conditions",
"accepted_invite": "Accepted invite",
"accepting_invite_as": "You are accepting this invite as",
"acces_work_from_anywhere": "Access your work from anywhere in the world",
"access_denied": "Access Denied",
"account": "Account",
"account_has_been_link_to_institution_account": "Your __appName__ account on <b>__email__</b> has been linked to your <b>__institutionName__</b> institutional account.",
@ -91,7 +90,6 @@
"all": "All",
"all_borders": "All borders",
"all_our_group_plans_offer_educational_discount": "All of our <0>group plans</0> offer an <1>educational discount</1> for students and faculty",
"all_packages_and_templates": "All the packages and <0>__templatesLink__</0> you need",
"all_premium_features": "All premium features",
"all_premium_features_including": "All premium features, including:",
"all_prices_displayed_are_in_currency": "All prices displayed are in __recommendedCurrency__.",
@ -190,8 +188,6 @@
"can_link_to_sl_with_html": "You can link to __appName__ with the following HTML:",
"can_link_your_institution_acct_2": "You can now <0>link</0> your <0>__appName__</0> account to your <0>__institutionName__</0> institutional account.",
"can_now_relink_dropbox": "You can now <0>relink your Dropbox account</0>.",
"can_revert_back_blurb": "In a collaboration or on your own, sometimes mistakes are made. Reverting back to previous versions is simple and removes the risk of losing work or regretting a change.",
"can_see_collabs_type_blurb": "If multiple people want to work on a document at the same time then thats no problem. You can see where your colleagues are typing directly in the editor and their changes show up on your screen immediately.",
"cancel": "Cancel",
"cancel_anytime": "Were confident that youll love __appName__, but if not you can cancel anytime. Well give you your money back, no questions asked, if you let us know within 30 days.",
"cancel_my_account": "Cancel my subscription",
@ -423,7 +419,6 @@
"do_you_want_to_overwrite_it": "Do you want to overwrite it?",
"do_you_want_to_overwrite_it_plural": "Do you want to overwrite them?",
"do_you_want_to_overwrite_them": "Do you want to overwrite them?",
"document_history": "Document history",
"document_too_long": "Document Too Long",
"document_too_long_detail": "Sorry, this file is too long to be edited manually. Please upload it directly.",
"document_updated_externally": "Document Updated Externally",
@ -473,7 +468,6 @@
"duplicate_file": "Duplicate File",
"duplicate_projects": "This user has projects with duplicate names",
"each_user_will_have_access_to": "Each user will have access to",
"ease_of_use": " Ease of Use",
"easily_manage_your_project_files_everywhere": "Easily manage your project files, everywhere",
"edit": "Edit",
"edit_dictionary": "Edit Dictionary",
@ -537,7 +531,6 @@
"es": "Spanish",
"estimated_number_of_users": "Estimated Number of Users",
"every": "per",
"evolved": "Evolved",
"example": "Example",
"example_project": "Example Project",
"examples": "Examples",
@ -629,19 +622,15 @@
"for_american_express": "For <0>American Express</0>, the <1>4 digits</1> on the <2>front</2> of your card.",
"for_business": "For business",
"for_enterprise": "For enterprise",
"for_enterprises": "For Enterprises",
"for_groups": "For Groups",
"for_groups_or_site_wide": "For groups or site-wide",
"for_individuals_and_groups": "For individuals &amp; groups",
"for_more_information_see_managed_accounts_section": "For more information, see the \"Managed Accounts\" section in <0>our terms of use</0>, which you agree to by clicking Accept invitation.",
"for_publishers": "For Publishers",
"for_publishers": "For publishers",
"for_students": "For students",
"for_students_only": "For students only",
"for_teaching": "For Teaching",
"for_universities": "For Universities",
"for_universities_lowercase": "For universities",
"for_teaching": "For teaching",
"for_universities": "For universities",
"for_visa_mastercard_and_discover": "For <0>Visa, MasterCard and Discover</0>, the <1>3 digits</1> on the <2>back</2> of your card.",
"for_writing": "For Writing",
"forgot_your_password": "Forgot your password",
"format": "Format",
"found_matching_deleted_users": "Found __deletedUserCount__ matching deleted users",
@ -678,8 +667,6 @@
"get_in_touch_having_problems": "<a href=\"__link__\">Get in touch with support</a> if youre having problems",
"get_involved": "Get involved",
"get_most_subscription_by_checking_features": "Get the most out of your __appName__ subscription by checking out <0>__appName__s features</0>.",
"get_same_latex_setup": "With __appName__ you get the same LaTeX set-up wherever you go. By working with your colleagues and students on __appName__, you know that youre not going to hit any version inconsistencies or package conflicts.",
"get_started_now": "Get started now",
"get_the_most_out_headline": "Get the most out of __appName__ with features such as:",
"git": "Git",
"git_authentication_token": "Git authentication token",
@ -970,7 +957,6 @@
"latex_editor_info": "Everything you need in a modern LaTeX editor --- spell check, intelligent autocomplete, syntax highlighting, dozens of color themes, vim and emacs bindings, help with LaTeX warnings and error messages, and much more.",
"latex_examples_page_summary": "Examples of powerful LaTeX packages and techniques in use — a great way to learn LaTeX by example. Search or browse below.",
"latex_examples_page_title": "Examples - Equations, Formatting, TikZ, Packages and More",
"latex_guides": "LaTeX guides",
"latex_in_thirty_minutes": "LaTeX in 30 minutes",
"latex_places_figures_according_to_a_special_algorithm": "LaTeX places figures according to a special algorithm. You can use something called placement parameters to influence the positioning of the figure. <0>Find out how</>",
"latex_places_tables_according_to_a_special_algorithm": "LaTeX places tables according to a special algorithm. You can use “placement parameters” to influence the position of the table. <0>This article</0> explains how to do this.",
@ -1188,7 +1174,6 @@
"no_borders": "No borders",
"no_caption": "No caption",
"no_comments": "No comments",
"no_complicated_latex_install": "No complicated LaTeX installation",
"no_existing_password": "Please use the password reset form to set your password",
"no_featured_templates": "No featured templates",
"no_folder": "No folder",
@ -1222,7 +1207,6 @@
"not_registered": "Not registered",
"note_experiments_under_development": "<0>Please note</0> that experiments in this program are still being tested and actively developed. This means that they might <0>change</0>, be <0>removed</0> or <0>become part of a paid plan</0>",
"note_features_under_development": "<0>Please note</0> that features in this program are still being tested and actively developed. This means that they might <0>change</0>, be <0>removed</0> or <0>become part of a premium plan</0>",
"nothing_to_install_ready_to_go": "Theres nothing complicated or difficult for you to install, and you can <0>__start_now__</0>, even if youve never seen it before. __appName__ comes with a complete, ready to go LaTeX environment which runs on our servers.",
"notification_features_upgraded_by_affiliation": "Good news! Your affiliated organization __institutionName__ has an Overleaf subscription, and you now have access to all of Overleafs Professional features.",
"notification_ieee_collabratec_retirement_message": "From January 31, IEEE is no longer providing access to Overleaf premium features for Collabratec users. Please contact <0>authors@ieee.org</0> with any questions. Need to upgrade? <1>View our plans</1>",
"notification_personal_and_group_subscriptions": "Weve spotted that youve got <0>more than one active __appName__ subscription</0>. To avoid paying more than you need to, <1>review your subscriptions</1>.",
@ -1277,7 +1261,6 @@
"out_of_sync_detail": "Sorry, this file has gone out of sync and we need to do a full refresh.<0 /><1>Please see this help guide for more information</1>",
"output_file": "Output file",
"over": "over",
"over_x_templates_easy_getting_started": "There are thousands of __templates__ in our template gallery, so its really easy to get started, whether youre writing a journal article, thesis, CV or something else.",
"overall_theme": "Overall theme",
"overleaf": "Overleaf",
"overleaf_history_system": "Overleaf History System",
@ -1557,7 +1540,6 @@
"resolved_comments": "Resolved comments",
"restore": "Restore",
"restore_file": "Restore file",
"restore_to_any_older_version": "Restore to any older version",
"restoring": "Restoring",
"restricted": "Restricted",
"restricted_no_permission": "Restricted, sorry you dont have permission to load this page.",
@ -1625,7 +1607,6 @@
"secondary_email_password_reset": "That email is registered as a secondary email. Please enter the primary email for your account.",
"security": "Security",
"see_changes_in_your_documents_live": "See changes in your documents, live",
"see_what_has_been": "See what has been ",
"select_a_column_or_a_merged_cell_to_align": "Select a column or a merged cell to align",
"select_a_column_to_adjust_column_width": "Select a column to adjust column width",
"select_a_file": "Select a File",
@ -1707,17 +1688,14 @@
"showing_x_results": "Showing __x__ results",
"showing_x_results_of_total": "Showing __x__ results of __total__",
"sign_up": "Sign up",
"sign_up_now": "Sign Up Now",
"signature_algorithm": "Signature algorithm",
"single_sign_on_sso": "Single Sign-On (SSO)",
"single_version_easy_collab_blurb": "__appName__ makes sure that youre always up to date with your collaborators and what they are doing. There is only a single master version of each document which everyone has access to. Its impossible to make conflicting changes, and you dont have to wait for your colleagues to send you the latest draft before you can keep working.",
"site_description": "An online LaTeX editor thats easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more.",
"sitewide_option_available": "Site-wide option available",
"sitewide_option_available_info": "Users are automatically upgraded when they register or add their email address to Overleaf (domain-based enrollment or SSO).",
"skip": "Skip",
"skip_to_content": "Skip to content",
"sl_gives_you_free_stuff_see_progress_below": "When someone starts using __appName__ after your recommendation well give you some <strong>free stuff</strong> to say thanks! Check your progress below.",
"sl_included_history_of_changes_blurb": "__appName__ includes a history of all of your changes so you can see exactly who changed what, and when. This makes it extremely easy to keep up to date with any progress made by your collaborators and allows you to review recent work.",
"something_not_right": "Somethings not right",
"something_went_wrong": "Something went wrong",
"something_went_wrong_canceling_your_subscription": "Something went wrong canceling your subscription. Please contact support.",
@ -1792,8 +1770,6 @@
"start_typing_find_your_company": " Start typing to find your company",
"start_typing_find_your_organization": "Start typing to find your organization",
"start_typing_find_your_university": "Start typing to find your university",
"start_using_latex_now": "start using LaTeX right now",
"start_using_sl_now": "Start using __appName__ now",
"state": "State",
"status_checks": "Status Checks",
"still_have_questions": "Still have questions?",
@ -1824,7 +1800,6 @@
"success_sso_set_up": "Success! Single sign-on is all set up for you.",
"suggested": "Suggested",
"suggestion": "Suggestion",
"support_lots_of_features": "We support almost all LaTeX features, including inserting images, bibliographies, equations, and much more! Read about all the exciting things you can do with __appName__ in our <0>__help_guides_link__</0>",
"sure_you_want_to_cancel_plan_change": "Are you sure you want to revert your scheduled plan change? You will remain subscribed to the <0>__planName__</0> plan.",
"sure_you_want_to_change_plan": "Are you sure you want to change plan to <0>__planName__</0>?",
"sure_you_want_to_delete": "Are you sure you want to permanently delete the following files?",
@ -1883,7 +1858,6 @@
"thanks_for_subscribing": "Thanks for subscribing!",
"thanks_for_subscribing_you_help_sl": "Thank you for subscribing to the __planName__ plan. Its support from people like yourself that allows __appName__ to continue to grow and improve.",
"thanks_settings_updated": "Thanks, your settings have been updated.",
"the_easy_online_collab_latex_editor": "The easy to use, online, collaborative LaTeX editor",
"the_file_supplied_is_of_an_unsupported_type ": "The link to open this content on Overleaf pointed to the wrong kind of file. Valid file types are .tex documents and .zip files. If this keeps happening for links on a particular site, please report this to them.",
"the_following_files_already_exist_in_this_project": "The following files already exist in this project:",
"the_following_folder_already_exists_in_this_project": "The following folder already exists in this project:",
@ -2113,7 +2087,6 @@
"verify_email_address_before_enabling_managed_users": "You need to verify your email address before enabling managed users.",
"view_all": "View All",
"view_code": "View code",
"view_collab_edits": "View collaborator edits ",
"view_configuration": "View configuration",
"view_group_members": "View group members",
"view_hub": "View Admin Hub",
@ -2128,8 +2101,6 @@
"view_more": "View more",
"view_pdf": "View PDF",
"view_source": "View Source",
"view_templates": "View templates",
"view_which_changes": "View which changes have been",
"view_your_invoices": "View Your Invoices",
"viewing_x": "Viewing <0>__endTime__</0>",
"visual_editor": "Visual Editor",
@ -2159,15 +2130,9 @@
"will_need_to_log_out_from_and_in_with": "You will need to <b>log out</b> from your <b>__email1__</b> account and then log in with <b>__email2__</b>.",
"with_premium_subscription_you_also_get": "With an Overleaf Premium subscription you also get",
"word_count": "Word Count",
"work_directly_with_collabs": "Work directly with your collaborators",
"work_from_anywhere": "Work from anywhere",
"work_offline": "Work offline",
"work_offline_and_sync_with_dropbox": "Work offline and sync your files via Dropbox and GitHub",
"work_on_single_version": "Work together on a single version",
"work_or_university_sso": "Work/university single sign-on",
"work_with_non_overleaf_users": "Work with non Overleaf users",
"work_with_word_users": "Work with Word users",
"work_with_word_users_blurb": "__appName__ is so easy to get started with that youll be able to invite your non-LaTeX colleagues to contribute directly to your LaTeX documents. Theyll be productive from day one and be able to pick up small amounts of LaTeX as they go.",
"would_you_like_to_see_a_university_subscription": "Would you like to see a university-wide __appName__ subscription at your university?",
"writefull": "Writefull",
"writefull_disable_prompt_body": "Writefull is enabled. You can switch it on or off in the account settings anytime.",