Commit 2fd0d6e2 authored by Brandon Labuschagne's avatar Brandon Labuschagne Committed by Kushal Pandya

Improve empty state for starred projects

In this MR, a view for the empty state of projects has been added.
In addition, an svg for this has also been added.
parent 1aae24ce
.row.empty-state
.col-12
.svg-content.svg-250
= image_tag 'illustrations/starred_empty.svg'
.text-content
%h4.text-center
= s_("StarredProjectsEmptyState|You don't have starred projects yet.")
%p.text-secondary
= s_("StarredProjectsEmptyState|Visit a project page and press on a star icon. Then, you can find the project on this page.")
- @hide_top_links = true
- @no_container = true
- breadcrumb_title "Projects"
- page_title "Starred Projects"
- header_title "Projects", dashboard_projects_path
- breadcrumb_title _("Projects")
- page_title _("Starred Projects")
- header_title _("Projects"), dashboard_projects_path
= render_if_exists "shared/gold_trial_callout"
......@@ -13,5 +13,4 @@
- if params[:filter_projects] || any_projects?(@projects)
= render 'projects'
- else
%h3.page-title You don't have starred projects yet
%p.slead Visit project page and press on star icon and it will appear on this page.
= render 'starred_empty_state'
---
title: Improve empty state for starred projects
merge_request: 25138
author:
type: changed
......@@ -7003,6 +7003,12 @@ msgstr ""
msgid "Starred projects"
msgstr ""
msgid "StarredProjectsEmptyState|Visit a project page and press on a star icon. Then, you can find the project on this page."
msgstr ""
msgid "StarredProjectsEmptyState|You don't have starred projects yet."
msgstr ""
msgid "Stars"
msgstr ""
......
......@@ -114,7 +114,16 @@ describe 'Dashboard Projects' do
end
end
context 'when on Starred projects tab' do
context 'when on Starred projects tab', :js do
it 'shows the empty state when there are no starred projects' do
visit(starred_dashboard_projects_path)
element = page.find('.row.empty-state')
expect(element).to have_content("You don't have starred projects yet.")
expect(element.find('.svg-content img')['src']).to have_content('illustrations/starred_empty')
end
it 'shows only starred projects' do
user.toggle_star(project2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment