From 917d93d86da4dffd96abcfcf3aa83b0d6fa45286 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 22 Jan 2024 15:10:29 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .gitlab/ci/review-apps/main.gitlab-ci.yml | 2 +- app/assets/javascripts/persistent_user_callouts.js | 1 + ...work_item_sidebar_dropdown_widget_with_edit.vue | 71 ++- .../work_items/components/work_item_assignees.vue | 404 -------------- .../components/work_item_assignees_inline.vue | 404 ++++++++++++++ .../components/work_item_assignees_with_edit.vue | 292 ++++++++++ .../components/work_item_attributes_wrapper.vue | 42 +- .../components/work_item_milestone_with_edit.vue | 5 +- app/helpers/application_helper.rb | 2 +- app/models/users/callout.rb | 3 +- .../projects/_zero_authorized_projects.html.haml | 1 + app/views/layouts/devise_empty.html.haml | 5 +- app/views/layouts/minimal.html.haml | 1 + db/docs/analytics_dashboards_pointers.yml | 15 +- ...emove_ignored_columns_from_geo_node_statuses.rb | 34 ++ db/schema_migrations/20240118190758 | 1 + db/structure.sql | 12 - doc/api/graphql/reference/index.md | 1 + doc/ci/components/index.md | 9 + doc/subscriptions/self_managed/index.md | 1 - locale/gitlab.pot | 12 + .../features/projects/work_items/work_item_spec.rb | 95 +++- ..._item_sidebar_dropdown_widget_with_edit_spec.js | 43 +- .../components/work_item_assignees_inline_spec.js | 585 +++++++++++++++++++++ .../components/work_item_assignees_spec.js | 585 --------------------- .../work_item_assignees_with_edit_spec.js | 300 +++++++++++ .../work_item_attributes_wrapper_spec.js | 4 +- .../work_item_milestone_with_edit_spec.js | 2 +- spec/helpers/application_helper_spec.rb | 24 +- spec/lib/gitlab/auth/current_user_mode_spec.rb | 2 +- .../features/work_items_shared_examples.rb | 180 +++++-- 31 files changed, 2015 insertions(+), 1123 deletions(-) delete mode 100644 app/assets/javascripts/work_items/components/work_item_assignees.vue create mode 100644 app/assets/javascripts/work_items/components/work_item_assignees_inline.vue create mode 100644 app/assets/javascripts/work_items/components/work_item_assignees_with_edit.vue create mode 100644 db/post_migrate/20240118190758_remove_ignored_columns_from_geo_node_statuses.rb create mode 100644 db/schema_migrations/20240118190758 create mode 100644 spec/frontend/work_items/components/work_item_assignees_inline_spec.js delete mode 100644 spec/frontend/work_items/components/work_item_assignees_spec.js create mode 100644 spec/frontend/work_items/components/work_item_assignees_with_edit_spec.js diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml index a4d8d8672bb..42897cfc0a1 100644 --- a/.gitlab/ci/review-apps/main.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml @@ -67,7 +67,7 @@ review-build-cng: GITLAB_IMAGE_REPOSITORY: "registry.gitlab.com/gitlab-org/build/cng-mirror" GITLAB_IMAGE_SUFFIX: "ee" GITLAB_REVIEW_APP_BASE_CONFIG_FILE: "scripts/review_apps/base-config.yaml" - GITLAB_HELM_CHART_REF: "eace227d3465e17e37b1a2e3764dd244c8e2d716" # 7.6.1: https://gitlab.com/gitlab-org/charts/gitlab/-/commit/eace227d3465e17e37b1a2e3764dd244c8e2d716 + GITLAB_HELM_CHART_REF: "c91feed6983b24a1b0dbacaf5050ca5c59af3d46" # 7.8.0: https://gitlab.com/gitlab-org/charts/gitlab/-/commit/c91feed6983b24a1b0dbacaf5050ca5c59af3d46 environment: name: review/${CI_COMMIT_REF_SLUG}${SCHEDULE_TYPE} # No separator for SCHEDULE_TYPE so it's compatible as before and looks nice without it url: https://gitlab-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN} diff --git a/app/assets/javascripts/persistent_user_callouts.js b/app/assets/javascripts/persistent_user_callouts.js index 95ef04ceb30..90f2c11dddc 100644 --- a/app/assets/javascripts/persistent_user_callouts.js +++ b/app/assets/javascripts/persistent_user_callouts.js @@ -25,6 +25,7 @@ const PERSISTENT_USER_CALLOUTS = [ '.js-new-nav-for-everyone-callout', '.js-namespace-over-storage-users-combined-alert', '.js-code-suggestions-ga-alert', + '.js-joining-a-project-alert', ]; const initCallouts = () => { diff --git a/app/assets/javascripts/work_items/components/shared/work_item_sidebar_dropdown_widget_with_edit.vue b/app/assets/javascripts/work_items/components/shared/work_item_sidebar_dropdown_widget_with_edit.vue index d94d0494ad9..21512ba6066 100644 --- a/app/assets/javascripts/work_items/components/shared/work_item_sidebar_dropdown_widget_with_edit.vue +++ b/app/assets/javascripts/work_items/components/shared/work_item_sidebar_dropdown_widget_with_edit.vue @@ -39,7 +39,7 @@ export default { default: () => [], }, itemValue: { - type: Object, + type: [Array, String], required: false, default: null, }, @@ -68,30 +68,40 @@ export default { required: false, default: '', }, + multiSelect: { + type: Boolean, + required: false, + default: false, + }, + showFooter: { + type: Boolean, + required: false, + default: false, + }, + infiniteScroll: { + type: Boolean, + required: false, + default: false, + }, + infiniteScrollLoading: { + type: Boolean, + required: false, + default: false, + }, }, data() { return { isEditing: false, - localSelectedItem: this.itemValue?.id, + localSelectedItem: this.itemValue, }; }, computed: { hasValue() { - return this.itemValue != null || !isEmpty(this.item); - }, - listboxText() { - return ( - this.listItems.find(({ value }) => this.localSelectedItem === value)?.text || - this.itemValue?.title || - this.$options.i18n.none - ); + return this.multiSelect ? !isEmpty(this.itemValue) : this.itemValue !== null; }, inputId() { return `work-item-dropdown-listbox-value-${this.dropdownName}`; }, - toggleText() { - return this.toggleDropdownText || this.listboxText; - }, resetButton() { return this.resetButtonLabel || this.$options.i18n.resetButtonText; }, @@ -100,7 +110,7 @@ export default { itemValue: { handler(newVal) { if (!this.isEditing) { - this.localSelectedItem = newVal?.id; + this.localSelectedItem = newVal; } }, }, @@ -114,18 +124,25 @@ export default { }, handleItemClick(item) { this.localSelectedItem = item; - this.$emit('updateValue', item); + if (!this.multiSelect) { + this.$emit('updateValue', item); + } else { + this.$emit('updateSelected', this.localSelectedItem); + } }, onListboxShown() { this.$emit('dropdownShown'); }, onListboxHide() { this.isEditing = false; + if (this.multiSelect) { + this.$emit('updateValue', this.localSelectedItem); + } }, unassignValue() { - this.localSelectedItem = null; + this.localSelectedItem = this.multiSelect ? [] : null; this.isEditing = false; - this.$emit('updateValue', null); + this.$emit('updateValue', this.localSelectedItem); }, }, }; @@ -165,34 +182,42 @@ export default { + + {{ hasValue }} - - {{ listboxText }} - -
+ + {{ $options.i18n.none }} -
+ diff --git a/app/assets/javascripts/work_items/components/work_item_assignees.vue b/app/assets/javascripts/work_items/components/work_item_assignees.vue deleted file mode 100644 index a9aafbb3d84..00000000000 --- a/app/assets/javascripts/work_items/components/work_item_assignees.vue +++ /dev/null @@ -1,404 +0,0 @@ - - - diff --git a/app/assets/javascripts/work_items/components/work_item_assignees_inline.vue b/app/assets/javascripts/work_items/components/work_item_assignees_inline.vue new file mode 100644 index 00000000000..a9aafbb3d84 --- /dev/null +++ b/app/assets/javascripts/work_items/components/work_item_assignees_inline.vue @@ -0,0 +1,404 @@ + + + diff --git a/app/assets/javascripts/work_items/components/work_item_assignees_with_edit.vue b/app/assets/javascripts/work_items/components/work_item_assignees_with_edit.vue new file mode 100644 index 00000000000..bb7baed29f6 --- /dev/null +++ b/app/assets/javascripts/work_items/components/work_item_assignees_with_edit.vue @@ -0,0 +1,292 @@ + + + diff --git a/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue b/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue index 79f0fdca061..76f1938c3ed 100644 --- a/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue +++ b/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue @@ -15,7 +15,8 @@ import { WORK_ITEM_TYPE_VALUE_TASK, } from '../constants'; import WorkItemDueDate from './work_item_due_date.vue'; -import WorkItemAssignees from './work_item_assignees.vue'; +import WorkItemAssigneesInline from './work_item_assignees_inline.vue'; +import WorkItemAssigneesWithEdit from './work_item_assignees_with_edit.vue'; import WorkItemLabels from './work_item_labels.vue'; import WorkItemMilestoneInline from './work_item_milestone_inline.vue'; import WorkItemMilestoneWithEdit from './work_item_milestone_with_edit.vue'; @@ -27,7 +28,8 @@ export default { WorkItemLabels, WorkItemMilestoneInline, WorkItemMilestoneWithEdit, - WorkItemAssignees, + WorkItemAssigneesInline, + WorkItemAssigneesWithEdit, WorkItemDueDate, WorkItemParent, WorkItemParentInline, @@ -114,17 +116,31 @@ export default {