This instance will be upgraded to Heptapod 0.26.0rc1 on 2021-10-26 at 14:30 UTC+2 (a few minutes of down time)

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
require_relative 'lib/gitlab_danger'
require_relative 'lib/gitlab/danger/request_helper'
danger.import_plugin('danger/plugins/helper.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 {
};
</script>
<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 }}
</div>
</template>
......@@ -21,8 +21,12 @@ export default {
<template>
<div class="js-line log-line">
<line-number :line-number="line.lineNumber" :path="path" />
<span v-for="(content, i) in line.content" :key="i" :class="content.style">{{
content.text
}}</span>
<span
v-for="(content, i) in line.content"
:key="i"
:class="content.style"
class="ws-pre-wrap"
>{{ content.text }}</span
>
</div>
</template>
......@@ -43,15 +43,19 @@ export default {
<template>
<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"
@click="handleOnClick"
>
<icon :name="iconName" class="arrow position-absolute" />
<line-number :line-number="line.lineNumber" :path="path" />
<span v-for="(content, i) in line.content" :key="i" class="line-text" :class="content.style">{{
content.text
}}</span>
<span
v-for="(content, i) in line.content"
:key="i"
class="line-text w-100 ws-pre-wrap"
:class="content.style"
>{{ content.text }}</span
>
<duration-badge v-if="duration" :duration="duration" />
</div>
</template>
......@@ -48,7 +48,7 @@ export default {
<template>
<gl-link
:id="lineNumberId"
class="d-inline-block text-right line-number"
class="d-inline-block text-right line-number flex-shrink-0"
:href="buildLineNumber"
>{{ parsedLineNumber }}</gl-link
>
......
......@@ -19,7 +19,7 @@ export default {
state.isSidebarOpen = true;
},
[types.RECEIVE_TRACE_SUCCESS](state, log) {
[types.RECEIVE_TRACE_SUCCESS](state, log = {}) {
if (log.state) {
state.traceState = log.state;
}
......
......@@ -416,7 +416,6 @@ export default {
<gl-button
v-if="showRearrangePanelsBtn"
:pressed="isRearrangingPanels"
new-style
variant="default"
class="mr-2 mt-1 js-rearrange-button"
@click="toggleRearrangingPanels"
......@@ -426,7 +425,6 @@ export default {
<gl-button
v-if="addingMetricsAvailable"
v-gl-modal="$options.addMetric.modalId"
new-style
variant="outline-success"
class="mr-2 mt-1 js-add-metric-button"
>
......
......@@ -5,6 +5,7 @@ import ZenMode from '~/zen_mode';
import '~/notes/index';
import initIssueableApp from '~/issue_show';
import initRelatedMergeRequestsApp from '~/related_merge_requests';
import initVueIssuableSidebarApp from '~/issuable_sidebar/sidebar_bundle';
export default function() {
initIssueableApp();
......@@ -12,5 +13,9 @@ export default function() {
new Issue(); // eslint-disable-line no-new
new ShortcutsIssuable(); // eslint-disable-line no-new
new ZenMode(); // eslint-disable-line no-new
initIssuableSidebar();
if (gon.features && gon.features.vueIssuableSidebar) {
initVueIssuableSidebarApp();
} else {
initIssuableSidebar();
}
}
......@@ -3,5 +3,7 @@ import initShow from '../show';
document.addEventListener('DOMContentLoaded', () => {
initShow();
initSidebarBundle();
if (gon.features && !gon.features.vueIssuableSidebar) {
initSidebarBundle();
}
});
......@@ -4,11 +4,16 @@ import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable';
import { handleLocationHash } from '~/lib/utils/common_utils';
import howToMerge from '~/how_to_merge';
import initPipelines from '~/commit/pipelines/pipelines_bundle';
import initVueIssuableSidebarApp from '~/issuable_sidebar/sidebar_bundle';
import initWidget from '../../../vue_merge_request_widget';
export default function() {
new ZenMode(); // eslint-disable-line no-new
initIssuableSidebar();
if (gon.features && gon.features.vueIssuableSidebar) {
initVueIssuableSidebarApp();
} else {
initIssuableSidebar();
}
initPipelines();
new ShortcutsIssuable(true); // eslint-disable-line no-new
handleLocationHash();
......
......@@ -4,6 +4,8 @@ import initShow from '../init_merge_request_show';
document.addEventListener('DOMContentLoaded', () => {
initShow();
initSidebarBundle();
if (gon.features && !gon.features.vueIssuableSidebar) {
initSidebarBundle();
}
initMrNotes();
});
......@@ -440,6 +440,7 @@ img.emoji {
.flex-no-shrink { flex-shrink: 0; }
.ws-initial { white-space: initial; }
.ws-normal { white-space: normal; }
.ws-pre-wrap { white-space: pre-wrap; }
.overflow-auto { overflow: auto; }
.d-flex-center {
......
......@@ -9,7 +9,6 @@
border-radius: $border-radius-small;
min-height: 42px;
background-color: $builds-trace-bg;
white-space: pre-wrap;
}
.log-line {
......
......@@ -104,7 +104,6 @@ def update
redirect_to edit_group_path(@group, anchor: params[:update_section]), notice: "Group '#{@group.name}' was successfully updated."
else
@group.path = @group.path_before_last_save || @group.path_was
render action: "edit"
end
end
......@@ -124,7 +123,7 @@ def transfer
flash[:notice] = "Group '#{@group.name}' was successfully transferred."
redirect_to group_path(@group)
else
flash[:alert] = service.error
flash[:alert] = service.error.html_safe
redirect_to edit_group_path(@group)
end
end
......
......@@ -42,6 +42,10 @@ def set_issuables_index_only_actions
before_action :authorize_import_issues!, only: [:import_csv]
before_action :authorize_download_code!, only: [:related_branches]
before_action do
push_frontend_feature_flag(:vue_issuable_sidebar, project.group)
end
respond_to :html
alias_method :designs, :show
......
......@@ -21,6 +21,10 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:diffs_batch_load, @project)
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]
def index
......
......@@ -184,7 +184,7 @@ def render_show
end
def show_represent_params
{ grouped: true }
{ grouped: true, expanded: params[:expanded].to_a.map(&:to_i) }
end
def create_params
......
......@@ -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_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|
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