Skip to content

Commit

Permalink
Add latest changes from gitlab-org/gitlab@master
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed May 18, 2022
1 parent a84995f commit 6b5d8b1
Show file tree
Hide file tree
Showing 132 changed files with 1,818 additions and 942 deletions.
2 changes: 1 addition & 1 deletion GITALY_SERVER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
93762b621c011fe570339c1c247d5197c2cfefcc
2106629e3af3e8949b23f20825d6bfee62c10992
2 changes: 1 addition & 1 deletion GITLAB_SHELL_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.3.0
14.3.1
86 changes: 43 additions & 43 deletions app/assets/javascripts/editor/schema/ci.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions app/assets/javascripts/issuable/issuable_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ function getFallbackKey() {

export default class IssuableForm {
constructor(form) {
if (form.length === 0) {
return;
}
this.form = form;
this.toggleWip = this.toggleWip.bind(this);
this.renderWipExplanation = this.renderWipExplanation.bind(this);
Expand Down
19 changes: 16 additions & 3 deletions app/assets/javascripts/issues/list/components/issues_list_app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import CsvImportExportButtons from '~/issuable/components/csv_import_export_butt
import IssuableByEmail from '~/issuable/components/issuable_by_email.vue';
import { IssuableStatus } from '~/issues/constants';
import axios from '~/lib/utils/axios_utils';
import { isPositiveInteger } from '~/lib/utils/number_utils';
import { scrollUp } from '~/lib/utils/scroll_utils';
import { getParameterByName, joinPaths } from '~/lib/utils/url_utility';
import {
Expand All @@ -45,6 +46,8 @@ import {
ISSUE_REFERENCE,
MAX_LIST_SIZE,
PAGE_SIZE,
PARAM_FIRST_PAGE_SIZE,
PARAM_LAST_PAGE_SIZE,
PARAM_PAGE_AFTER,
PARAM_PAGE_BEFORE,
PARAM_SORT,
Expand Down Expand Up @@ -390,12 +393,14 @@ export default {
},
urlParams() {
return {
page_after: this.pageParams.afterCursor,
page_before: this.pageParams.beforeCursor,
search: this.searchQuery,
sort: urlSortParams[this.sortKey],
state: this.state,
...this.urlFilterParams,
first_page_size: this.pageParams.firstPageSize,
last_page_size: this.pageParams.lastPageSize,
page_after: this.pageParams.afterCursor,
page_before: this.pageParams.beforeCursor,
};
},
hasCrmParameter() {
Expand Down Expand Up @@ -632,6 +637,8 @@ export default {
this.showBulkEditSidebar = showBulkEditSidebar;
},
updateData(sortValue) {
const firstPageSize = getParameterByName(PARAM_FIRST_PAGE_SIZE);
const lastPageSize = getParameterByName(PARAM_LAST_PAGE_SIZE);
const pageAfter = getParameterByName(PARAM_PAGE_AFTER);
const pageBefore = getParameterByName(PARAM_PAGE_BEFORE);
const state = getParameterByName(PARAM_STATE);
Expand Down Expand Up @@ -660,7 +667,13 @@ export default {
this.exportCsvPathWithQuery = this.getExportCsvPathWithQuery();
this.filterTokens = isSearchDisabled ? [] : getFilterTokens(window.location.search);
this.pageParams = getInitialPageParams(sortKey, pageAfter, pageBefore);
this.pageParams = getInitialPageParams(
sortKey,
isPositiveInteger(firstPageSize) ? parseInt(firstPageSize, 10) : undefined,
isPositiveInteger(lastPageSize) ? parseInt(lastPageSize, 10) : undefined,
pageAfter,
pageBefore,
);
this.sortKey = sortKey;
this.state = state || IssuableStates.Opened;
},
Expand Down
2 changes: 2 additions & 0 deletions app/assets/javascripts/issues/list/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export const MAX_LIST_SIZE = 10;
export const PAGE_SIZE = 20;
export const PAGE_SIZE_MANUAL = 100;
export const PARAM_ASSIGNEE_ID = 'assignee_id';
export const PARAM_FIRST_PAGE_SIZE = 'first_page_size';
export const PARAM_LAST_PAGE_SIZE = 'last_page_size';
export const PARAM_PAGE_AFTER = 'page_after';
export const PARAM_PAGE_BEFORE = 'page_before';
export const PARAM_SORT = 'sort';
Expand Down
11 changes: 9 additions & 2 deletions app/assets/javascripts/issues/list/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,15 @@ import {
WEIGHT_DESC,
} from './constants';

export const getInitialPageParams = (sortKey, afterCursor, beforeCursor) => ({
firstPageSize: sortKey === RELATIVE_POSITION_ASC ? PAGE_SIZE_MANUAL : PAGE_SIZE,
export const getInitialPageParams = (
sortKey,
firstPageSize = sortKey === RELATIVE_POSITION_ASC ? PAGE_SIZE_MANUAL : PAGE_SIZE,
lastPageSize,
afterCursor,
beforeCursor,
) => ({
firstPageSize: lastPageSize ? undefined : firstPageSize,
lastPageSize,
afterCursor,
beforeCursor,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
NOT_AVAILABLE_TEXT,
NOT_AVAILABLE_SIZE,
MORE_ACTIONS_TEXT,
COPY_IMAGE_PATH_TITLE,
} from '../../constants/index';
export default {
Expand Down Expand Up @@ -72,6 +73,7 @@ export default {
CONFIGURATION_DETAILS_ROW_TEST,
MISSING_MANIFEST_WARNING_TOOLTIP,
MORE_ACTIONS_TEXT,
COPY_IMAGE_PATH_TITLE,
},
computed: {
formattedSize() {
Expand Down Expand Up @@ -138,7 +140,7 @@ export default {
<clipboard-button
v-if="tag.location"
:title="tag.location"
:title="$options.i18n.COPY_IMAGE_PATH_TITLE"
:text="tag.location"
category="tertiary"
:disabled="disabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
IMAGE_FAILED_DELETED_STATUS,
IMAGE_MIGRATING_STATE,
ROOT_IMAGE_TEXT,
COPY_IMAGE_PATH_TITLE,
} from '../../constants/index';
import DeleteButton from '../delete_button.vue';
import CleanupStatus from './cleanup_status.vue';
Expand Down Expand Up @@ -52,6 +53,7 @@ export default {
i18n: {
REMOVE_REPOSITORY_LABEL,
ROW_SCHEDULED_FOR_DELETION,
COPY_IMAGE_PATH_TITLE,
},
computed: {
disabledDelete() {
Expand Down Expand Up @@ -115,7 +117,7 @@ export default {
v-if="item.location"
:disabled="deleting"
:text="item.location"
:title="item.location"
:title="$options.i18n.COPY_IMAGE_PATH_TITLE"
category="tertiary"
/>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const EMPTY_RESULT_MESSAGE = s__(
'ContainerRegistry|To widen your search, change or remove the filters above.',
);

export const COPY_IMAGE_PATH_TITLE = s__('ContainerRegistry|Copy image path');

// Parameters

export const IMAGE_DELETE_SCHEDULED_STATUS = 'DELETE_SCHEDULED';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script>
import { GlButton } from '@gitlab/ui';
import getAppStatus from '~/pipeline_editor/graphql/queries/client/app_status.query.graphql';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { EDITOR_APP_STATUS_EMPTY, EDITOR_APP_STATUS_LOADING } from '../../constants';
import FileTreePopover from '../popovers/file_tree_popover.vue';
import BranchSwitcher from './branch_switcher.vue';
Expand All @@ -12,7 +11,6 @@ export default {
FileTreePopover,
GlButton,
},
mixins: [glFeatureFlagMixin()],
props: {
hasUnsavedChanges: {
type: Boolean,
Expand Down Expand Up @@ -43,11 +41,7 @@ export default {
return this.appStatus === EDITOR_APP_STATUS_LOADING;
},
showFileTreeToggle() {
return (
this.glFeatures.pipelineEditorFileTree &&
!this.isNewCiConfigFile &&
this.appStatus !== EDITOR_APP_STATUS_EMPTY
);
return !this.isNewCiConfigFile && this.appStatus !== EDITOR_APP_STATUS_EMPTY;
},
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script>
import { GlModal } from '@gitlab/ui';
import { __ } from '~/locale';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import CommitSection from './components/commit/commit_section.vue';
import PipelineEditorDrawer from './components/drawer/pipeline_editor_drawer.vue';
import PipelineEditorFileNav from './components/file_nav/pipeline_editor_file_nav.vue';
Expand Down Expand Up @@ -34,7 +33,6 @@ export default {
PipelineEditorHeader,
PipelineEditorTabs,
},
mixins: [glFeatureFlagMixin()],
props: {
ciConfigData: {
type: Object,
Expand Down Expand Up @@ -76,9 +74,6 @@ export default {
includesFiles() {
return this.ciConfigData?.includes || [];
},
isFileTreeVisible() {
return this.showFileTree && this.glFeatures.pipelineEditorFileTree;
},
},
mounted() {
this.showFileTree = JSON.parse(localStorage.getItem(FILE_TREE_DISPLAY_KEY)) || false;
Expand Down Expand Up @@ -140,7 +135,7 @@ export default {
/>
<div class="gl-display-flex gl-w-full gl-sm-flex-direction-column">
<pipeline-editor-file-tree
v-if="isFileTreeVisible"
v-if="showFileTree"
class="gl-flex-shrink-0"
:includes="includesFiles"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ export default {

<template>
<div data-qa-selector="approvals_summary_content">
<strong>{{ approvalLeftMessage }}</strong>
<span class="gl-font-weight-bold">{{ approvalLeftMessage }}</span>
<template v-if="hasApprovers">
<span v-if="approvalLeftMessage">{{ message }}</span>
<strong v-else>{{ message }}</strong>
<span v-else class="gl-font-weight-bold">{{ message }}</span>
<user-avatar-list
class="gl-display-inline-block gl-vertical-align-middle"
:img-size="24"
Expand Down
2 changes: 2 additions & 0 deletions app/assets/stylesheets/framework/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@

.navbar-sub-nav {
display: flex;
align-items: center;
height: 100%;
margin: 0 0 0 6px;

.dropdown-chevron {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/framework/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ $browser-scrollbar-size: 10px;
/*
* Misc
*/
$header-height: var(--header-height, 40px);
$header-height: var(--header-height, 48px);
$header-zindex: 1000;
$zindex-dropdown-menu: 300;
$suggestion-header-height: 46px;
Expand Down
21 changes: 5 additions & 16 deletions app/assets/stylesheets/startup/startup-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ input {
padding: 0 16px;
z-index: 1000;
margin-bottom: 0;
min-height: var(--header-height, 40px);
min-height: var(--header-height, 48px);
border: 0;
position: fixed;
top: 0;
Expand All @@ -771,7 +771,7 @@ input {
display: flex;
justify-content: space-between;
position: relative;
min-height: var(--header-height, 40px);
min-height: var(--header-height, 48px);
padding-left: 0;
}
.navbar-gitlab .header-content .title {
Expand All @@ -787,9 +787,6 @@ input {
.navbar-gitlab .header-content .title img {
height: 24px;
}
.navbar-gitlab .header-content .title img + .logo-text {
margin-left: 8px;
}
.navbar-gitlab .header-content .title a {
display: flex;
align-items: center;
Expand Down Expand Up @@ -915,6 +912,8 @@ input {
}
.navbar-sub-nav {
display: flex;
align-items: center;
height: 100%;
margin: 0 0 0 6px;
}
.caret-down,
Expand Down Expand Up @@ -1034,7 +1033,7 @@ input {
left: 0;
z-index: 600;
width: 220px;
top: var(--header-height, 40px);
top: var(--header-height, 48px);
background-color: #303030;
transform: translate3d(0, 0, 0);
}
Expand Down Expand Up @@ -2044,19 +2043,9 @@ body.gl-dark {
.gl-display-none {
display: none;
}
@media (min-width: 992px) {
.gl-lg-display-none\! {
display: none !important;
}
}
.gl-display-flex {
display: flex;
}
@media (min-width: 992px) {
.gl-lg-display-flex {
display: flex;
}
}
@media (min-width: 576px) {
.gl-sm-display-block {
display: block;
Expand Down
21 changes: 5 additions & 16 deletions app/assets/stylesheets/startup/startup-general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ input {
padding: 0 16px;
z-index: 1000;
margin-bottom: 0;
min-height: var(--header-height, 40px);
min-height: var(--header-height, 48px);
border: 0;
position: fixed;
top: 0;
Expand All @@ -756,7 +756,7 @@ input {
display: flex;
justify-content: space-between;
position: relative;
min-height: var(--header-height, 40px);
min-height: var(--header-height, 48px);
padding-left: 0;
}
.navbar-gitlab .header-content .title {
Expand All @@ -772,9 +772,6 @@ input {
.navbar-gitlab .header-content .title img {
height: 24px;
}
.navbar-gitlab .header-content .title img + .logo-text {
margin-left: 8px;
}
.navbar-gitlab .header-content .title a {
display: flex;
align-items: center;
Expand Down Expand Up @@ -900,6 +897,8 @@ input {
}
.navbar-sub-nav {
display: flex;
align-items: center;
height: 100%;
margin: 0 0 0 6px;
}
.caret-down,
Expand Down Expand Up @@ -1019,7 +1018,7 @@ input {
left: 0;
z-index: 600;
width: 220px;
top: var(--header-height, 40px);
top: var(--header-height, 48px);
background-color: #f0f0f0;
transform: translate3d(0, 0, 0);
}
Expand Down Expand Up @@ -1704,19 +1703,9 @@ svg.s16 {
.gl-display-none {
display: none;
}
@media (min-width: 992px) {
.gl-lg-display-none\! {
display: none !important;
}
}
.gl-display-flex {
display: flex;
}
@media (min-width: 992px) {
.gl-lg-display-flex {
display: flex;
}
}
@media (min-width: 576px) {
.gl-sm-display-block {
display: block;
Expand Down
Loading

0 comments on commit 6b5d8b1

Please sign in to comment.