Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c7699877
Commit
c7699877
authored
Feb 19, 2020
by
Alex Buijs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change copy of welcome screen
When in paid signup flow
parent
e2fe1d7e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
22 deletions
+82
-22
ee/app/helpers/ee/registrations_helper.rb
ee/app/helpers/ee/registrations_helper.rb
+27
-4
ee/app/views/registrations/welcome.html.haml
ee/app/views/registrations/welcome.html.haml
+3
-3
ee/changelogs/unreleased/202632-change-copy-of-welcome-screen.yml
...elogs/unreleased/202632-change-copy-of-welcome-screen.yml
+5
-0
ee/spec/helpers/ee/registrations_helper_spec.rb
ee/spec/helpers/ee/registrations_helper_spec.rb
+22
-10
ee/spec/views/registrations/welcome.html.haml_spec.rb
ee/spec/views/registrations/welcome.html.haml_spec.rb
+19
-5
locale/gitlab.pot
locale/gitlab.pot
+6
-0
No files found.
ee/app/helpers/ee/registrations_helper.rb
View file @
c7699877
...
...
@@ -2,10 +2,33 @@
module
EE
module
RegistrationsHelper
def
in_paid_signup_flow?
experiment_enabled?
(
:paid_signup_flow
)
&&
(
redirect_to
=
session
[
'user_return_to'
])
&&
URI
.
parse
(
redirect_to
).
path
==
new_subscriptions_path
include
::
Gitlab
::
Utils
::
StrongMemoize
def
in_subscription_flow?
redirect_path
==
new_subscriptions_path
end
def
in_trial_flow?
redirect_path
==
new_trial_path
end
def
setup_for_company_label_text
if
in_subscription_flow?
_
(
'Who will be using this GitLab subscription?'
)
elsif
in_trial_flow?
_
(
'Who will be using this GitLab trial?'
)
else
_
(
'Who will be using GitLab?'
)
end
end
private
def
redirect_path
strong_memoize
(
:redirect_path
)
do
redirect_to
=
session
[
'user_return_to'
]
URI
.
parse
(
redirect_to
).
path
if
redirect_to
end
end
end
end
ee/app/views/registrations/welcome.html.haml
View file @
c7699877
...
...
@@ -3,7 +3,7 @@
.row.flex-grow-1.bg-gray-light
.d-flex.flex-column.align-items-center.w-100.gl-p-3
.edit-profile.login-page.d-flex.flex-column.align-items-center.pt-lg-3
-
if
in_
paid_signup
_flow?
-
if
in_
subscription
_flow?
#progress-bar
%h2
.center
=
_
(
'Welcome to GitLab.com<br>@%{name}!'
).
html_safe
%
{
name:
html_escape
(
current_user
.
first_name
)
}
%p
...
...
@@ -19,7 +19,7 @@
.form-text.text-muted
=
_
(
'This will help us personalize your onboarding experience.'
)
.row
.form-group.col-sm-12
=
f
.
label
:setup_for_company
,
_
(
'Who will be using this GitLab subscription?'
)
,
class:
'label-bold'
=
f
.
label
:setup_for_company
,
setup_for_company_label_text
,
class:
'label-bold'
.d-flex.flex-column.flex-lg-row
.flex-grow-1
=
f
.
radio_button
:setup_for_company
,
true
...
...
@@ -30,4 +30,4 @@
.row
.form-group.col-sm-12.mb-0
=
button_tag
class:
%w[btn btn-success w-100]
do
=
in_
paid_signup
_flow?
?
_
(
'Continue'
)
:
_
(
'Get started!'
)
=
in_
subscription_flow?
||
in_trial
_flow?
?
_
(
'Continue'
)
:
_
(
'Get started!'
)
ee/changelogs/unreleased/202632-change-copy-of-welcome-screen.yml
0 → 100644
View file @
c7699877
---
title
:
Change copy of Welcome screen
merge_request
:
25526
author
:
type
:
fixed
ee/spec/helpers/ee/registrations_helper_spec.rb
View file @
c7699877
...
...
@@ -5,22 +5,34 @@ require 'spec_helper'
describe
EE
::
RegistrationsHelper
do
using
RSpec
::
Parameterized
::
TableSyntax
describe
'#in_paid_signup_flow?'
do
where
(
:user_return_to_path
,
:paid_signup_flow_enabled
,
:expected_result
)
do
'/-/subscriptions/new?plan_id=bronze_plan'
|
true
|
true
'/-/subscriptions/new?plan_id=bronze_plan'
|
false
|
false
'/foo'
|
true
|
false
'/foo'
|
false
|
false
nil
|
true
|
nil
nil
|
false
|
false
describe
'#in_subscription_flow?'
do
where
(
:user_return_to_path
,
:expected_result
)
do
'/-/subscriptions/new?plan_id=bronze_plan'
|
true
'/foo'
|
false
nil
|
false
end
with_them
do
it
'returns the expected_result'
do
allow
(
helper
).
to
receive
(
:experiment_enabled?
).
with
(
:paid_signup_flow
).
and_return
(
paid_signup_flow_enabled
)
allow
(
helper
).
to
receive
(
:session
).
and_return
(
'user_return_to'
=>
user_return_to_path
)
expect
(
helper
.
in_paid_signup_flow?
).
to
eq
(
expected_result
)
expect
(
helper
.
in_subscription_flow?
).
to
eq
(
expected_result
)
end
end
end
describe
'#in_trial_flow?'
do
where
(
:user_return_to_path
,
:expected_result
)
do
'/-/trials/new?glm_content=free-trial&glm_source=about.gitlab.com'
|
true
'/foo'
|
false
nil
|
false
end
with_them
do
it
'returns the expected_result'
do
allow
(
helper
).
to
receive
(
:session
).
and_return
(
'user_return_to'
=>
user_return_to_path
)
expect
(
helper
.
in_trial_flow?
).
to
eq
(
expected_result
)
end
end
end
...
...
ee/spec/views/registrations/welcome.html.haml_spec.rb
View file @
c7699877
...
...
@@ -7,24 +7,38 @@ describe 'registrations/welcome' do
before
do
allow
(
view
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
view
).
to
receive
(
:in_paid_signup_flow?
).
and_return
(
in_paid_signup_flow
)
allow
(
view
).
to
receive
(
:in_subscription_flow?
).
and_return
(
in_subscription_flow
)
allow
(
view
).
to
receive
(
:in_trial_flow?
).
and_return
(
in_trial_flow
)
render
end
subject
{
rendered
}
context
'in paid_signup_flow'
do
let
(
:in_paid_signup_flow
)
{
true
}
context
'in subscription flow'
do
let
(
:in_subscription_flow
)
{
true
}
let
(
:in_trial_flow
)
{
false
}
it
{
is_expected
.
to
have_button
(
'Continue'
)
}
it
{
is_expected
.
to
have_selector
(
'#progress-bar'
)
}
it
{
is_expected
.
to
have_selector
(
'label[for="user_setup_for_company"]'
,
text:
'Who will be using this GitLab subscription?'
)
}
end
context
'not in paid_signup_flow'
do
let
(
:in_paid_signup_flow
)
{
false
}
context
'in trial flow'
do
let
(
:in_subscription_flow
)
{
false
}
let
(
:in_trial_flow
)
{
true
}
it
{
is_expected
.
to
have_button
(
'Continue'
)
}
it
{
is_expected
.
not_to
have_selector
(
'#progress-bar'
)
}
it
{
is_expected
.
to
have_selector
(
'label[for="user_setup_for_company"]'
,
text:
'Who will be using this GitLab trial?'
)
}
end
context
'neither in subscription nor in trial flow'
do
let
(
:in_subscription_flow
)
{
false
}
let
(
:in_trial_flow
)
{
false
}
it
{
is_expected
.
to
have_button
(
'Get started!'
)
}
it
{
is_expected
.
not_to
have_selector
(
'#progress-bar'
)
}
it
{
is_expected
.
to
have_selector
(
'label[for="user_setup_for_company"]'
,
text:
'Who will be using GitLab?'
)
}
end
end
locale/gitlab.pot
View file @
c7699877
...
...
@@ -21827,9 +21827,15 @@ msgstr ""
msgid "Who will be able to see this group?"
msgstr ""
msgid "Who will be using GitLab?"
msgstr ""
msgid "Who will be using this GitLab subscription?"
msgstr ""
msgid "Who will be using this GitLab trial?"
msgstr ""
msgid "Wiki"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment