Commit 9a8f70d5 authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-05-16

# Conflicts:
#	LICENSE

[ci skip]
parents 26263a1c 50d687f6
...@@ -23,6 +23,7 @@ granted any other rights beyond what is expressly stated herein. Subject to the ...@@ -23,6 +23,7 @@ granted any other rights beyond what is expressly stated herein. Subject to the
foregoing, it is forbidden to copy, merge, publish, distribute, sublicense, foregoing, it is forbidden to copy, merge, publish, distribute, sublicense,
and/or sell the Software. and/or sell the Software.
<<<<<<< HEAD
This EE License applies only to the part of this Software that is not This EE License applies only to the part of this Software that is not
distributed as part of GitLab Community Edition (CE), and that is not a file distributed as part of GitLab Community Edition (CE), and that is not a file
that produces client-side JavaScript, in whole or in part. Any part of this that produces client-side JavaScript, in whole or in part. Any part of this
...@@ -47,3 +48,6 @@ applicable component. ...@@ -47,3 +48,6 @@ applicable component.
All Documentation content that resides under the doc/ directory of this All Documentation content that resides under the doc/ directory of this
repository is licensed under Creative Commons: CC BY-SA 4.0. repository is licensed under Creative Commons: CC BY-SA 4.0.
=======
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
>>>>>>> upstream/master
...@@ -103,6 +103,8 @@ GitLab Community Edition (CE) is available freely under the MIT Expat license. ...@@ -103,6 +103,8 @@ GitLab Community Edition (CE) is available freely under the MIT Expat license.
All third party components incorporated into the GitLab Software are licensed under the original license provided by the owner of the applicable component. All third party components incorporated into the GitLab Software are licensed under the original license provided by the owner of the applicable component.
All Documentation content that resides under the doc/ directory of this repository is licensed under Creative Commons: CC BY-SA 4.0.
## Install a development environment ## Install a development environment
To work on GitLab itself, we recommend setting up your development environment with [the GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit). To work on GitLab itself, we recommend setting up your development environment with [the GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit).
......
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
role="row" role="row"
> >
<div <div
class="alert alert-danger alert-block append-bottom-0 table-section section-100" class="alert alert-danger alert-block append-bottom-0"
role="gridcell" role="gridcell"
> >
<div> <div>
......
...@@ -32,17 +32,17 @@ export default { ...@@ -32,17 +32,17 @@ export default {
<template> <template>
<div :class="className"> <div :class="className">
{{ actionText }} {{ actionText }}
<time-ago-tooltip
:time="editedAt"
tooltip-placement="bottom"
/>
<template v-if="editedBy"> <template v-if="editedBy">
by {{ s__('ByAuthor|by') }}
<a <a
:href="editedBy.path" :href="editedBy.path"
class="js-vue-author author_link"> class="js-vue-author author_link">
{{ editedBy.name }} {{ editedBy.name }}
</a> </a>
</template> </template>
<time-ago-tooltip
:time="editedAt"
tooltip-placement="bottom"
/>
</div> </div>
</template> </template>
...@@ -62,6 +62,21 @@ export default { ...@@ -62,6 +62,21 @@ export default {
<template> <template>
<div class="note-header-info"> <div class="note-header-info">
<div
v-if="includeToggle"
class="discussion-actions">
<button
@click="handleToggle"
class="note-action-button discussion-toggle-button js-vue-toggle-button"
type="button">
<i
:class="toggleChevronClass"
class="fa"
aria-hidden="true">
</i>
{{ __('Toggle discussion') }}
</button>
</div>
<a :href="author.path"> <a :href="author.path">
<span class="note-header-author-name">{{ author.name }}</span> <span class="note-header-author-name">{{ author.name }}</span>
<span class="note-headline-light"> <span class="note-headline-light">
...@@ -95,20 +110,5 @@ export default { ...@@ -95,20 +110,5 @@ export default {
</i> </i>
</span> </span>
</span> </span>
<div
v-if="includeToggle"
class="discussion-actions">
<button
@click="handleToggle"
class="note-action-button discussion-toggle-button js-vue-toggle-button"
type="button">
<i
:class="toggleChevronClass"
class="fa"
aria-hidden="true">
</i>
Toggle discussion
</button>
</div>
</div> </div>
</template> </template>
...@@ -407,10 +407,6 @@ ul.notes { ...@@ -407,10 +407,6 @@ ul.notes {
.note-header { .note-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@include notes-media('max', $screen-xs-max) {
flex-flow: row wrap;
}
} }
.note-header-info { .note-header-info {
...@@ -473,11 +469,6 @@ ul.notes { ...@@ -473,11 +469,6 @@ ul.notes {
margin-left: 10px; margin-left: 10px;
color: $gray-darkest; color: $gray-darkest;
@include notes-media('max', $screen-md-max) {
float: none;
margin-left: 0;
}
.btn-group > .discussion-next-btn { .btn-group > .discussion-next-btn {
margin-left: -1px; margin-left: -1px;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
= icon("chevron-up") = icon("chevron-up")
- else - else
= icon("chevron-down") = icon("chevron-down")
Toggle discussion = _('Toggle discussion')
= link_to_member(@project, discussion.author, avatar: false) = link_to_member(@project, discussion.author, avatar: false)
.inline.discussion-headline-light .inline.discussion-headline-light
......
---
title: Move discussion actions to the right for small viewports
merge_request: 18476
author: George Tsiolis
type: changed
...@@ -28,7 +28,11 @@ module Gitlab ...@@ -28,7 +28,11 @@ module Gitlab
controller = @env[CONTROLLER_KEY] controller = @env[CONTROLLER_KEY]
action = "#{controller.action_name}" action = "#{controller.action_name}"
suffix = controller.request_format
# Devise exposes a method called "request_format" that does the below.
# However, this method is not available to all controllers (e.g. certain
# Doorkeeper controllers). As such we use the underlying code directly.
suffix = controller.request.format.try(:ref)
if suffix && suffix != :html if suffix && suffix != :html
action += ".#{suffix}" action += ".#{suffix}"
......
...@@ -204,11 +204,11 @@ describe Gitlab::Metrics::WebTransaction do ...@@ -204,11 +204,11 @@ describe Gitlab::Metrics::WebTransaction do
end end
context 'when request goes to ActionController' do context 'when request goes to ActionController' do
let(:request_format) { :html } let(:request) { double(:request, format: double(:format, ref: :html)) }
before do before do
klass = double(:klass, name: 'TestController') klass = double(:klass, name: 'TestController')
controller = double(:controller, class: klass, action_name: 'show', request_format: request_format) controller = double(:controller, class: klass, action_name: 'show', request: request)
env['action_controller.instance'] = controller env['action_controller.instance'] = controller
end end
...@@ -219,7 +219,7 @@ describe Gitlab::Metrics::WebTransaction do ...@@ -219,7 +219,7 @@ describe Gitlab::Metrics::WebTransaction do
end end
context 'when the response content type is not :html' do context 'when the response content type is not :html' do
let(:request_format) { :json } let(:request) { double(:request, format: double(:format, ref: :json)) }
it 'appends the mime type to the transaction action' do it 'appends the mime type to the transaction action' do
expect(transaction.labels).to eq({ controller: 'TestController', action: 'show.json' }) expect(transaction.labels).to eq({ controller: 'TestController', action: 'show.json' })
......
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