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
78f4f9f6
Commit
78f4f9f6
authored
Feb 05, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
48bd12c7
0975b9c4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
4 deletions
+25
-4
app/assets/stylesheets/framework/common.scss
app/assets/stylesheets/framework/common.scss
+4
-0
app/views/projects/_home_panel.html.haml
app/views/projects/_home_panel.html.haml
+7
-2
changelogs/unreleased/54544-update-project-topics-styling-to-use-badges-design.yml
...44-update-project-topics-styling-to-use-badges-design.yml
+5
-0
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+9
-2
No files found.
app/assets/stylesheets/framework/common.scss
View file @
78f4f9f6
...
...
@@ -89,6 +89,10 @@ hr {
.str-truncated
{
@include
str-truncated
;
&
-30
{
@include
str-truncated
(
30%
);
}
&
-60
{
@include
str-truncated
(
60%
);
}
...
...
app/views/projects/_home_panel.html.haml
View file @
78f4f9f6
...
...
@@ -21,9 +21,14 @@
-
if
@project
.
tag_list
.
present?
%span
.home-panel-topic-list.d-inline-flex.prepend-left-8.has-tooltip
{
data:
{
container:
'body'
},
title:
@project
.
has_extra_topics?
?
@project
.
tag_list
.
join
(
', '
)
:
nil
}
=
sprite_icon
(
'tag'
,
size:
16
,
css_class:
'icon append-right-4'
)
=
@project
.
topics_to_show
-
@project
.
topics_to_show
.
each
do
|
topic
|
%a
{
class:
'badge badge-pill badge-secondary append-right-5 str-truncated-30'
,
href:
explore_projects_path
(
tag:
topic
)
}
=
topic
.
titleize
-
if
@project
.
has_extra_topics?
=
_
(
"+ %{count} more"
)
%
{
count:
@project
.
count_of_extra_topics_not_shown
}
.text-nowrap
=
_
(
"+ %{count} more"
)
%
{
count:
@project
.
count_of_extra_topics_not_shown
}
.project-repo-buttons.col-md-12.col-lg-6.d-inline-flex.flex-wrap.justify-content-lg-end
...
...
changelogs/unreleased/54544-update-project-topics-styling-to-use-badges-design.yml
0 → 100644
View file @
78f4f9f6
---
title
:
Update project topics styling to use badges design
merge_request
:
24415
author
:
type
:
changed
spec/features/projects_spec.rb
View file @
78f4f9f6
...
...
@@ -110,16 +110,23 @@ describe 'Project' do
it
'shows project topics'
do
project
.
update_attribute
(
:tag_list
,
'topic1'
)
visit
path
expect
(
page
).
to
have_css
(
'.home-panel-topic-list'
)
expect
(
page
).
to
have_
content
(
'topic1'
)
expect
(
page
).
to
have_
link
(
'Topic1'
,
href:
explore_projects_path
(
tag:
'topic1'
)
)
end
it
'shows up to 3 project tags'
do
project
.
update_attribute
(
:tag_list
,
'topic1, topic2, topic3, topic4'
)
visit
path
expect
(
page
).
to
have_css
(
'.home-panel-topic-list'
)
expect
(
page
).
to
have_content
(
'topic1, topic2, topic3 + 1 more'
)
expect
(
page
).
to
have_link
(
'Topic1'
,
href:
explore_projects_path
(
tag:
'topic1'
))
expect
(
page
).
to
have_link
(
'Topic2'
,
href:
explore_projects_path
(
tag:
'topic2'
))
expect
(
page
).
to
have_link
(
'Topic3'
,
href:
explore_projects_path
(
tag:
'topic3'
))
expect
(
page
).
to
have_content
(
'+ 1 more'
)
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