Skip to content

Commit 1a9340f

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent f52c460 commit 1a9340f

File tree

87 files changed

+1277
-720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1277
-720
lines changed

app/assets/javascripts/admin/application_settings/deletion_protection/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { __, s__ } from '~/locale';
33
export const I18N_DELETION_PROTECTION = {
44
label: s__('DeletionSettings|Deletion protection'),
55
helpText: s__(
6-
'DeletionSettings|Period that deleted groups and projects will remain restorable for. Personal projects are always deleted immediately.',
6+
'DeletionSettings|Period that deleted groups and projects will remain restorable for.',
77
),
88
learnMore: __('Learn more.'),
99
days: __('days'),

app/assets/javascripts/batch_comments/components/submit_dropdown.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,11 @@ export default {
219219
onBeforeClose({ originalEvent: { target }, preventDefault }) {
220220
if (
221221
target &&
222-
[document.querySelector('.atwho-container'), document.querySelector('.dz-hidden-input')]
222+
[
223+
document.querySelector('.atwho-container'),
224+
document.querySelector('.dz-hidden-input'),
225+
document.querySelector('.comment-templates-modal'),
226+
]
223227
.filter(Boolean)
224228
.some((el) => el.contains(target))
225229
) {

app/assets/javascripts/merge_request_dashboard/queries/assignee_count.query.graphql

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ query requestingReviewCount(
66
$mergedAfter: Time
77
$or: UnionedMergeRequestFilterInput
88
$not: MergeRequestsResolverNegatedParams
9+
$ignoredReviewerUsername: String
910
) {
1011
currentUser {
1112
id
@@ -17,6 +18,7 @@ query requestingReviewCount(
1718
mergedAfter: $mergedAfter
1819
or: $or
1920
not: $not
21+
ignoredReviewerUsername: $ignoredReviewerUsername
2022
) {
2123
count
2224
}

app/assets/javascripts/packages_and_registries/package_registry/components/details/additional_metadata.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ export default {
8787
8888
<template>
8989
<div>
90-
<h3 v-if="isLoading || showMetadata" class="gl-text-lg" data-testid="title">
90+
<h2 v-if="isLoading || showMetadata" class="gl-heading-2 gl-mt-5" data-testid="title">
9191
{{ $options.i18n.componentTitle }}
92-
</h3>
92+
</h2>
9393
<gl-alert
9494
v-if="fetchPackageMetadataError"
9595
variant="danger"

app/assets/javascripts/packages_and_registries/package_registry/components/details/composer_installation.vue

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script>
2-
import { GlLink, GlSprintf } from '@gitlab/ui';
2+
import { GlAlert, GlLink, GlSprintf } from '@gitlab/ui';
33
import { s__ } from '~/locale';
4-
import InstallationTitle from '~/packages_and_registries/package_registry/components/details/installation_title.vue';
54
import {
65
TRACKING_ACTION_COPY_COMPOSER_REGISTRY_INCLUDE_COMMAND,
76
TRACKING_ACTION_COPY_COMPOSER_PACKAGE_INCLUDE_COMMAND,
@@ -13,8 +12,8 @@ import CodeInstruction from '~/vue_shared/components/registry/code_instruction.v
1312
export default {
1413
name: 'ComposerInstallation',
1514
components: {
16-
InstallationTitle,
1715
CodeInstruction,
16+
GlAlert,
1817
GlLink,
1918
GlSprintf,
2019
},
@@ -34,9 +33,6 @@ export default {
3433
// eslint-disable-next-line @gitlab/require-i18n-strings
3534
return `composer req ${[this.packageEntity.name]}:${this.packageEntity.version}`;
3635
},
37-
groupExists() {
38-
return this.groupListUrl?.length > 0;
39-
},
4036
},
4137
i18n: {
4238
registryInclude: s__('PackageRegistry|Add composer registry'),
@@ -46,6 +42,9 @@ export default {
4642
infoLine: s__(
4743
'PackageRegistry|For more information on Composer packages in GitLab, %{linkStart}see the documentation.%{linkEnd}',
4844
),
45+
noGroupListUrlWarning: s__(
46+
'PackageRegistry|Composer packages are installed at the group level, but there is no group associated with this project.',
47+
),
4948
},
5049
tracking: {
5150
TRACKING_ACTION_COPY_COMPOSER_REGISTRY_INCLUDE_COMMAND,
@@ -55,14 +54,16 @@ export default {
5554
links: {
5655
COMPOSER_HELP_PATH,
5756
},
58-
installOptions: [{ value: 'composer', label: s__('PackageRegistry|Show Composer commands') }],
5957
};
6058
</script>
6159

6260
<template>
63-
<div v-if="groupExists" data-testid="root-node">
64-
<installation-title package-type="composer" :options="$options.installOptions" />
65-
61+
<div v-if="!groupListUrl" data-testid="error-root-node">
62+
<gl-alert variant="warning" :dismissible="false">
63+
{{ $options.i18n.noGroupListUrlWarning }}
64+
</gl-alert>
65+
</div>
66+
<div v-else data-testid="root-node">
6667
<code-instruction
6768
:label="$options.i18n.registryInclude"
6869
:instruction="composerRegistryInclude"

app/assets/javascripts/packages_and_registries/package_registry/components/details/conan_installation.vue

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script>
22
import { GlLink, GlSprintf } from '@gitlab/ui';
33
import { s__ } from '~/locale';
4-
import InstallationTitle from '~/packages_and_registries/package_registry/components/details/installation_title.vue';
54
import {
65
TRACKING_ACTION_COPY_CONAN_COMMAND,
76
TRACKING_ACTION_COPY_CONAN_SETUP_COMMAND,
@@ -13,7 +12,6 @@ import CodeInstruction from '~/vue_shared/components/registry/code_instruction.v
1312
export default {
1413
name: 'ConanInstallation',
1514
components: {
16-
InstallationTitle,
1715
CodeInstruction,
1816
GlLink,
1917
GlSprintf,
@@ -45,14 +43,11 @@ export default {
4543
TRACKING_LABEL_CODE_INSTRUCTION,
4644
},
4745
links: { CONAN_HELP_PATH },
48-
installOptions: [{ value: 'conan', label: s__('PackageRegistry|Show Conan commands') }],
4946
};
5047
</script>
5148

5249
<template>
5350
<div>
54-
<installation-title package-type="conan" :options="$options.installOptions" />
55-
5651
<code-instruction
5752
:label="s__('PackageRegistry|Conan Command')"
5853
:instruction="conanInstallationCommand"
@@ -61,7 +56,7 @@ export default {
6156
:tracking-label="$options.tracking.TRACKING_LABEL_CODE_INSTRUCTION"
6257
/>
6358

64-
<h3 class="gl-text-lg">{{ __('Registry setup') }}</h3>
59+
<h3 class="gl-heading-3 gl-mt-5">{{ s__('PackageRegistry|Registry setup') }}</h3>
6560

6661
<code-instruction
6762
:label="s__('PackageRegistry|Add Conan Remote')"

app/assets/javascripts/packages_and_registries/package_registry/components/details/installation_commands.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default {
4040
</script>
4141

4242
<template>
43-
<div v-if="installationComponent">
43+
<div class="gl-mb-5">
4444
<component :is="installationComponent" :package-entity="packageEntity" />
4545
</div>
4646
</template>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<script>
2+
import { s__ } from '~/locale';
3+
import PersistedRadioGroup from '~/vue_shared/components/registry/persisted_radio_group.vue';
4+
5+
export default {
6+
name: 'InstallationMethod',
7+
components: {
8+
PersistedRadioGroup,
9+
},
10+
props: {
11+
packageType: {
12+
type: String,
13+
required: true,
14+
},
15+
options: {
16+
type: Array,
17+
required: true,
18+
},
19+
},
20+
computed: {
21+
storageKey() {
22+
return `package_${this.packageType}_installation_instructions`;
23+
},
24+
},
25+
i18n: {
26+
label: s__('PackageRegistry|Installation Method'),
27+
},
28+
};
29+
</script>
30+
31+
<template>
32+
<div class="gl-mb-5">
33+
<persisted-radio-group
34+
:storage-key="storageKey"
35+
:options="options"
36+
:label="$options.i18n.label"
37+
@change="$emit('change', $event)"
38+
/>
39+
</div>
40+
</template>

app/assets/javascripts/packages_and_registries/package_registry/components/details/installation_title.vue

-38
This file was deleted.

app/assets/javascripts/packages_and_registries/package_registry/components/details/maven_installation.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<script>
22
import { GlLink, GlSprintf } from '@gitlab/ui';
33
import { s__ } from '~/locale';
4-
import InstallationTitle from '~/packages_and_registries/package_registry/components/details/installation_title.vue';
4+
import InstallationMethod from '~/packages_and_registries/package_registry/components/details/installation_method.vue';
5+
56
import {
67
TRACKING_ACTION_COPY_MAVEN_XML,
78
TRACKING_ACTION_COPY_MAVEN_COMMAND,
@@ -20,7 +21,7 @@ import CodeInstruction from '~/vue_shared/components/registry/code_instruction.v
2021
export default {
2122
name: 'MavenInstallation',
2223
components: {
23-
InstallationTitle,
24+
InstallationMethod,
2425
CodeInstruction,
2526
GlLink,
2627
GlSprintf,
@@ -108,7 +109,7 @@ export default {
108109
`PackageRegistry|Copy and paste this inside your %{codeStart}pom.xml%{codeEnd} %{codeStart}dependencies%{codeEnd} block.`,
109110
),
110111
setupText: s__(
111-
`PackageRegistry|If you haven't already done so, you will need to add the below to your %{codeStart}pom.xml%{codeEnd} file.`,
112+
`PackageRegistry|If you haven't already, add the configuration below to your %{codeStart}pom.xml%{codeEnd} file.`,
112113
),
113114
helpText: s__(
114115
'PackageRegistry|For more information on the Maven registry, %{linkStart}see the documentation%{linkEnd}.',
@@ -137,12 +138,11 @@ export default {
137138

138139
<template>
139140
<div>
140-
<installation-title
141+
<installation-method
141142
package-type="maven"
142143
:options="$options.installOptions"
143144
@change="instructionType = $event"
144145
/>
145-
146146
<template v-if="showMaven">
147147
<p>
148148
<gl-sprintf :message="$options.i18n.xmlText">
@@ -169,7 +169,7 @@ export default {
169169
:tracking-label="$options.tracking.TRACKING_LABEL_CODE_INSTRUCTION"
170170
/>
171171

172-
<h3 class="gl-text-lg">{{ s__('PackageRegistry|Registry setup') }}</h3>
172+
<h3 class="gl-heading-3 gl-mt-5">{{ s__('PackageRegistry|Registry setup') }}</h3>
173173
<p>
174174
<gl-sprintf :message="$options.i18n.setupText">
175175
<template #code="{ content }">

app/assets/javascripts/packages_and_registries/package_registry/components/details/npm_installation.vue

+15-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { GlLink, GlSprintf, GlFormRadioGroup } from '@gitlab/ui';
33
import { s__ } from '~/locale';
44
5-
import InstallationTitle from '~/packages_and_registries/package_registry/components/details/installation_title.vue';
5+
import InstallationMethod from '~/packages_and_registries/package_registry/components/details/installation_method.vue';
66
import {
77
TRACKING_ACTION_COPY_NPM_INSTALL_COMMAND,
88
TRACKING_ACTION_COPY_NPM_SETUP_COMMAND,
@@ -21,7 +21,7 @@ import CodeInstruction from '~/vue_shared/components/registry/code_instruction.v
2121
export default {
2222
name: 'NpmInstallation',
2323
components: {
24-
InstallationTitle,
24+
InstallationMethod,
2525
CodeInstruction,
2626
GlLink,
2727
GlSprintf,
@@ -81,7 +81,7 @@ export default {
8181
return `echo ${scope}:registry=${npmPathForEndpoint}/ >> .npmrc`;
8282
}
8383
84-
return `echo \\"${scope}:registry\\" \\"${npmPathForEndpoint}/\\" >> .yarnrc`;
84+
return `echo ${scope}:registry ${npmPathForEndpoint}/ >> .yarnrc`;
8585
},
8686
},
8787
packageManagers: {
@@ -98,11 +98,14 @@ export default {
9898
helpText: s__(
9999
'PackageRegistry|You may also need to setup authentication using an auth token. %{linkStart}See the documentation%{linkEnd} to find out more.',
100100
),
101+
npmInstallCommandLabel: s__('PackageRegistry|npm install command'),
102+
yarnInstallCommandLabel: s__('PackageRegistry|Yarn install command'),
103+
registrySetupCommand: s__('PackageRegistry|Registry setup command'),
101104
},
102105
links: { NPM_HELP_PATH },
103106
installOptions: [
104-
{ value: NPM_PACKAGE_MANAGER, label: s__('PackageRegistry|Show NPM commands') },
105-
{ value: YARN_PACKAGE_MANAGER, label: s__('PackageRegistry|Show Yarn commands') },
107+
{ value: NPM_PACKAGE_MANAGER, label: s__('PackageRegistry|npm') },
108+
{ value: YARN_PACKAGE_MANAGER, label: s__('PackageRegistry|Yarn') },
106109
],
107110
packageEndpointTypeOptions: [
108111
{ value: INSTANCE_PACKAGE_ENDPOINT_TYPE, text: s__('PackageRegistry|Instance-level') },
@@ -114,7 +117,7 @@ export default {
114117

115118
<template>
116119
<div>
117-
<installation-title
120+
<installation-method
118121
:package-type="$options.packageManagers.NPM_PACKAGE_MANAGER"
119122
:options="$options.installOptions"
120123
@change="instructionType = $event"
@@ -123,6 +126,7 @@ export default {
123126
<code-instruction
124127
v-if="showNpm"
125128
:instruction="npmCommand"
129+
:label="$options.i18n.npmInstallCommandLabel"
126130
:copy-text="s__('PackageRegistry|Copy npm command')"
127131
:tracking-action="$options.tracking.TRACKING_ACTION_COPY_NPM_INSTALL_COMMAND"
128132
:tracking-label="$options.tracking.TRACKING_LABEL_CODE_INSTRUCTION"
@@ -131,14 +135,16 @@ export default {
131135
<code-instruction
132136
v-else
133137
:instruction="yarnCommand"
138+
:label="$options.i18n.yarnInstallCommandLabel"
134139
:copy-text="s__('PackageRegistry|Copy yarn command')"
135140
:tracking-action="$options.tracking.TRACKING_ACTION_COPY_YARN_INSTALL_COMMAND"
136141
:tracking-label="$options.tracking.TRACKING_LABEL_CODE_INSTRUCTION"
137142
/>
138143

139-
<h3 class="gl-text-lg">{{ __('Registry setup') }}</h3>
144+
<h3 class="gl-heading-3 gl-mt-5">{{ s__('PackageRegistry|Registry setup') }}</h3>
140145

141146
<gl-form-radio-group
147+
class="gl-my-5"
142148
:options="$options.packageEndpointTypeOptions"
143149
:checked="packageEndpointType"
144150
@change="packageEndpointType = $event"
@@ -147,6 +153,7 @@ export default {
147153
<code-instruction
148154
v-if="showNpm"
149155
:instruction="npmSetup"
156+
:label="$options.i18n.registrySetupCommand"
150157
:copy-text="s__('PackageRegistry|Copy npm setup command')"
151158
:tracking-action="$options.tracking.TRACKING_ACTION_COPY_NPM_SETUP_COMMAND"
152159
:tracking-label="$options.tracking.TRACKING_LABEL_CODE_INSTRUCTION"
@@ -155,6 +162,7 @@ export default {
155162
<code-instruction
156163
v-else
157164
:instruction="yarnSetupCommand"
165+
:label="$options.i18n.registrySetupCommand"
158166
:copy-text="s__('PackageRegistry|Copy yarn setup command')"
159167
:tracking-action="$options.tracking.TRACKING_ACTION_COPY_YARN_SETUP_COMMAND"
160168
:tracking-label="$options.tracking.TRACKING_LABEL_CODE_INSTRUCTION"

0 commit comments

Comments
 (0)