Website: Update start questionnaire CTA visibility (#20206)

Closes: #20189

Changes:
- Made the CTA for the get started questionnaire visible to users who
have completed the "Thanks for checking out Fleet" step
- Updated the background of the image in the mobile start CTA.
- Updated the get started questionnaire to take users who have completed
the "Thanks for checking out Fleet" step to either the "What did you
think?" or "How was your deployment?" steps
This commit is contained in:
Eric 2024-07-03 15:57:35 -05:00 committed by GitHub
parent 2daff642d8
commit e27a3bb851
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 2 deletions

View file

@ -290,7 +290,7 @@ will be disabled and/or hidden in the UI.
// > The code below is so we don't bother users who have completed the questionnaire
// Determine if this user should see the CTA to bring them to the /start questionnaire using the user's last submitted questionnaire answer.
res.locals.showStartCta = !['how-many-hosts','will-you-be-self-hosting','managed-cloud-for-growing-deployments','self-hosted-deploy', 'whats-left-to-get-you-set-up', 'thanks-for-checking-out-fleet'].includes(req.me.lastSubmittedGetStartedQuestionnaireStep);
res.locals.showStartCta = !['how-many-hosts','will-you-be-self-hosting','managed-cloud-for-growing-deployments','self-hosted-deploy', 'whats-left-to-get-you-set-up'].includes(req.me.lastSubmittedGetStartedQuestionnaireStep);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// If an expandCtaAt timestamp is set in the user's sesssion, check the value to see if we should expand the CTA.

View file

@ -309,8 +309,14 @@ parasails.registerPage('start', {
this.formData[step] = this.previouslyAnsweredQuestions[step];
}
this.currentStep = this.getNextStep();
// If the last step was a redirect, take the user to the step they submitted previously.
if(_.startsWith(this.currentStep, '/')){
this.currentStep = this.me.lastSubmittedGetStartedQuestionnaireStep;
// If this user is coming back to the form after submitting the 'thanks-for-checking-out-fleet' step,
// take them back to the step they submitted before they reached that step. (Either what-did-you-think or how-was-your-deployment)
if(this.currentStep === 'thanks-for-checking-out-fleet'){
this.clickGoToPreviousStep();
}
}
}
},

View file

@ -137,6 +137,10 @@ html, body {
[purpose='continue-chevron'] {
display: none;
}
[purpose='banner-image-background'] {
background-color: #EEF9FE;
border-radius: 4px;
}
[purpose='banner-image'] {
height: 80px;
min-width: 80px;

View file

@ -3,7 +3,9 @@
<div purpose="continue-banner" class="d-flex justify-content-end">
<div purpose="banner-body" class="d-flex flex-row align-items-center invisible <%- collapseStartCta ? 'collapsed' : ''%>">
<div purpose="banner-image">
<div purpose="banner-image-background">
<div purpose="banner-image">
</div>
</div>
<div purpose="banner-text" class="d-flex flex-column justify-content-center">
<% if(['2 - Aware', '3 - Intrigued'].includes(me.psychologicalStage)) { %>