Commit 996f5155 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ui-improvements' into 'master'

Ui improvements

* show page context title instead of `Dashboard` keyword
* fix event feed overflow
* remove annoying tooltips where its not needed
* fix tests broken in previous mr

See merge request !1242
parents ce9cb516 858675ff
...@@ -136,7 +136,7 @@ $kbd-bg: #333; ...@@ -136,7 +136,7 @@ $kbd-bg: #333;
//== Buttons //== Buttons
// //
//## //##
$btn-default-color: #7f8fa4; $btn-default-color: $gl-text-color;
$btn-default-bg: #fff; $btn-default-bg: #fff;
$btn-default-border: #e7e9ed; $btn-default-border: #e7e9ed;
......
...@@ -385,7 +385,7 @@ table { ...@@ -385,7 +385,7 @@ table {
a { a {
padding: 15px; padding: 15px;
font-size: 20px; font-size: 20px;
line-height: 27px; line-height: 28px;
color: #7f8fa4; color: #7f8fa4;
border-bottom: 2px solid transparent; border-bottom: 2px solid transparent;
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
.event-title { .event-title {
@include str-truncated(calc(100% - 174px)); @include str-truncated(calc(100% - 174px));
max-width: 70%;
font-weight: 500; font-weight: 500;
.author_name { .author_name {
......
...@@ -137,7 +137,7 @@ module DiffHelper ...@@ -137,7 +137,7 @@ module DiffHelper
# Always use HTML to handle case where JSON diff rendered this button # Always use HTML to handle case where JSON diff rendered this button
params_copy.delete(:format) params_copy.delete(:format)
link_to url_for(params_copy), id: "commit-diff-viewtype", class: (params[:view] != 'parallel' ? 'btn btn-sm active' : 'btn btn-sm') do link_to url_for(params_copy), id: "inline-diff-btn", class: (params[:view] != 'parallel' ? 'btn btn-sm active' : 'btn btn-sm') do
'Inline' 'Inline'
end end
end end
...@@ -148,7 +148,7 @@ module DiffHelper ...@@ -148,7 +148,7 @@ module DiffHelper
# Always use HTML to handle case where JSON diff rendered this button # Always use HTML to handle case where JSON diff rendered this button
params_copy.delete(:format) params_copy.delete(:format)
link_to url_for(params_copy), id: "commit-diff-viewtype", class: (params[:view] == 'parallel' ? 'btn active btn-sm' : 'btn btn-sm') do link_to url_for(params_copy), id: "parallel-diff-btn", class: (params[:view] == 'parallel' ? 'btn active btn-sm' : 'btn btn-sm') do
'Side-by-side' 'Side-by-side'
end end
end end
......
...@@ -30,7 +30,6 @@ module EventsHelper ...@@ -30,7 +30,6 @@ module EventsHelper
class: "event-filter-link btn btn-default #{active}", class: "event-filter-link btn btn-default #{active}",
id: "#{key}_event_filter", id: "#{key}_event_filter",
title: "Filter by #{tooltip.downcase}", title: "Filter by #{tooltip.downcase}",
data: { toggle: 'tooltip', placement: 'top' }
} }
link_to request.path, link_opts do link_to request.path, link_opts do
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
= link_to dashboard_groups_path, title: 'Your groups', data: {placement: 'right'} do = link_to dashboard_groups_path, title: 'Your groups', data: {placement: 'right'} do
Your Groups Your Groups
= nav_link(page: [explore_groups_path]) do = nav_link(page: [explore_groups_path]) do
= link_to explore_groups_path, title: 'Explore groups', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to explore_groups_path, title: 'Explore groups', data: {placement: 'bottom'} do
Explore Groups Explore Groups
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
= link_to starred_dashboard_projects_path, title: 'Starred Projects', data: {placement: 'right'} do = link_to starred_dashboard_projects_path, title: 'Starred Projects', data: {placement: 'right'} do
Starred Projects Starred Projects
= nav_link(page: [explore_root_path, trending_explore_projects_path, starred_explore_projects_path, explore_projects_path], html_options: { class: 'hidden-xs' }) do = nav_link(page: [explore_root_path, trending_explore_projects_path, starred_explore_projects_path, explore_projects_path], html_options: { class: 'hidden-xs' }) do
= link_to explore_root_path, title: 'Explore', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to explore_root_path, title: 'Explore', data: {placement: 'right'} do
Explore Projects Explore Projects
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
- if current_user - if current_user
= auto_discovery_link_tag(:atom, dashboard_url(format: :atom, private_token: current_user.private_token), title: "All activity") = auto_discovery_link_tag(:atom, dashboard_url(format: :atom, private_token: current_user.private_token), title: "All activity")
- header_title "Activity", activity_dashboard_path
= render 'dashboard/activity_head' = render 'dashboard/activity_head'
%section.activities %section.activities
......
- page_title "Groups" - page_title "Groups"
- header_title "Groups", dashboard_groups_path
= render 'dashboard/groups_head' = render 'dashboard/groups_head'
.gray-content-block .gray-content-block
......
- page_title "Issues" - page_title "Issues"
- header_title "Issues", issues_dashboard_path(assignee_id: current_user.id)
= content_for :meta_tags do = content_for :meta_tags do
- if current_user - if current_user
= auto_discovery_link_tag(:atom, issues_dashboard_url(format: :atom, private_token: current_user.private_token), title: "#{current_user.name} issues") = auto_discovery_link_tag(:atom, issues_dashboard_url(format: :atom, private_token: current_user.private_token), title: "#{current_user.name} issues")
%h3.page-title
Issues
%p.light %p.light
List all issues from all projects you have access to. List all issues from all projects you have access to.
%hr
.append-bottom-20 .append-bottom-20
.pull-right .pull-right
......
- page_title "Merge Requests" - page_title "Merge Requests"
%h3.page-title - header_title "Merge Requests", merge_requests_dashboard_path(assignee_id: current_user.id)
Merge Requests
%p.light %p.light
List all merge requests from all projects you have access to. List all merge requests from all projects you have access to.
%hr
.append-bottom-20 .append-bottom-20
= render 'shared/issuable/filter', type: :merge_requests = render 'shared/issuable/filter', type: :merge_requests
= render 'shared/merge_requests' = render 'shared/merge_requests'
- page_title "Milestones" - page_title "Milestones"
%h3.page-title - header_title "Milestones", dashboard_milestones_path
Milestones
%span.pull-right #{@dashboard_milestones.count} milestones
%p.light %p.light
List all milestones from all projects you have access to. List all milestones from all projects you have access to.
%hr
= render 'shared/milestones_filter' = render 'shared/milestones_filter'
.milestones .milestones
......
- page_title "Starred Projects" - page_title "Starred Projects"
- header_title "Projects", (current_user ? root_path : explore_root_path)
= render 'dashboard/projects_head' = render 'dashboard/projects_head'
- if @projects.any? - if @projects.any?
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
- if current_user - if current_user
= auto_discovery_link_tag(:atom, dashboard_url(format: :atom, private_token: current_user.private_token), title: "All activity") = auto_discovery_link_tag(:atom, dashboard_url(format: :atom, private_token: current_user.private_token), title: "All activity")
- header_title "Projects", (current_user ? root_path : explore_root_path)
= render 'dashboard/projects_head' = render 'dashboard/projects_head'
- if @last_push - if @last_push
......
- page_title "Groups" - page_title "Groups"
- header_title "Groups", (current_user ? dashboard_groups_path : explore_groups_path)
- if current_user - if current_user
= render 'dashboard/groups_head' = render 'dashboard/groups_head'
.gray-content-block.clearfix .gray-content-block.clearfix
......
- page_title "Dashboard" - page_title "Dashboard"
- header_title "Dashboard", root_path - unless @header_title
- header_title "Dashboard", root_path
- sidebar "dashboard" - sidebar "dashboard"
= render template: "layouts/application" = render template: "layouts/application"
- page_title "Explore" - page_title "Explore"
- if current_user - if current_user
- header_title "Dashboard", root_path - unless @header_title
- header_title "Projects", (current_user ? root_path : explore_root_path)
- else - else
- header_title "Explore GitLab", explore_root_path - header_title "Explore GitLab", explore_root_path
- sidebar "dashboard" - sidebar "dashboard"
......
- page_title 'Snippets' - page_title 'Snippets'
- if current_user - if current_user
- header_title "Dashboard", root_path - header_title "Snippets", user_snippets_path(current_user)
- else - else
- header_title 'Snippets', snippets_path - header_title 'Snippets', snippets_path
- sidebar "dashboard" - sidebar "dashboard"
......
- page_title "Your Snippets" - page_title "Your Snippets"
= render 'head' = render 'head'
.slead .gray-content-block
Share code pastes with others out of git repository
.pull-right .pull-right
= link_to new_snippet_path, class: "btn btn-new btn-sm", title: "New Snippet" do = link_to new_snippet_path, class: "btn btn-new", title: "New Snippet" do
Add new snippet Add new snippet
%ul.nav.nav-tabs .oneline
Share code pastes with others out of git repository
%ul.nav.nav-tabs.prepend-top-20
= nav_tab :scope, nil do = nav_tab :scope, nil do
= link_to user_snippets_path(@user) do = link_to user_snippets_path(@user) do
All All
......
...@@ -2,7 +2,13 @@ ...@@ -2,7 +2,13 @@
- if current_user - if current_user
= render 'head' = render 'head'
.slead .gray-content-block
- if current_user
.pull-right
= link_to new_snippet_path, class: "btn btn-new", title: "New Snippet" do
Add new snippet
.oneline
Public snippets created by you and other users are listed here Public snippets created by you and other users are listed here
= render 'snippets' = render 'snippets'
......
...@@ -128,7 +128,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -128,7 +128,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end end
step 'I should see the proper Inline and Side-by-side links' do step 'I should see the proper Inline and Side-by-side links' do
expect(page).to have_css('#commit-diff-viewtype', count: 2) expect(page).to have_css('#parallel-diff-btn', count: 1)
expect(page).to have_css('#inline-diff-btn', count: 1)
end end
step 'I switch to the merge request\'s comments tab' do step 'I switch to the merge request\'s comments tab' do
...@@ -225,13 +226,13 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -225,13 +226,13 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I click link "Hide inline discussion" of the second file' do step 'I click link "Hide inline discussion" of the second file' do
page.within '.files [id^=diff]:nth-child(2)' do page.within '.files [id^=diff]:nth-child(2)' do
find('.js-toggle-diff-comments').click find('.js-toggle-diff-comments').trigger('click')
end end
end end
step 'I click link "Show inline discussion" of the second file' do step 'I click link "Show inline discussion" of the second file' do
page.within '.files [id^=diff]:nth-child(2)' do page.within '.files [id^=diff]:nth-child(2)' do
find('.js-toggle-diff-comments').click find('.js-toggle-diff-comments').trigger('click')
end end
end end
......
...@@ -198,7 +198,7 @@ module SharedDiffNote ...@@ -198,7 +198,7 @@ module SharedDiffNote
end end
step 'I click side-by-side diff button' do step 'I click side-by-side diff button' do
click_link "Side-by-side" find('#parallel-diff-btn').trigger('click')
end end
step 'I see side-by-side diff button' do step 'I see side-by-side diff button' do
......
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