From cba55463a02fe6f9c9e8b6ed0b9ed38a0f087342 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 29 Sep 2021 06:09:19 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../javascripts/diffs/components/app.vue | 15 ++ .../components/issuable_item.vue | 239 +++++++++--------- .../components/issuable_list_root.vue | 124 +++++---- .../components/issue_card_time_info.vue | 17 +- .../components/issue/issue_assignees.vue | 5 +- app/assets/stylesheets/pages/issuable.scss | 58 ++--- .../projects/merge_requests_controller.rb | 1 + .../development/mr_changes_fluid_layout.yml | 8 + config/initializers/backtrace_silencers.rb | 2 +- .../gitlab_rails_cheat_sheet.md | 28 +- doc/ci/chatops/index.md | 2 + doc/ci/variables/predefined_variables.md | 1 + doc/update/restore_after_failure.md | 46 +--- .../dependency_scanning/analyzers.md | 6 +- .../dependency_scanning/index.md | 12 +- lib/gitlab/chat/command.rb | 3 +- locale/gitlab.pot | 3 + package.json | 2 +- spec/frontend/diffs/components/app_spec.js | 19 ++ .../components/issuable_item_spec.js | 15 +- .../components/issue/issue_assignees_spec.js | 4 - spec/lib/gitlab/chat/command_spec.rb | 1 + yarn.lock | 8 +- 23 files changed, 314 insertions(+), 305 deletions(-) create mode 100644 config/feature_flags/development/mr_changes_fluid_layout.yml diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index a2ea42e963c..465f9836140 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -19,6 +19,7 @@ import { updateHistory } from '~/lib/utils/url_utility'; import { __ } from '~/locale'; import MrWidgetHowToMergeModal from '~/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue'; import PanelResizer from '~/vue_shared/components/panel_resizer.vue'; +import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import notesEventHub from '../../notes/event_hub'; import { @@ -79,6 +80,7 @@ export default { MrWidgetHowToMergeModal, GlAlert, }, + mixins: [glFeatureFlagsMixin()], alerts: { ALERT_OVERFLOW_HIDDEN, ALERT_MERGE_CONFLICT, @@ -252,6 +254,10 @@ export default { return this.treeWidth <= TREE_HIDE_STATS_WIDTH; }, isLimitedContainer() { + if (this.glFeatures.mrChangesFluidLayout) { + return false; + } + return !this.renderFileTree && !this.isParallelView && !this.isFluidLayout; }, isFullChangeset() { @@ -386,6 +392,8 @@ export default { diffsApp.instrument(); }, created() { + this.mergeRequestContainers = document.querySelectorAll('.merge-request-container'); + this.adjustView(); this.subscribeToEvents(); @@ -513,6 +521,13 @@ export default { } else { this.removeEventListeners(); } + + if (!this.isFluidLayout && this.glFeatures.mrChangesFluidLayout) { + this.mergeRequestContainers.forEach((el) => { + el.classList.toggle('limit-container-width', !this.shouldShow); + el.classList.toggle('container-limited', !this.shouldShow); + }); + } }, setEventListeners() { Mousetrap.bind(keysFor(MR_PREVIOUS_FILE_IN_DIFF), () => this.jumpToFile(-1)); diff --git a/app/assets/javascripts/issuable_list/components/issuable_item.vue b/app/assets/javascripts/issuable_list/components/issuable_item.vue index df9d5c86a4b..ab04c6a38a5 100644 --- a/app/assets/javascripts/issuable_list/components/issuable_item.vue +++ b/app/assets/javascripts/issuable_list/components/issuable_item.vue @@ -1,5 +1,5 @@