From 85f1126ea6f09296e4e5106d7d8319e93aeedf3c Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 18 Jan 2024 15:09:51 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../crm/contacts/components/contacts_root.vue | 2 +- .../components/organizations_root.vue | 2 +- .../components/custom_metrics_form_fields.vue | 15 +- .../sidebar/components/label_filter/index.vue | 10 +- .../sidebar/components/assignees/assignees.vue | 10 +- .../components/assignees/collapsed_assignee.vue | 6 +- .../assignees/collapsed_assignee_list.vue | 7 +- .../super_sidebar/components/nav_item.vue | 5 +- config/sidekiq_queues.yml | 2 + config/webpack.config.js | 37 +- doc/ci/secrets/gcp_secret_manager.md | 9 +- .../merge_request_concepts/approval_rules.md | 14 + doc/development/migration_style_guide.md | 18 + doc/policy/maintenance.md | 2 + locale/gitlab.pot | 17 +- package.json | 6 +- spec/frontend/crm/contacts_root_spec.js | 46 +- spec/frontend/crm/organizations_root_spec.js | 51 +-- .../search/sidebar/components/label_filter_spec.js | 13 +- spec/models/members/group_member_spec.rb | 7 +- yarn.lock | 472 +++++++-------------- 21 files changed, 300 insertions(+), 451 deletions(-) diff --git a/app/assets/javascripts/crm/contacts/components/contacts_root.vue b/app/assets/javascripts/crm/contacts/components/contacts_root.vue index f10565e98e5..90a8701cea6 100644 --- a/app/assets/javascripts/crm/contacts/components/contacts_root.vue +++ b/app/assets/javascripts/crm/contacts/components/contacts_root.vue @@ -80,7 +80,7 @@ export default { }, tbodyTrClass() { return { - [bodyTrClass]: !this.loading && !this.isEmpty, + [bodyTrClass]: !this.isLoading && !this.isEmpty, }; }, }, diff --git a/app/assets/javascripts/crm/organizations/components/organizations_root.vue b/app/assets/javascripts/crm/organizations/components/organizations_root.vue index 78e1433ab24..2fdb366c6d2 100644 --- a/app/assets/javascripts/crm/organizations/components/organizations_root.vue +++ b/app/assets/javascripts/crm/organizations/components/organizations_root.vue @@ -80,7 +80,7 @@ export default { }, tbodyTrClass() { return { - [bodyTrClass]: !this.loading && !this.isEmpty, + [bodyTrClass]: !this.isLoading && !this.isEmpty, }; }, }, diff --git a/app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue b/app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue index 9811a0774e1..a073e822bb9 100644 --- a/app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue +++ b/app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue @@ -81,6 +81,7 @@ export default { queryValidateInFlight: false, ...this.formData, group, + errorMessage: '', }; }, computed: { @@ -107,7 +108,7 @@ export default { }, beforeMount() { if (this.metricPersisted) { - this.validateQuery(); + this.validateQuery(this.query); } }, methods: { @@ -129,8 +130,8 @@ export default { this.queryValidateInFlight = inFlight; this.errorMessage = message; }, - validateQuery() { - if (!this.query) { + validateQuery(query) { + if (!query) { this.setFormState(null, false, ''); return; } @@ -143,7 +144,7 @@ export default { // if a single token is used it can cancel existing requests // as well. cancelTokenSource = axiosCancelToken.source(); - this.requestValidation(this.query, cancelTokenSource.token) + this.requestValidation(query, cancelTokenSource.token) .then((res) => { const response = res.data; const { valid, error } = response.query; @@ -161,8 +162,8 @@ export default { ); }); }, - debouncedValidateQuery: debounce(function checkQuery() { - this.validateQuery(); + debouncedValidateQuery: debounce(function checkQuery(query) { + this.validateQuery(query); }, 500), }, csrfToken: csrf.token || '', @@ -213,7 +214,7 @@ export default { :placeholder="s__('Metrics|e.g. rate(http_requests_total[5m])')" required :state="queryIsValid" - @input="debouncedValidateQuery" + @input="debouncedValidateQuery($event)" /> diff --git a/app/assets/javascripts/search/sidebar/components/label_filter/index.vue b/app/assets/javascripts/search/sidebar/components/label_filter/index.vue index 106093b5ad1..0e181359f7d 100644 --- a/app/assets/javascripts/search/sidebar/components/label_filter/index.vue +++ b/app/assets/javascripts/search/sidebar/components/label_filter/index.vue @@ -15,6 +15,7 @@ import { mapActions, mapState, mapGetters } from 'vuex'; import { uniq } from 'lodash'; import { rgbFromHex } from '@gitlab/ui/dist/utils/utils'; import { slugify } from '~/lib/utils/text_utility'; +import { isLoggedIn } from '~/lib/utils/common_utils'; import { sprintf } from '~/locale'; import DropdownKeyboardNavigation from '~/vue_shared/components/dropdown_keyboard_navigation.vue'; @@ -51,6 +52,7 @@ export default { return { currentFocusIndex: SEARCH_BOX_INDEX, isFocused: false, + isLoggedIn: isLoggedIn(), }; }, i18n: I18N, @@ -72,17 +74,17 @@ export default { return this.$options.i18n.SEARCH_INPUT_DESCRIBE_BY_NO_DROPDOWN; }, dropdownResultsDescription() { - if (!this.showSearchDropdown) { + if (!('showSearchDropdown' in this)) { return ''; // This allows aria-live to see register an update when the dropdown is shown } - if (this.showDefaultItems) { + if ('showDefaultItems' in this) { return sprintf(this.$options.i18n.SEARCH_DESCRIBED_BY_DEFAULT, { count: this.filteredLabels.length, }); } - return this.loading + return 'loading' in this ? this.$options.i18n.SEARCH_RESULTS_LOADING : sprintf(this.$options.i18n.SEARCH_DESCRIBED_BY_UPDATED, { count: this.filteredLabels.length, @@ -97,7 +99,7 @@ export default { )}`; }, defaultIndex() { - if (this.showDefaultItems) { + if ('showDefaultItems' in this) { return SEARCH_BOX_INDEX; } return FIRST_DROPDOWN_INDEX; diff --git a/app/assets/javascripts/sidebar/components/assignees/assignees.vue b/app/assets/javascripts/sidebar/components/assignees/assignees.vue index 55c5b04dbe3..d522daf5080 100644 --- a/app/assets/javascripts/sidebar/components/assignees/assignees.vue +++ b/app/assets/javascripts/sidebar/components/assignees/assignees.vue @@ -1,5 +1,6 @@ diff --git a/app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue b/app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue index 8a912b00df1..447b47f0358 100644 --- a/app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue +++ b/app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue @@ -1,5 +1,5 @@