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
4b32a15a
Commit
4b32a15a
authored
Sep 10, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
1fa84931
4e9a93a3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
122 additions
and
25 deletions
+122
-25
app/helpers/releases_helper.rb
app/helpers/releases_helper.rb
+38
-0
app/views/projects/releases/index.html.haml
app/views/projects/releases/index.html.haml
+1
-1
doc/development/documentation/styleguide.md
doc/development/documentation/styleguide.md
+24
-17
doc/development/testing_guide/frontend_testing.md
doc/development/testing_guide/frontend_testing.md
+12
-3
doc/user/project/merge_requests/index.md
doc/user/project/merge_requests/index.md
+1
-4
spec/helpers/releases_helper_spec.rb
spec/helpers/releases_helper_spec.rb
+46
-0
No files found.
app/helpers/releases_helper.rb
0 → 100644
View file @
4b32a15a
# frozen_string_literal: true
module
ReleasesHelper
IMAGE_PATH
=
'illustrations/releases.svg'
DOCUMENTATION_PATH
=
'user/project/releases/index'
def
illustration
image_path
(
IMAGE_PATH
)
end
def
help_page
help_page_path
(
DOCUMENTATION_PATH
)
end
def
url_for_merge_requests
project_merge_requests_url
(
@project
,
params_for_issue_and_mr_paths
)
end
def
url_for_issues
project_issues_url
(
@project
,
params_for_issue_and_mr_paths
)
end
def
data_for_releases_page
{
project_id:
@project
.
id
,
illustration_path:
illustration
,
documentation_path:
help_page
,
merge_requests_url:
url_for_merge_requests
,
issues_url:
url_for_issues
}
end
private
def
params_for_issue_and_mr_paths
{
scope:
'all'
,
state:
'opened'
}
end
end
app/views/projects/releases/index.html.haml
View file @
4b32a15a
-
page_title
_
(
'Releases'
)
#js-releases-page
{
data:
{
project_id:
@project
.
id
,
illustration_path:
image_path
(
'illustrations/releases.svg'
),
documentation_path:
help_page_path
(
'user/project/releases/index'
)
}
}
#js-releases-page
{
data:
data_for_releases_page
}
doc/development/documentation/styleguide.md
View file @
4b32a15a
...
...
@@ -262,7 +262,7 @@ table_display_block: true
## Punctuation
Check the general punctuation rules for the GitLab documentation on the table below.
Check specific punctuation rules for [list
items](#list-item
s) below.
Check specific punctuation rules for [list
s](#list
s) below.
| Rule | Example |
| ---- | ------- |
...
...
@@ -274,37 +274,44 @@ Check specific punctuation rules for [list items](#list-items) below.
| Always add a space before and after dashes when using it in a sentence (for replacing a comma, for example). | _You should try this - or not._ |
| Always use lowercase after a colon. | _Related Issues: a way to create a relationship between issues._ |
## List
item
s
## Lists
- Always start list items with a capital letter, unless they are parameters or commands
that are in backticks, or similar.
- Always leave a blank line before and after a list.
- Begin a line with spaces (not tabs) to denote a [nested subitem](#nesting-inside-a-list-item).
- Only use ordered lists when their items describe a sequence of steps to follow:
Do:
### Ordered vs. unordered lists
These are the steps to do something:
Only use ordered lists when their items describe a sequence of steps to follow.
1. First, do step 1
1. Then, do step 2
1. Finally, do step 3
Do:
```
md
These are the steps to do something:
1.
First, do the first step.
1.
Then, do the next step.
1.
Finally, do the last step.
```
Don't:
Don't:
This is a list of different features:
```
md
This is a list of available features:
1. Feature 1
1. Feature 2
1. Feature 3
1.
Feature 1
1.
Feature 2
1.
Feature 3
```
**Markup:**
### Markup
- Use dashes (`-`) for unordered lists instead of asterisks (`*`).
- Prefix `1.` to e
ach
item in an ordered list.
- Prefix `1.` to e
very
item in an ordered list.
When rendered, the list items will appear with sequential numbering automatically.
**Punctuation:**
### Punctuation
- Do not add commas (`,`) or semicolons (`;`) to the end of list items.
- Only add periods to the end of a list item if the item consists of a complete sentence.
...
...
@@ -343,7 +350,7 @@ Do:
- Let's say this is also a complete sentence.
- Not a complete sentence.
Don't (
third item should have a `.` to match the first and second item
s):
Don't (
vary use of periods; majority rule
s):
- Let's say this is a complete sentence.
- Let's say this is also a complete sentence.
...
...
doc/development/testing_guide/frontend_testing.md
View file @
4b32a15a
...
...
@@ -20,9 +20,18 @@ We have started to migrate frontend tests to the [Jest](https://jestjs.io) testi
Jest tests can be found in
`/spec/frontend`
and
`/ee/spec/frontend`
in EE.
It is not yet a requirement to use Jest. You can view the
[
epic
](
https://gitlab.com/groups/gitlab-org/-/epics/873
)
of issues
we need to solve before being able to use Jest for all our needs.
### When should I use Jest over Karma?
If you need to update an existing Karma test file (found in
`spec/javascripts`
), you do not
need to migrate the whole spec to Jest. Simply updating the Karma spec to test your change
is fine. It is probably more appropriate to migrate to Jest in a separate merge request.
If you need to create a new test file, we strongly recommend creating one in Jest. This will
help support our migration and we think you'll love using Jest.
As always, please use discretion. Jest solves a lot of issues we experienced in Karma and
provides a better developer experience, however there are potentially unexpected issues
which could arise (especially with testing against browser specific features).
### Differences to Karma
...
...
doc/user/project/merge_requests/index.md
View file @
4b32a15a
...
...
@@ -630,10 +630,7 @@ troubleshooting steps.
### Merge request cannot retrieve the pipeline status
This can occur for one of two reasons:
-
Sidekiq doesn't pick up the changes fast enough
-
Because of the bug described in
[
#41545
](
https://gitlab.com/gitlab-org/gitlab-ce/issues/41545
)
This can occur if Sidekiq doesn't pick up the changes fast enough.
#### Sidekiq
...
...
spec/helpers/releases_helper_spec.rb
0 → 100644
View file @
4b32a15a
# frozen_string_literal: true
require
'spec_helper'
describe
ReleasesHelper
do
describe
'#illustration'
do
it
'returns the correct image path'
do
expect
(
helper
.
illustration
).
to
match
(
/illustrations\/releases-(\w+)\.svg/
)
end
end
describe
'#help_page'
do
it
'returns the correct link to the help page'
do
expect
(
helper
.
help_page
).
to
include
(
'user/project/releases/index'
)
end
end
context
'url helpers'
do
let
(
:project
)
{
build
(
:project
,
namespace:
create
(
:group
))
}
before
do
helper
.
instance_variable_set
(
:@project
,
project
)
end
describe
'#url_for_merge_requests'
do
it
'returns the the correct link with the correct parameters'
do
path
=
"
#{
project
.
group
.
path
}
/
#{
project
.
path
}
/merge_requests?scope=all&state=opened"
expect
(
helper
.
url_for_merge_requests
).
to
include
(
path
)
end
end
describe
'#url_for_issues'
do
it
'returns the the correct link with the correct parameters'
do
path
=
"
#{
project
.
group
.
path
}
/
#{
project
.
path
}
/issues?scope=all&state=opened"
expect
(
helper
.
url_for_issues
).
to
include
(
path
)
end
end
describe
'#data_for_releases_page'
do
it
'has the needed data to display release blocks'
do
keys
=
%i(project_id illustration_path documentation_path merge_requests_url issues_url)
expect
(
helper
.
data_for_releases_page
.
keys
).
to
eq
(
keys
)
end
end
end
end
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