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
f599bf0c
Commit
f599bf0c
authored
Nov 08, 2021
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert projects explore page tabs to Pajamas
Changelog: other
parent
09536de1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
23 deletions
+17
-23
app/views/dashboard/_projects_nav.html.haml
app/views/dashboard/_projects_nav.html.haml
+11
-16
ee/app/views/dashboard/_removed_projects_tab.html.haml
ee/app/views/dashboard/_removed_projects_tab.html.haml
+3
-4
spec/features/dashboard/projects_spec.rb
spec/features/dashboard/projects_spec.rb
+3
-3
No files found.
app/views/dashboard/_projects_nav.html.haml
View file @
f599bf0c
-
feature_project_list_filter_bar
=
Feature
.
enabled?
(
:project_list_filter_bar
)
-
is_your_projects_path
=
current_page?
(
dashboard_projects_path
)
||
current_page?
(
root_path
)
-
is_explore_projects_path
=
current_page?
(
explore_root_path
)
||
current_page?
(
trending_explore_projects_path
)
||
current_page?
(
starred_explore_projects_path
)
||
current_page?
(
explore_projects_path
)
%ul
.nav-links.scrolling-tabs.mobile-separator.nav.nav-tabs
{
class:
(
'gl-border-0!'
if
feature_project_list_filter_bar
)
}
=
nav_link
(
page:
[
dashboard_projects_path
,
root_path
])
do
=
link_to
dashboard_projects_path
,
class:
'shortcuts-activity'
,
data:
{
placement:
'right'
}
do
=
_
(
"Your projects"
)
%span
.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm
=
limited_counter_with_delimiter
(
@total_user_projects_count
)
=
nav_link
(
page:
starred_dashboard_projects_path
)
do
=
link_to
starred_dashboard_projects_path
,
data:
{
placement:
'right'
}
do
=
_
(
"Starred projects"
)
%span
.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm
=
limited_counter_with_delimiter
(
@total_starred_projects_count
)
=
nav_link
(
page:
[
explore_root_path
,
trending_explore_projects_path
,
starred_explore_projects_path
,
explore_projects_path
])
do
=
link_to
explore_root_path
,
data:
{
placement:
'right'
}
do
=
_
(
"Explore projects"
)
=
nav_link
(
page:
topics_explore_projects_path
)
do
=
link_to
topics_explore_projects_path
,
data:
{
placement:
'right'
}
do
=
_
(
"Explore topics"
)
=
gl_tabs_nav
({
class:
'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-flex-nowrap gl-border-0'
})
do
=
gl_tab_link_to
dashboard_projects_path
,
{
item_active:
is_your_projects_path
,
class:
'shortcuts-activity'
,
data:
{
placement:
'right'
}
}
do
=
_
(
"Your projects"
)
=
gl_tab_counter_badge
(
limited_counter_with_delimiter
(
@total_user_projects_count
))
=
gl_tab_link_to
starred_dashboard_projects_path
,
{
data:
{
placement:
'right'
}
}
do
=
_
(
"Starred projects"
)
=
gl_tab_counter_badge
(
limited_counter_with_delimiter
(
@total_starred_projects_count
))
=
gl_tab_link_to
_
(
"Explore projects"
),
explore_root_path
,
{
item_active:
is_explore_projects_path
,
data:
{
placement:
'right'
}
}
=
gl_tab_link_to
_
(
"Explore topics"
),
topics_explore_projects_path
,
{
data:
{
placement:
'right'
}
}
=
render_if_exists
"dashboard/removed_projects_tab"
,
removed_projects_count:
@removed_projects_count
ee/app/views/dashboard/_removed_projects_tab.html.haml
View file @
f599bf0c
-
if
can?
(
current_user
,
:list_removable_projects
)
=
nav_link
(
page:
removed_dashboard_projects_path
)
do
=
link_to
removed_dashboard_projects_path
,
data:
{
placement:
'right'
}
do
=
_
(
"Deleted projects"
)
%span
.badge.gl-badge.badge-muted.sm.badge-pill
=
limited_counter_with_delimiter
(
removed_projects_count
)
=
gl_tab_link_to
removed_dashboard_projects_path
,
{
data:
{
placement:
'right'
}
}
do
=
_
(
"Deleted projects"
)
=
gl_tab_counter_badge
(
limited_counter_with_delimiter
(
removed_projects_count
))
spec/features/dashboard/projects_spec.rb
View file @
f599bf0c
...
...
@@ -80,7 +80,7 @@ RSpec.describe 'Dashboard Projects' do
visit
dashboard_projects_path
expect
(
page
).
to
have_content
(
project
.
name
)
expect
(
find
(
'.
nav-links
li:nth-child(1) .badge-pill'
)).
to
have_content
(
1
)
expect
(
find
(
'.
gl-tabs-nav
li:nth-child(1) .badge-pill'
)).
to
have_content
(
1
)
end
it
'shows personal projects on personal projects tab'
,
:js
do
...
...
@@ -128,8 +128,8 @@ RSpec.describe 'Dashboard Projects' do
expect
(
page
).
not_to
have_content
(
project
.
name
)
expect
(
page
).
to
have_content
(
project2
.
name
)
expect
(
find
(
'.
nav-links
li:nth-child(1) .badge-pill'
)).
to
have_content
(
1
)
expect
(
find
(
'.
nav-links
li:nth-child(2) .badge-pill'
)).
to
have_content
(
1
)
expect
(
find
(
'.
gl-tabs-nav
li:nth-child(1) .badge-pill'
)).
to
have_content
(
1
)
expect
(
find
(
'.
gl-tabs-nav
li:nth-child(2) .badge-pill'
)).
to
have_content
(
1
)
end
it
'does not show tabs to filter by all projects or personal'
do
...
...
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