Read about our upcoming Code of Conduct on this issue

This instance was upgraded to Heptapod 0.28.0 today

Commit a3566e71 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent b5de70e680e5
# frozen_string_literal: true # frozen_string_literal: true
require_relative 'lib/gitlab_danger' require_relative 'lib/gitlab_danger'
require_relative 'lib/gitlab/danger/request_helper'
danger.import_plugin('danger/plugins/helper.rb') danger.import_plugin('danger/plugins/helper.rb')
danger.import_plugin('danger/plugins/roulette.rb') danger.import_plugin('danger/plugins/roulette.rb')
......
<script>
export default {
props: {
signedIn: {
type: Boolean,
required: true,
},
sidebarStatusClass: {
type: String,
required: false,
default: '',
},
},
};
</script>
<template>
<aside
:class="sidebarStatusClass"
class="right-sidebar js-right-sidebar js-issuable-sidebar"
aria-live="polite"
></aside>
</template>
import Vue from 'vue';
import SidebarApp from './components/sidebar_app.vue';
export default () => {
const el = document.getElementById('js-vue-issuable-sidebar');
if (!el) {
return false;
}
const { sidebarStatusClass } = el.dataset;
// An empty string is present when user is signed in.
const signedIn = el.dataset.signedIn === '';
return new Vue({
el,
components: { SidebarApp },
render: createElement =>
createElement('sidebar-app', {
props: {
signedIn,
sidebarStatusClass,
},
}),
});
};
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
}; };
</script> </script>
<template> <template>
<div class="log-duration-badge rounded align-self-start px-2 ml-2 flex-shrink-0"> <div class="log-duration-badge rounded align-self-start px-2 ml-2 flex-shrink-0 ws-normal">
{{ duration }} {{ duration }}
</div> </div>
</template> </template>
...@@ -21,8 +21,12 @@ export default { ...@@ -21,8 +21,12 @@ export default {
<template> <template>
<div class="js-line log-line"> <div class="js-line log-line">
<line-number :line-number="line.lineNumber" :path="path" /> <line-number :line-number="line.lineNumber" :path="path" />
<span v-for="(content, i) in line.content" :key="i" :class="content.style">{{ <span
content.text v-for="(content, i) in line.content"
}}</span> :key="i"
:class="content.style"
class="ws-pre-wrap"
>{{ content.text }}</span
>
</div> </div>
</template> </template>
...@@ -43,15 +43,19 @@ export default { ...@@ -43,15 +43,19 @@ export default {
<template> <template>
<div <div
class="log-line collapsible-line d-flex justify-content-between" class="log-line collapsible-line d-flex justify-content-between ws-normal"
role="button" role="button"
@click="handleOnClick" @click="handleOnClick"
> >
<icon :name="iconName" class="arrow position-absolute" /> <icon :name="iconName" class="arrow position-absolute" />
<line-number :line-number="line.lineNumber" :path="path" /> <line-number :line-number="line.lineNumber" :path="path" />
<span v-for="(content, i) in line.content" :key="i" class="line-text" :class="content.style">{{ <span
content.text v-for="(content, i) in line.content"
}}</span> :key="i"
class="line-text w-100 ws-pre-wrap"
:class="content.style"
>{{ content.text }}</span
>
<duration-badge v-if="duration" :duration="duration" /> <duration-badge v-if="duration" :duration="duration" />
</div> </div>
</template> </template>
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
<template> <template>
<gl-link <gl-link
:id="lineNumberId" :id="lineNumberId"
class="d-inline-block text-right line-number" class="d-inline-block text-right line-number flex-shrink-0"
:href="buildLineNumber" :href="buildLineNumber"
>{{ parsedLineNumber }}</gl-link >{{ parsedLineNumber }}</gl-link
> >
......
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
state.isSidebarOpen = true; state.isSidebarOpen = true;
}, },
[types.RECEIVE_TRACE_SUCCESS](state, log) { [types.RECEIVE_TRACE_SUCCESS](state, log = {}) {
if (log.state) { if (log.state) {
state.traceState = log.state; state.traceState = log.state;
} }
......
...@@ -416,7 +416,6 @@ export default { ...@@ -416,7 +416,6 @@ export default {
<gl-button <gl-button
v-if="showRearrangePanelsBtn" v-if="showRearrangePanelsBtn"
:pressed="isRearrangingPanels" :pressed="isRearrangingPanels"
new-style
variant="default" variant="default"
class="mr-2 mt-1 js-rearrange-button" class="mr-2 mt-1 js-rearrange-button"
@click="toggleRearrangingPanels" @click="toggleRearrangingPanels"
...@@ -426,7 +425,6 @@ export default { ...@@ -426,7 +425,6 @@ export default {
<gl-button <gl-button
v-if="addingMetricsAvailable" v-if="addingMetricsAvailable"
v-gl-modal="$options.addMetric.modalId" v-gl-modal="$options.addMetric.modalId"
new-style
variant="outline-success" variant="outline-success"
class="mr-2 mt-1 js-add-metric-button" class="mr-2 mt-1 js-add-metric-button"
> >
......
...@@ -5,6 +5,7 @@ import ZenMode from '~/zen_mode'; ...@@ -5,6 +5,7 @@ import ZenMode from '~/zen_mode';
import '~/notes/index'; import '~/notes/index';
import initIssueableApp from '~/issue_show'; import initIssueableApp from '~/issue_show';
import initRelatedMergeRequestsApp from '~/related_merge_requests'; import initRelatedMergeRequestsApp from '~/related_merge_requests';
import initVueIssuableSidebarApp from '~/issuable_sidebar/sidebar_bundle';
export default function() { export default function() {
initIssueableApp(); initIssueableApp();
...@@ -12,5 +13,9 @@ export default function() { ...@@ -12,5 +13,9 @@ export default function() {
new Issue(); // eslint-disable-line no-new new Issue(); // eslint-disable-line no-new
new ShortcutsIssuable(); // eslint-disable-line no-new new ShortcutsIssuable(); // eslint-disable-line no-new
new ZenMode(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new
if (gon.features && gon.features.vueIssuableSidebar) {
initVueIssuableSidebarApp();
} else {
initIssuableSidebar(); initIssuableSidebar();
}
} }
...@@ -3,5 +3,7 @@ import initShow from '../show'; ...@@ -3,5 +3,7 @@ import initShow from '../show';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
initShow(); initShow();
if (gon.features && !gon.features.vueIssuableSidebar) {
initSidebarBundle(); initSidebarBundle();
}
}); });
...@@ -4,11 +4,16 @@ import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable'; ...@@ -4,11 +4,16 @@ import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable';
import { handleLocationHash } from '~/lib/utils/common_utils'; import { handleLocationHash } from '~/lib/utils/common_utils';
import howToMerge from '~/how_to_merge'; import howToMerge from '~/how_to_merge';
import initPipelines from '~/commit/pipelines/pipelines_bundle'; import initPipelines from '~/commit/pipelines/pipelines_bundle';
import initVueIssuableSidebarApp from '~/issuable_sidebar/sidebar_bundle';
import initWidget from '../../../vue_merge_request_widget'; import initWidget from '../../../vue_merge_request_widget';
export default function() { export default function() {
new ZenMode(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new
if (gon.features && gon.features.vueIssuableSidebar) {
initVueIssuableSidebarApp();
} else {
initIssuableSidebar(); initIssuableSidebar();
}
initPipelines(); initPipelines();
new ShortcutsIssuable(true); // eslint-disable-line no-new new ShortcutsIssuable(true); // eslint-disable-line no-new
handleLocationHash(); handleLocationHash();
......
...@@ -4,6 +4,8 @@ import initShow from '../init_merge_request_show'; ...@@ -4,6 +4,8 @@ import initShow from '../init_merge_request_show';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
initShow(); initShow();
if (gon.features && !gon.features.vueIssuableSidebar) {
initSidebarBundle(); initSidebarBundle();
}
initMrNotes(); initMrNotes();
}); });
...@@ -440,6 +440,7 @@ img.emoji { ...@@ -440,6 +440,7 @@ img.emoji {
.flex-no-shrink { flex-shrink: 0; } .flex-no-shrink { flex-shrink: 0; }
.ws-initial { white-space: initial; } .ws-initial { white-space: initial; }
.ws-normal { white-space: normal; } .ws-normal { white-space: normal; }
.ws-pre-wrap { white-space: pre-wrap; }
.overflow-auto { overflow: auto; } .overflow-auto { overflow: auto; }
.d-flex-center { .d-flex-center {
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
border-radius: $border-radius-small; border-radius: $border-radius-small;
min-height: 42px; min-height: 42px;
background-color: $builds-trace-bg; background-color: $builds-trace-bg;
white-space: pre-wrap;
} }
.log-line { .log-line {
......
...@@ -104,7 +104,6 @@ def update ...@@ -104,7 +104,6 @@ def update
redirect_to edit_group_path(@group, anchor: params[:update_section]), notice: "Group '#{@group.name}' was successfully updated." redirect_to edit_group_path(@group, anchor: params[:update_section]), notice: "Group '#{@group.name}' was successfully updated."
else else
@group.path = @group.path_before_last_save || @group.path_was @group.path = @group.path_before_last_save || @group.path_was
render action: "edit" render action: "edit"
end end
end end
...@@ -124,7 +123,7 @@ def transfer ...@@ -124,7 +123,7 @@ def transfer
flash[:notice] = "Group '#{@group.name}' was successfully transferred." flash[:notice] = "Group '#{@group.name}' was successfully transferred."
redirect_to group_path(@group) redirect_to group_path(@group)
else else
flash[:alert] = service.error flash[:alert] = service.error.html_safe
redirect_to edit_group_path(@group) redirect_to edit_group_path(@group)
end end
end end
......
...@@ -42,6 +42,10 @@ def set_issuables_index_only_actions ...@@ -42,6 +42,10 @@ def set_issuables_index_only_actions
before_action :authorize_import_issues!, only: [:import_csv] before_action :authorize_import_issues!, only: [:import_csv]
before_action :authorize_download_code!, only: [:related_branches] before_action :authorize_download_code!, only: [:related_branches]
before_action do
push_frontend_feature_flag(:vue_issuable_sidebar, project.group)
end
respond_to :html respond_to :html
alias_method :designs, :show alias_method :designs, :show
......
...@@ -21,6 +21,10 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -21,6 +21,10 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:diffs_batch_load, @project) push_frontend_feature_flag(:diffs_batch_load, @project)
end end
before_action do
push_frontend_feature_flag(:vue_issuable_sidebar, @project.group)
end
around_action :allow_gitaly_ref_name_caching, only: [:index, :show, :discussions] around_action :allow_gitaly_ref_name_caching, only: [:index, :show, :discussions]
def index def index
......
...@@ -184,7 +184,7 @@ def render_show ...@@ -184,7 +184,7 @@ def render_show
end end
def show_represent_params def show_represent_params
{ grouped: true } { grouped: true, expanded: params[:expanded].to_a.map(&:to_i) }
end end
def create_params def create_params
......
...@@ -42,6 +42,7 @@ class Build < CommitStatus ...@@ -42,6 +42,7 @@ class Build < CommitStatus
has_many :job_artifacts, class_name: 'Ci::JobArtifact', foreign_key: :job_id, dependent: :destroy, inverse_of: :job # rubocop:disable Cop/ActiveRecordDependent has_many :job_artifacts, class_name: 'Ci::JobArtifact', foreign_key: :job_id, dependent: :destroy, inverse_of: :job # rubocop:disable Cop/ActiveRecordDependent
has_many :job_variables, class_name: 'Ci::JobVariable', foreign_key: :job_id has_many :job_variables, class_name: 'Ci::JobVariable', foreign_key: :job_id
has_many :sourced_pipelines, class_name: 'Ci::Sources::Pipeline', foreign_key: :source_job_id
Ci::JobArtifact.file_types.each do |key, value| Ci::JobArtifact.file_types.each do |key, value|
has_one :"job_artifacts_#{key}", -> { where(file_type: value) }, class_name: 'Ci::JobArtifact', inverse_of: :job, foreign_key: :job_id has_one :"job_artifacts_#{key}", -> { where(file_type: value) }, class_name: 'Ci::JobArtifact', inverse_of: :job, foreign_key: :job_id
......
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