From 5150ecc452f4cf1c899f79d35d52af978ff2d43f Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 17 Oct 2022 18:09:13 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/assets/javascripts/editor/schema/ci.json | 7 +++ .../javascripts/header_search/components/app.vue | 19 +++++- app/assets/javascripts/listbox/index.js | 70 ++++++---------------- .../javascripts/nav/components/top_nav_app.vue | 10 ++++ app/assets/javascripts/pdf/index.vue | 17 +++--- .../runner/admin_runners/admin_runners_app.vue | 18 +----- .../components/runner_bulk_delete_checkbox.vue | 11 ++-- .../runner/components/runner_details.vue | 7 +-- .../javascripts/runner/components/runner_list.vue | 24 ++++++-- .../javascripts/runner/graphql/list/local_state.js | 18 +++--- .../runner/group_runners/group_runners_app.vue | 9 ++- .../javascripts/runner/group_runners/index.js | 6 +- .../work_items/components/work_item_detail.vue | 63 ++++++++++++------- .../work_items/components/work_item_links/index.js | 10 +++- .../components/work_item_links/work_item_links.vue | 8 ++- .../work_item_links/work_item_links_form.vue | 30 +++++++++- app/assets/javascripts/work_items/constants.js | 6 ++ .../graphql/get_issue_details.query.graphql | 9 +++ app/assets/javascripts/work_items/index.js | 10 +++- .../stylesheets/page_bundles/work_items.scss | 20 +++++++ app/controllers/admin/runners_controller.rb | 4 -- app/controllers/groups/runners_controller.rb | 4 -- app/models/ci/pipeline.rb | 9 +++ app/models/ci/runner.rb | 6 +- app/models/hooks/web_hook.rb | 2 +- .../_account_and_limit.html.haml | 6 +- .../admin/application_settings/_ci_cd.html.haml | 3 +- .../_performance_bar.html.haml | 2 +- .../ci/variables/_url_query_variable_row.html.haml | 4 +- app/views/ci/variables/_variable_row.html.haml | 6 +- app/views/clusters/clusters/_health.html.haml | 2 +- app/views/clusters/clusters/user/_form.html.haml | 2 +- app/views/layouts/header/_default.html.haml | 2 +- app/views/layouts/nav/sidebar/_admin.html.haml | 32 +++++----- app/views/layouts/terms.html.haml | 2 +- .../projects/blob/_template_selectors.html.haml | 12 ++-- app/views/projects/buttons/_clone.html.haml | 8 +-- .../projects/issues/_work_item_links.html.haml | 2 +- app/views/shared/_clone_panel.html.haml | 4 +- app/views/shared/web_hooks/_hook_errors.html.haml | 12 ++-- 40 files changed, 298 insertions(+), 198 deletions(-) create mode 100644 app/assets/javascripts/work_items/graphql/get_issue_details.query.graphql (limited to 'app') diff --git a/app/assets/javascripts/editor/schema/ci.json b/app/assets/javascripts/editor/schema/ci.json index cd99e6ef64f..e56932a9a31 100644 --- a/app/assets/javascripts/editor/schema/ci.json +++ b/app/assets/javascripts/editor/schema/ci.json @@ -103,6 +103,7 @@ "workflow": { "type": "object", "properties": { + "name": { "$ref": "#/definitions/workflowName" }, "rules": { "type": "array", "items": { @@ -714,6 +715,12 @@ ] } }, + "workflowName": { + "type": "string", + "markdownDescription": "Defines the pipeline name. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#workflowname).", + "minLength": 1, + "maxLength": 255 + }, "globalVariables": { "markdownDescription": "Defines default variables for all jobs. Job level property overrides global variables. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#variables).", "type": "object", diff --git a/app/assets/javascripts/header_search/components/app.vue b/app/assets/javascripts/header_search/components/app.vue index f4b939fb20f..8fc0ce48e61 100644 --- a/app/assets/javascripts/header_search/components/app.vue +++ b/app/assets/javascripts/header_search/components/app.vue @@ -14,6 +14,7 @@ import { visitUrl } from '~/lib/utils/url_utility'; import { truncate } from '~/lib/utils/text_utility'; import { DEFAULT_DEBOUNCE_AND_THROTTLE_MS } from '~/lib/utils/constants'; import { s__, sprintf } from '~/locale'; +import Tracking from '~/tracking'; import DropdownKeyboardNavigation from '~/vue_shared/components/dropdown_keyboard_navigation.vue'; import { FIRST_DROPDOWN_INDEX, @@ -163,8 +164,17 @@ export default { ...mapActions(['setSearch', 'fetchAutocompleteOptions', 'clearAutocomplete']), openDropdown() { this.showDropdown = true; - this.isFocused = true; - this.$emit('expandSearchBar', true); + + // check isFocused state to avoid firing duplicate events + if (!this.isFocused) { + this.isFocused = true; + this.$emit('expandSearchBar', true); + + Tracking.event(undefined, 'focus_input', { + label: 'global_search', + property: 'top_navigation', + }); + } }, closeDropdown() { this.showDropdown = false; @@ -178,6 +188,11 @@ export default { this.showDropdown = false; this.isFocused = false; this.$emit('collapseSearchBar'); + + Tracking.event(undefined, 'blur_input', { + label: 'global_search', + property: 'top_navigation', + }); }, 200); }, submitSearch() { diff --git a/app/assets/javascripts/listbox/index.js b/app/assets/javascripts/listbox/index.js index 2eeb0a77032..7eacbf7fcdd 100644 --- a/app/assets/javascripts/listbox/index.js +++ b/app/assets/javascripts/listbox/index.js @@ -1,4 +1,4 @@ -import { GlDropdown, GlDropdownItem, GlListbox } from '@gitlab/ui'; +import { GlListbox } from '@gitlab/ui'; import Vue from 'vue'; import { parseBoolean } from '~/lib/utils/common_utils'; @@ -31,59 +31,25 @@ export function initListbox(el, { onChange } = {}) { }, }, render(h) { - if (gon.features?.glListboxForSortDropdowns) { - return h(GlListbox, { - props: { - items, - right, - selected: this.selected, - toggleText: this.text, - }, - class: className, - on: { - select: (selectedValue) => { - this.selected = selectedValue; - const selectedItem = items.find(({ value }) => value === selectedValue); - - if (typeof onChange === 'function') { - onChange(selectedItem); - } - }, - }, - }); - } - - return h( - GlDropdown, - { - props: { - text: this.text, - right, + return h(GlListbox, { + props: { + items, + right, + selected: this.selected, + toggleText: this.text, + }, + class: className, + on: { + select: (selectedValue) => { + this.selected = selectedValue; + const selectedItem = items.find(({ value }) => value === selectedValue); + + if (typeof onChange === 'function') { + onChange(selectedItem); + } }, - class: className, }, - items.map((item) => - h( - GlDropdownItem, - { - props: { - isCheckItem: true, - isChecked: this.selected === item.value, - }, - on: { - click: () => { - this.selected = item.value; - - if (typeof onChange === 'function') { - onChange(item); - } - }, - }, - }, - item.text, - ), - ), - ); + }); }, }); } diff --git a/app/assets/javascripts/nav/components/top_nav_app.vue b/app/assets/javascripts/nav/components/top_nav_app.vue index ca6e6567f74..e55bf25a60c 100644 --- a/app/assets/javascripts/nav/components/top_nav_app.vue +++ b/app/assets/javascripts/nav/components/top_nav_app.vue @@ -1,5 +1,6 @@ @@ -32,6 +41,7 @@ export default { toggle-class="top-nav-toggle js-top-nav-dropdown-toggle gl-px-3!" no-flip no-caret + @toggle="trackToggleEvent" >