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
292ea2f9
Commit
292ea2f9
authored
May 10, 2021
by
Alper Akgun
Committed by
Miguel Rincon
May 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Continuous onboarding import loading state
parent
0efe495c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
7 deletions
+58
-7
app/helpers/learn_gitlab_helper.rb
app/helpers/learn_gitlab_helper.rb
+5
-5
ee/app/views/registrations/welcome/continuous_onboarding_getting_started.html.haml
...s/welcome/continuous_onboarding_getting_started.html.haml
+9
-2
ee/spec/views/registrations/welcome/continuous_onboarding_getting_started.html.haml_spec.rb
...e/continuous_onboarding_getting_started.html.haml_spec.rb
+38
-0
locale/gitlab.pot
locale/gitlab.pot
+6
-0
No files found.
app/helpers/learn_gitlab_helper.rb
View file @
292ea2f9
...
...
@@ -50,6 +50,11 @@ module LearnGitlabHelper
}
end
def
learn_gitlab_onboarding_available?
(
project
)
OnboardingProgress
.
onboarding?
(
project
.
namespace
)
&&
LearnGitlab
::
Project
.
new
(
current_user
).
available?
end
private
def
action_urls
...
...
@@ -64,9 +69,4 @@ module LearnGitlabHelper
def
onboarding_progress
(
project
)
OnboardingProgress
.
find_by
(
namespace:
project
.
namespace
)
# rubocop: disable CodeReuse/ActiveRecord
end
def
learn_gitlab_onboarding_available?
(
project
)
OnboardingProgress
.
onboarding?
(
project
.
namespace
)
&&
LearnGitlab
::
Project
.
new
(
current_user
).
available?
end
end
ee/app/views/registrations/welcome/continuous_onboarding_getting_started.html.haml
View file @
292ea2f9
-
return
unless
project
-
page_title
_
(
'Get started with GitLab'
)
-
unless
learn_gitlab_onboarding_available?
(
project
)
=
content_for
:meta_tags
do
%meta
{
'http-equiv'
:
'refresh'
,
content:
'5'
}
.row.gl-flex-grow-1.gl-p-5
.gl-display-flex.gl-flex-direction-column.gl-align-items-center.gl-w-full
.gl-display-flex.gl-flex-direction-column.gl-align-items-center.gl-pt-7.gl-mt-7.mw-460
...
...
@@ -8,4 +10,9 @@
%h2
.gl-text-center.gl-my-5
=
_
(
'Get started with GitLab'
)
%p
.gl-text-center.gl-text-gray-700.gl-mb-7
=
_
(
'Ready to get started with GitLab? Follow these steps to set up your workspace, plan and commit changes, and deploy your project.'
)
=
image_tag
'learn_gitlab/get_started.svg'
,
width:
'400'
,
class:
'gl-max-w-full'
%div
=
link_to
s_
(
"Ok, let's go"
),
project_learn_gitlab_path
(
project
),
class:
'btn btn-success gl-button gl-mt-7'
-
if
learn_gitlab_onboarding_available?
(
project
)
%div
=
link_to
s_
(
"LearnGitlab|Ok, let's go"
),
project_learn_gitlab_path
(
project
),
class:
'btn btn-success gl-button gl-mt-7'
-
else
%p
.gl-text-center.gl-text-gray-700.gl-mt-7
=
s_
(
'LearnGitlab|Creating your onboarding experience...'
)
.gl-spinner-container
.gl-spinner.gl-spinner-md
{
aria:
{
label:
_
(
'Loading'
)
}
}
ee/spec/views/registrations/welcome/continuous_onboarding_getting_started.html.haml_spec.rb
0 → 100644
View file @
292ea2f9
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'registrations/welcome/continuous_onboarding_getting_started'
do
describe
'project import state'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
subject
{
rendered
}
before
do
allow
(
view
).
to
receive
(
:project
).
and_return
(
project
)
allow
(
view
).
to
receive
(
:learn_gitlab_onboarding_available?
).
and_return
(
project_available
)
render
end
context
'when onboarding project is ready'
do
let_it_be
(
:project_available
)
{
true
}
it
{
is_expected
.
to
have_content
(
"Ok, let's go"
)
}
it
{
is_expected
.
not_to
have_content
(
'Creating your onboarding experience...'
)
}
it
'does not have meta refresh tag'
do
expect
(
view
.
content_for
(
:meta_tags
)).
to
be_nil
end
end
context
'when onboarding project is not yet ready'
do
let_it_be
(
:project_available
)
{
false
}
it
{
is_expected
.
not_to
have_content
(
"Ok, let's go"
)
}
it
{
is_expected
.
to
have_content
(
'Creating your onboarding experience...'
)
}
it
'has meta refresh tag'
do
expect
(
view
.
content_for
(
:meta_tags
)).
to
include
(
"<meta content=
\"
5
\"
http-equiv=
\"
refresh
\"
>"
)
end
end
end
end
locale/gitlab.pot
View file @
292ea2f9
...
...
@@ -19292,6 +19292,12 @@ msgstr ""
msgid "LearnGitLab|Use your new GitLab workflow to deploy your application, monitor its health, and keep it secure:"
msgstr ""
msgid "LearnGitlab|Creating your onboarding experience..."
msgstr ""
msgid "LearnGitlab|Ok, let's go"
msgstr ""
msgid "LearnGitlab|Trial only"
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