Wire-up AB test for adding comments.

This commit is contained in:
Paulo Reis 2017-03-23 12:26:21 +00:00
parent 4e6553ebcc
commit 254e4953cb
2 changed files with 12 additions and 1 deletions

View file

@ -81,6 +81,12 @@ define [
if $scope.user.signUpDate >= '2016-10-27'
$scope.shouldABTestPlans = true
$scope.shouldABAddCommentBtn = false
if $scope.user.signUpDate >= '2016-03-22'
$scope.shouldABAddCommentBtn = true
sixpack.participate "add-comment-btn", [ "default", "editor-corner" ], (variation) ->
$scope.variationABAddCommentBtn = variation
$scope.settings = window.userSettings
$scope.anonymous = window.anonymous

View file

@ -29,8 +29,13 @@ define [
loadingThreads: false
newAddCommentUI: false # Test new UI for adding comments; remove afterwards.
if window.location.search.match /new-comments=true/
if $scope.shouldABAddCommentBtn and $scope.variationABAddCommentBtn? == "editor-corner"
$scope.reviewPanel.newAddCommentUI = true
console.log "editor corner"
else
console.log "default"
console.log $scope.shouldABAddCommentBtn
window.addEventListener "beforeunload", () ->
collapsedStates = {}