From c3f1e6e04cec94f6c2081da3affb9d903c01ac5d Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Tue, 7 Jun 2016 05:36:48 -0700 Subject: [PATCH 1/2] Turn off homepage logged out a/b tests --- app/models/User.coffee | 15 ------ app/templates/new-home-view.jade | 90 ++++---------------------------- app/views/NewHomeView.coffee | 1 - 3 files changed, 11 insertions(+), 95 deletions(-) diff --git a/app/models/User.coffee b/app/models/User.coffee index 495d006fa..678297279 100644 --- a/app/models/User.coffee +++ b/app/models/User.coffee @@ -165,21 +165,6 @@ module.exports = class User extends CocoModel application.tracker.identify campaignAdsGroup: @campaignAdsGroup unless me.isAdmin() @campaignAdsGroup - getHomepageGroup: -> - # Only testing on en-US so localization issues are not a factor - return 'home-legacy' unless _.string.startsWith(me.get('preferredLanguage', true) or 'en-US', 'en') - return @homepageGroup if @homepageGroup - group = parseInt(util.getQueryVariable('variation')) - group ?= me.get('testGroupNumber') % 5 - @homepageGroup = switch group - when 0 then 'home-legacy' - when 1 then 'home-teachers' - when 2 then 'home-legacy-left' - when 3 then 'home-dropdowns' - when 4 then 'home-play-for-free' - application.tracker.identify homepageGroup: @homepageGroup unless me.isAdmin() - return @homepageGroup - # Signs and Portents was receiving updates after test started, and also had a big bug on March 4, so just look at test from March 5 on. # ... and stopped working well until another update on March 10, so maybe March 11+... # ... and another round, and then basically it just isn't completing well, so we pause the test until we can fix it. diff --git a/app/templates/new-home-view.jade b/app/templates/new-home-view.jade index 866b0af65..59065644a 100644 --- a/app/templates/new-home-view.jade +++ b/app/templates/new-home-view.jade @@ -3,74 +3,14 @@ extends /templates/base-flat mixin box .well.text-center if me.isAnonymous() == true - if ['home-legacy','home-legacy-left'].indexOf(view.variation) != -1 - h6#classroom-edition-header(data-i18n="new_home.classroom_edition") - div - button.teacher-btn.btn.btn-primary.btn-lg.btn-block(data-i18n="new_home.im_a_teacher") - div - a.btn.btn-forest.btn-lg.btn-block(href="/courses", data-i18n="new_home.im_a_student") - h6#learn-to-code-header(data-i18n="new_home.learn_to_code") - a.btn.btn-gold.btn-lg.btn-block.play-btn(href=view.playURL, data-i18n="new_home.play_now") - else if ['home-teachers','home-dropdowns'].indexOf(view.variation) != -1 - h5#educator-header(data-i18n="new_home.teachers") - p.small(data-i18n="new_home.class_in_box") + h6#classroom-edition-header(data-i18n="new_home.classroom_edition") + div + button.teacher-btn.btn.btn-primary.btn-lg.btn-block(data-i18n="new_home.im_a_teacher") + div + a.btn.btn-forest.btn-lg.btn-block(href="/courses", data-i18n="new_home.im_a_student") + h6#learn-to-code-header(data-i18n="new_home.learn_to_code") + a.btn.btn-gold.btn-lg.btn-block.play-btn(href=view.playURL, data-i18n="new_home.play_now") - if view.variation == 'home-dropdowns' - div.form-group - h6.control-label(data-i18n="new_home.role") - select.form-control#request-form-role - option(value="", data-i18n="new_home.form_select_role") - option(data-i18n="courses.teacher", value="Teacher") - option(data-i18n="teachers_quote.tech_coordinator", value="Technology coordinator") - option(data-i18n="teachers_quote.advisor", value="Advisor") - option(data-i18n="teachers_quote.principal", value="Principal") - option(data-i18n="teachers_quote.superintendent", value="Superintendent") - option(data-i18n="teachers_quote.parent", value="Parent") - div.form-group - h6.control-label(data-i18n="new_home.student_count") - select.form-control#request-form-range - option(value="", data-i18n="new_home.form_select_range") - option 1-10 - option 11-50 - option 51-100 - option 101-200 - option 201-500 - option 501-1000 - option 1000+ - div - button.btn.btn-forest.btn-lg.btn-block.request-demo(href="#",data-i18n="new_home.get_started") - else - div - button.teacher-btn.btn.btn-forest.btn-lg.btn-block(data-i18n="new_home.get_started") - - if view.variation == 'home-teachers' - h5#students-header(data-i18n="new_home.students") - div - button.join-class.btn.btn-primary.btn-lg.btn-block(data-i18n="new_home.join_class", href="/courses") - div - a.btn.btn-default.btn-lg.btn-block.play-btn(href=view.playURL, data-i18n="new_home.play_now") - else - h6#students-header(data-i18n="new_home.students_and_players") - div - a.btn.btn-primary.btn-lg.play-btn.btn-block(href=view.playURL, data-i18n="new_home.play_now") - else - h5#educator-header(data-i18n="new_home.start_playing_for_free") - div - a.btn.btn-forest.btn-lg.btn-block.play-btn(href=view.playURL, data-i18n="new_home.play_now") - div - button.join-class.btn.btn-default.btn-lg.btn-block(data-i18n="new_home.join_class", href="/courses") - - - h6#classroom-edition-header(style="padding-top: 20px",data-i18n="new_home.teachers_and_educators") - p.small(data-i18n="new_home.class_in_box") - button.teacher-btn.btn.btn-primary.btn-lg.btn-block(data-i18n="new_home.get_started") - - - if ['home-teachers','home-dropdowns','home-play-for-free'].indexOf(view.variation) != -1 - p.small - span(data-i18n="new_home.have_an_account") - span   - a.login-button(data-i18n="login.log_in", href="#") else h6#classroom-edition-header(data-i18n="new_home.logged_in_as") p.small #{me.get("email")} @@ -113,24 +53,16 @@ block content .container .row.hidden-xs.top-spacer(style="height: 160px") .row.hidden-sm.hidden-xs - case view.variation - when 'home-legacy-left' - .col-lg-3.col-md-4 - +box - .col-lg-7.col-lg-offset-2.col-md-8 - h1(data-i18n="new_home.slogan") - default - .col-lg-7.col-md-8 - h1(data-i18n="new_home.slogan") - .col-lg-3.col-lg-offset-2.col-md-4 - +box + .col-lg-7.col-md-8 + h1(data-i18n="new_home.slogan") + .col-lg-3.col-lg-offset-2.col-md-4 + +box .row.hidden-lg.hidden-md .col-lg-7.col-md-8 h1(data-i18n="new_home.slogan") .col div(style="margin: auto; max-width: 300px") +box - .row#learn-more-row .col-xs-12.text-center a#learn-more-link diff --git a/app/views/NewHomeView.coffee b/app/views/NewHomeView.coffee index 962c7cc05..0651a512b 100644 --- a/app/views/NewHomeView.coffee +++ b/app/views/NewHomeView.coffee @@ -35,7 +35,6 @@ module.exports = class NewHomeView extends RootView initialize: (options) -> @courses = new CocoCollection [], {url: "/db/course", model: Course} @supermodel.loadCollection(@courses, 'courses') - @variation ?= me.getHomepageGroup() window.tracker?.trackEvent 'Homepage Loaded', category: 'Homepage' if me.isTeacher() From aa443d372f1c9d02d0ce7ffc4440502895547c7d Mon Sep 17 00:00:00 2001 From: phoenixeliot Date: Tue, 7 Jun 2016 11:38:00 -0700 Subject: [PATCH 2/2] Revert using Bluebird instead of Promise polyfill --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 50b1b9e16..0f69fe4a9 100644 --- a/bower.json +++ b/bower.json @@ -53,7 +53,7 @@ "algoliasearch": "^3.13.1", "algolia-autocomplete.js": "^0.17.0", "algolia-autocomplete-no-conflict": "1.0.0", - "bluebird": "^3.4.0" + "promise-polyfill": "^5.2.1" }, "overrides": { "algolia-autocomplete.js": {