Merge pull request #10435 from overleaf/msm-remove-survey-banner

Remove banner to recruit new joiners for survey

GitOrigin-RevId: c427c57b80d6e38285ddbafc67554b62516ea8b8
This commit is contained in:
Miguel Serrano 2022-11-16 12:34:46 +01:00 committed by Copybot
parent d15547dcc2
commit edeaa4baa0
5 changed files with 4 additions and 68 deletions

View file

@ -509,24 +509,6 @@ const ProjectController = {
}
)
},
newJoinerSurveyBannerActive(cb) {
SplitTestHandler.getAssignment(
req,
res,
'new-joiner-survey-banner',
(err, assignment) => {
if (err) {
logger.warn(
{ err },
'failed to get "new-joiner-survey-banner" split test assignment'
)
cb(null, false)
} else {
cb(null, assignment.variant === 'active')
}
}
)
},
survey(cb) {
SurveyHandler.getSurvey(userId, (err, survey) => {
if (err) {
@ -544,13 +526,8 @@ const ProjectController = {
OError.tag(err, 'error getting data for project list page')
return next(err)
}
const {
notifications,
user,
userEmailsData,
primaryEmailCheckActive,
newJoinerSurveyBannerActive,
} = results
const { notifications, user, userEmailsData, primaryEmailCheckActive } =
results
if (
user &&
@ -679,12 +656,6 @@ const ProjectController = {
)
}
const isNewJoiner =
user.signUpDate &&
Date.now() - user.signUpDate.getTime() < 1000 * 60 * 60 * 24
const shouldDisplayNewJoinerBanner =
newJoinerSurveyBannerActive && isNewJoiner
ProjectController._injectProjectUsers(projects, (error, projects) => {
if (error != null) {
return next(error)
@ -709,7 +680,6 @@ const ProjectController = {
showThinFooter: true, // don't show the fat footer on the projects dashboard, as there's a fixed space available
usersBestSubscription: results.usersBestSubscription,
survey: results.survey,
shouldDisplayNewJoinerBanner,
}
const paidUser =

View file

@ -65,28 +65,6 @@ block content
) &times;
.project-list-main.col-md-10.col-xs-9
if shouldDisplayNewJoinerBanner
.alert.alert-info(
ng-if="shouldShowNewJoinerSurvey"
)
.notification-body
strong #{translate("new_joiner_survey_text_1")}
| &nbsp;
span #{translate("new_joiner_survey_text_2")}
span.pull-right
a.btn.btn-sm.btn-info(
href="https://docs.google.com/forms/d/e/1FAIpQLSduwnJnerjeqeRIwvyn209mRUfoL96-USTOx7B0INBsqhR48A/viewform?usp=sf_link"
target="_blank"
rel="noopener noreferrer"
ng-click="dismissNewJoinerSurvey()"
)
strong #{translate("take_survey")}
| &nbsp;
button(ng-click="dismissNewJoinerSurvey()").close
span(aria-hidden="true") &times;
span.sr-only #{translate("close")}
include ./list/notifications
include ./list/project-list

View file

@ -38,13 +38,6 @@ App.controller(
$scope.shouldShowSurveyLink = false
}
$scope.shouldShowNewJoinerSurvey =
localStorage('dismissed-new-joiner-survey') !== true
$scope.dismissNewJoinerSurvey = () => {
localStorage('dismissed-new-joiner-survey', true)
$scope.shouldShowNewJoinerSurvey = false
}
$timeout(() => recalculateProjectListHeight(), 10)
$scope.$watch(

View file

@ -1914,8 +1914,5 @@
"show_x_more_projects": "Show __x__ more projects",
"showing_x_out_of_n_projects": "Showing __x__ out of __n__ projects.",
"make_a_copy": "Make a copy",
"projects_list": "Projects list",
"new_joiner_survey_text_1": "Are you new to Overleaf?",
"new_joiner_survey_text_2": "Tell us your first impressions for a chance to win 50 USD",
"take_survey": "Take Survey"
"projects_list": "Projects list"
}

View file

@ -1456,7 +1456,5 @@
"tag_name_cannot_exceed_characters": "Taggnamnet får inte överstiga __maxLength__ tecken.",
"save_changes": "Spara ändringar",
"make_a_copy": "Gör en kopia",
"projects_list": "Förteckning över projekt",
"new_joiner_survey_text_1": "Är du ny på Overleaf?",
"new_joiner_survey_text_2": "Berätta om dina första intryck och ha en chans att vinna 50 USD."
"projects_list": "Förteckning över projekt"
}