Commit 2ac9fcbd authored by Simon Knox's avatar Simon Knox

fix Resolved Discussions counter wrapping to next line

change all .nav-links to use flex
place Resolve Discussions above tabs on small screens, and to the right on large
parent 61f811e6
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
} }
@mixin scrolling-links() { @mixin scrolling-links() {
white-space: nowrap;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden; overflow-y: hidden;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
display: flex;
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
} }
.nav-links { .nav-links {
display: flex;
padding: 0; padding: 0;
margin: 0; margin: 0;
list-style: none; list-style: none;
...@@ -42,17 +43,16 @@ ...@@ -42,17 +43,16 @@
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
li { li {
display: inline-block; display: flex;
a { a {
display: inline-block;
padding: $gl-btn-padding; padding: $gl-btn-padding;
padding-bottom: 11px; padding-bottom: 11px;
margin-bottom: -1px;
font-size: 14px; font-size: 14px;
line-height: 28px; line-height: 28px;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
border-bottom: 2px solid transparent; border-bottom: 2px solid transparent;
white-space: nowrap;
&:hover, &:hover,
&:active, &:active,
...@@ -85,10 +85,10 @@ ...@@ -85,10 +85,10 @@
.container-fluid { .container-fluid {
background-color: $gray-normal; background-color: $gray-normal;
margin-bottom: 0; margin-bottom: 0;
display: flex;
} }
li { li {
&.active a { &.active a {
border-bottom: none; border-bottom: none;
color: $link-underline-blue; color: $link-underline-blue;
...@@ -137,9 +137,9 @@ ...@@ -137,9 +137,9 @@
} }
.nav-links { .nav-links {
display: inline-block;
margin-bottom: 0; margin-bottom: 0;
border-bottom: none; border-bottom: none;
float: left;
&.wide { &.wide {
width: 100%; width: 100%;
...@@ -336,6 +336,10 @@ ...@@ -336,6 +336,10 @@
border-bottom: none; border-bottom: none;
height: 51px; height: 51px;
@media (min-width: $screen-sm-min) {
justify-content: center;
}
li { li {
a { a {
padding-top: 10px; padding-top: 10px;
...@@ -346,6 +350,7 @@ ...@@ -346,6 +350,7 @@
.scrolling-tabs-container { .scrolling-tabs-container {
position: relative; position: relative;
overflow: hidden;
.nav-links { .nav-links {
@include scrolling-links(); @include scrolling-links();
...@@ -483,10 +488,7 @@ ...@@ -483,10 +488,7 @@
.inner-page-scroll-tabs { .inner-page-scroll-tabs {
position: relative; position: relative;
overflow: hidden;
.nav-links {
padding-bottom: 1px;
}
.fade-right { .fade-right {
@include fade(left, $white-light); @include fade(left, $white-light);
......
...@@ -23,16 +23,6 @@ ...@@ -23,16 +23,6 @@
.merge-manually { .merge-manually {
@extend .fixed-width-container; @extend .fixed-width-container;
} }
.merge-request-tabs-holder {
&.affix {
border-bottom: 1px solid $border-color;
.nav-links {
border: 0;
}
}
}
} }
.merge-request-details { .merge-request-details {
......
...@@ -696,6 +696,7 @@ ...@@ -696,6 +696,7 @@
top: 0; top: 0;
z-index: 10; z-index: 10;
background-color: $white-light; background-color: $white-light;
border-bottom: 1px solid $border-color;
@media(min-width: $screen-sm-min) { @media(min-width: $screen-sm-min) {
position: sticky; position: sticky;
...@@ -715,6 +716,16 @@ ...@@ -715,6 +716,16 @@
padding-right: $gl-padding; padding-right: $gl-padding;
} }
} }
.nav-links {
border: 0;
}
}
.merge-request-tabs {
display: flex;
margin-bottom: 0;
padding: 0;
} }
.limit-container-width { .limit-container-width {
...@@ -725,6 +736,15 @@ ...@@ -725,6 +736,15 @@
} }
} }
.merge-request-tabs-container {
display: flex;
justify-content: space-between;
@media (max-width: $screen-xs-max) {
flex-direction: column-reverse;
}
}
.limit-container-width:not(.container-limited) { .limit-container-width:not(.container-limited) {
.merge-request-tabs-holder:not(.affix) { .merge-request-tabs-holder:not(.affix) {
.merge-request-tabs-container { .merge-request-tabs-container {
......
...@@ -614,6 +614,15 @@ ul.notes { ...@@ -614,6 +614,15 @@ ul.notes {
} }
.line-resolve-all-container { .line-resolve-all-container {
@media (min-width: $screen-sm-min) {
margin-right: 0;
padding-left: $gl-padding;
}
> div {
white-space: nowrap;
}
.btn-group { .btn-group {
margin-left: -4px; margin-left: -4px;
} }
......
...@@ -27,10 +27,12 @@ ...@@ -27,10 +27,12 @@
= render 'award_emoji/awards_block', awardable: @merge_request, inline: true = render 'award_emoji/awards_block', awardable: @merge_request, inline: true
.merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') } .merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') }
.merge-request-tabs-container.scrolling-tabs-container.inner-page-scroll-tabs .merge-request-tabs-container
.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller
.fade-left= icon('angle-left') .fade-left= icon('angle-left')
.fade-right= icon('angle-right') .fade-right= icon('angle-right')
%ul.merge-request-tabs.nav-links.scrolling-tabs .nav-links.scrolling-tabs
%ul.merge-request-tabs
%li.notes-tab %li.notes-tab
= link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#notes', action: 'notes', toggle: 'tab' } do = link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#notes', action: 'notes', toggle: 'tab' } do
Discussion Discussion
...@@ -49,7 +51,7 @@ ...@@ -49,7 +51,7 @@
= link_to diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#diffs', action: 'diffs', toggle: 'tab' } do = link_to diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#diffs', action: 'diffs', toggle: 'tab' } do
Changes Changes
%span.badge= @merge_request.diff_size %span.badge= @merge_request.diff_size
%li#resolve-count-app.line-resolve-all-container.pull-right.prepend-top-10.hidden-xs{ "v-cloak" => true } #resolve-count-app.line-resolve-all-container.prepend-top-10{ "v-cloak" => true }
%resolve-count{ "inline-template" => true, ":logged-out" => "#{current_user.nil?}" } %resolve-count{ "inline-template" => true, ":logged-out" => "#{current_user.nil?}" }
%div %div
.line-resolve-all{ "v-show" => "discussionCount > 0", .line-resolve-all{ "v-show" => "discussionCount > 0",
......
---
title: prevent nav tabs from wrapping to new line
merge_request:
author:
...@@ -14,7 +14,7 @@ feature 'Resolving all open discussions in a merge request from an issue', featu ...@@ -14,7 +14,7 @@ feature 'Resolving all open discussions in a merge request from an issue', featu
end end
it 'shows a button to resolve all discussions by creating a new issue' do it 'shows a button to resolve all discussions by creating a new issue' do
within('li#resolve-count-app') do within('#resolve-count-app') do
expect(page).to have_link "Resolve all discussions in new issue", href: new_namespace_project_issue_path(project.namespace, project, merge_request_to_resolve_discussions_of: merge_request.iid) expect(page).to have_link "Resolve all discussions in new issue", href: new_namespace_project_issue_path(project.namespace, project, merge_request_to_resolve_discussions_of: merge_request.iid)
end end
end end
......
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