Class: Gitlab::Email::Message::InProductMarketing::Experience

Inherits:
Base
  • Object
show all
Includes:
Utils::StrongMemoize
Defined in:
lib/gitlab/email/message/in_product_marketing/experience.rb

Constant Summary collapse

EASE_SCORE_SURVEY_ID =
1

Instance Attribute Summary

Attributes inherited from Base

#format

Instance Method Summary collapse

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods inherited from Base

#cta_link, #initialize, #invite_link, #invite_members?, #invite_text, #logo_path, #progress, #series?, #unsubscribe

Methods included from Routing

add_helpers, includes_helpers, redirect_legacy_paths, url_helpers

Methods included from Helper

#address, #footer_links, #unsubscribe_message

Constructor Details

This class inherits a constructor from Gitlab::Email::Message::InProductMarketing::Base

Instance Method Details

#body_line1Object


27
28
29
# File 'lib/gitlab/email/message/in_product_marketing/experience.rb', line 27

def body_line1
  s_('InProductMarketing|%{strong_start}Overall, how difficult or easy was it to get started with GitLab?%{strong_end}').html_safe % strong_options
end

#body_line2Object


31
32
33
# File 'lib/gitlab/email/message/in_product_marketing/experience.rb', line 31

def body_line2
  s_('InProductMarketing|Click on the number below that corresponds with your answer — 1 being very difficult, 5 being very easy.')
end

#cta_textObject


35
36
# File 'lib/gitlab/email/message/in_product_marketing/experience.rb', line 35

def cta_text
end

38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/gitlab/email/message/in_product_marketing/experience.rb', line 38

def feedback_link(rating)
  params = {
    onboarding_progress: onboarding_progress,
    response: rating,
    show_invite_link: show_invite_link,
    survey_id: EASE_SCORE_SURVEY_ID
  }

  params[:show_incentive] = true if show_incentive?

  "#{gitlab_com_root_url}/-/survey_responses?#{params.to_query}"
end

#feedback_ratings(rating) ⇒ Object


51
52
53
54
55
56
57
58
59
# File 'lib/gitlab/email/message/in_product_marketing/experience.rb', line 51

def feedback_ratings(rating)
  [
    s_('InProductMarketing|Very difficult'),
    s_('InProductMarketing|Difficult'),
    s_('InProductMarketing|Neutral'),
    s_('InProductMarketing|Easy'),
    s_('InProductMarketing|Very easy')
  ][rating - 1]
end

#feedback_thanksObject


61
62
63
# File 'lib/gitlab/email/message/in_product_marketing/experience.rb', line 61

def feedback_thanks
  s_('InProductMarketing|Feedback from users like you really improves our product. Thanks for your help!')
end

#subject_lineObject


12
13
14
# File 'lib/gitlab/email/message/in_product_marketing/experience.rb', line 12

def subject_line
  s_('InProductMarketing|Do you have a minute?')
end

#subtitleObject


23
24
25
# File 'lib/gitlab/email/message/in_product_marketing/experience.rb', line 23

def subtitle
  s_('InProductMarketing|Take this 1-question survey!')
end

#taglineObject


16
17
# File 'lib/gitlab/email/message/in_product_marketing/experience.rb', line 16

def tagline
end

#titleObject


19
20
21
# File 'lib/gitlab/email/message/in_product_marketing/experience.rb', line 19

def title
  s_('InProductMarketing|We want your GitLab experience to be great')
end