From 4dc41ac252c0bfefb9bc55a8627262cc76c69d5e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 25 May 2022 15:08:05 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../list/components/issues_list_app.vue | 28 +++ app/assets/javascripts/issues/list/index.js | 4 + app/assets/javascripts/lib/graphql.js | 12 +- .../notes/components/diff_with_note.vue | 2 +- .../components/email_participants_warning.vue | 2 +- .../components/toggle_replies_widget.vue | 2 +- .../components/add_request.vue | 2 +- .../components/performance_bar_app.vue | 2 +- .../components/assignees/assignees.vue | 7 +- .../assignees/collapsed_assignee.vue | 2 +- .../assignees/collapsed_assignee_list.vue | 2 +- .../assignees/uncollapsed_assignee_list.vue | 2 +- .../reviewers/collapsed_reviewer.vue | 2 +- .../reviewers/collapsed_reviewer_list.vue | 2 +- app/assets/javascripts/sidebar/graphql.js | 8 +- app/assets/javascripts/single_file_diff.js | 2 +- .../filtered_search_bar/constants.js | 16 +- .../show/components/issuable_body.vue | 5 - .../show/components/issuable_header.vue | 11 +- .../show/components/issuable_show_root.vue | 7 - .../show/components/issuable_title.vue | 10 +- .../components/work_item_assignees.vue | 42 +++++ .../components/work_item_detail.vue | 16 +- .../javascripts/work_items/constants.js | 2 + .../work_items/graphql/provider.js | 48 ++++- .../work_items/graphql/typedefs.graphql | 16 ++ .../graphql/work_item.query.graphql | 12 ++ app/assets/stylesheets/framework.scss | 1 - app/assets/stylesheets/framework/buttons.scss | 19 -- .../stylesheets/framework/issue_box.scss | 40 ----- app/assets/stylesheets/pages/issuable.scss | 11 ++ app/controllers/projects/issues_controller.rb | 1 + .../projects/work_items_controller.rb | 1 + app/controllers/projects_controller.rb | 1 + app/graphql/types/ci/runner_type.rb | 6 + app/helpers/issues_helper.rb | 14 +- app/helpers/todos_helper.rb | 25 +-- .../packages/go/create_package_service.rb | 3 +- .../ci_owned_runners_cross_joins_fix.yml | 2 +- .../ci_owned_runners_unnest_index.yml | 2 +- ...descending.yml => work_item_assignees.yml} | 10 +- config/sidekiq_queues.yml | 2 - ...x_for_project_namespace_member_backfill.rb | 2 +- ...le_backfill_project_member_namespace_id.rb | 4 +- doc/api/graphql/audit_report.md | 2 +- doc/api/graphql/custom_emoji.md | 2 +- doc/api/graphql/reference/index.md | 1 + doc/api/graphql/users_example.md | 2 +- doc/development/changelog.md | 2 +- .../database/loose_foreign_keys.md | 2 +- doc/development/distributed_tracing.md | 2 +- .../documentation/site_architecture/index.md | 10 +- .../experiment_guide/testing_experiments.md | 2 +- doc/development/export_csv.md | 2 +- doc/development/fe_guide/frontend_faq.md | 8 +- .../fe_guide/registry_architecture.md | 2 +- doc/development/snowplow/infrastructure.md | 2 +- doc/install/aws/manual_install_aws.md | 164 +++++++++--------- doc/integration/bitbucket.md | 2 +- doc/integration/facebook.md | 2 +- doc/integration/google.md | 4 +- doc/integration/salesforce.md | 8 +- doc/integration/saml.md | 6 +- doc/integration/twitter.md | 2 +- doc/integration/vault.md | 6 +- doc/subscriptions/gitlab_com/index.md | 4 +- doc/user/clusters/agent/vulnerabilities.md | 5 +- doc/user/packages/generic_packages/index.md | 8 + locale/gitlab.pot | 9 +- ...ce_with_forward_pipeline_variables_spec.rb | 32 ++-- .../variable_inheritance_shared_context.rb | 30 +--- spec/features/milestone_spec.rb | 8 +- .../list/components/issues_list_app_spec.js | 29 +++- .../show/components/issuable_body_spec.js | 1 - .../components/issuable_show_root_spec.js | 3 - .../show/components/issuable_title_spec.js | 3 - .../vue_shared/issuable/show/mock_data.js | 1 - .../components/work_item_assignees_spec.js | 42 +++++ .../work_items/pages/work_item_detail_spec.js | 53 +++++- spec/graphql/types/ci/runner_type_spec.rb | 2 +- spec/helpers/issues_helper_spec.rb | 84 +++++++++ spec/helpers/todos_helper_spec.rb | 16 +- spec/requests/api/graphql/ci/runner_spec.rb | 4 +- .../go/create_package_service_spec.rb | 16 ++ spec/workers/every_sidekiq_worker_spec.rb | 1 - 85 files changed, 666 insertions(+), 328 deletions(-) create mode 100644 app/assets/javascripts/work_items/components/work_item_assignees.vue create mode 100644 app/assets/javascripts/work_items/graphql/typedefs.graphql delete mode 100644 app/assets/stylesheets/framework/issue_box.scss rename config/feature_flags/development/{ci_show_all_projects_with_usage_sorted_descending.yml => work_item_assignees.yml} (57%) create mode 100644 spec/frontend/work_items/components/work_item_assignees_spec.js diff --git a/app/assets/javascripts/issues/list/components/issues_list_app.vue b/app/assets/javascripts/issues/list/components/issues_list_app.vue index 2da6a049703..e5c557ce769 100644 --- a/app/assets/javascripts/issues/list/components/issues_list_app.vue +++ b/app/assets/javascripts/issues/list/components/issues_list_app.vue @@ -30,9 +30,11 @@ import { TOKEN_TITLE_ASSIGNEE, TOKEN_TITLE_AUTHOR, TOKEN_TITLE_CONFIDENTIAL, + TOKEN_TITLE_CONTACT, TOKEN_TITLE_LABEL, TOKEN_TITLE_MILESTONE, TOKEN_TITLE_MY_REACTION, + TOKEN_TITLE_ORGANIZATION, TOKEN_TITLE_RELEASE, TOKEN_TITLE_TYPE, } from '~/vue_shared/components/filtered_search_bar/constants'; @@ -54,9 +56,11 @@ import { TOKEN_TYPE_ASSIGNEE, TOKEN_TYPE_AUTHOR, TOKEN_TYPE_CONFIDENTIAL, + TOKEN_TYPE_CONTACT, TOKEN_TYPE_LABEL, TOKEN_TYPE_MILESTONE, TOKEN_TYPE_MY_REACTION, + TOKEN_TYPE_ORGANIZATION, TOKEN_TYPE_RELEASE, TOKEN_TYPE_TYPE, UPDATED_DESC, @@ -113,6 +117,8 @@ export default { 'autocompleteAwardEmojisPath', 'calendarPath', 'canBulkUpdate', + 'canReadCrmContact', + 'canReadCrmOrganization', 'emptyStateSvgPath', 'exportCsvPath', 'fullPath', @@ -360,6 +366,28 @@ export default { }); } + if (this.canReadCrmContact) { + tokens.push({ + type: TOKEN_TYPE_CONTACT, + title: TOKEN_TITLE_CONTACT, + icon: 'user', + token: GlFilteredSearchToken, + operators: OPERATOR_IS_ONLY, + unique: true, + }); + } + + if (this.canReadCrmOrganization) { + tokens.push({ + type: TOKEN_TYPE_ORGANIZATION, + title: TOKEN_TITLE_ORGANIZATION, + icon: 'users', + token: GlFilteredSearchToken, + operators: OPERATOR_IS_ONLY, + unique: true, + }); + } + if (this.eeSearchTokens.length) { tokens.push(...this.eeSearchTokens); } diff --git a/app/assets/javascripts/issues/list/index.js b/app/assets/javascripts/issues/list/index.js index f5cb160e344..7cfd8badf48 100644 --- a/app/assets/javascripts/issues/list/index.js +++ b/app/assets/javascripts/issues/list/index.js @@ -82,6 +82,8 @@ export function mountIssuesListApp() { canBulkUpdate, canEdit, canImportIssues, + canReadCrmContact, + canReadCrmOrganization, email, emailsHelpPagePath, emptyStateSvgPath, @@ -131,6 +133,8 @@ export function mountIssuesListApp() { autocompleteAwardEmojisPath, calendarPath, canBulkUpdate: parseBoolean(canBulkUpdate), + canReadCrmContact: parseBoolean(canReadCrmContact), + canReadCrmOrganization: parseBoolean(canReadCrmOrganization), emptyStateSvgPath, fullPath, groupPath, diff --git a/app/assets/javascripts/lib/graphql.js b/app/assets/javascripts/lib/graphql.js index 451950346b0..4ad979be6e6 100644 --- a/app/assets/javascripts/lib/graphql.js +++ b/app/assets/javascripts/lib/graphql.js @@ -105,7 +105,7 @@ export default (resolvers = {}, config = {}) => { const { baseUrl, batchMax = 10, - cacheConfig, + cacheConfig = { typePolicies: {}, possibleTypes: {} }, fetchPolicy = fetchPolicies.CACHE_FIRST, typeDefs, path = '/api/graphql', @@ -221,9 +221,15 @@ export default (resolvers = {}, config = {}) => { typeDefs, link: appLink, cache: new InMemoryCache({ - typePolicies, - possibleTypes, ...cacheConfig, + typePolicies: { + ...typePolicies, + ...cacheConfig.typePolicies, + }, + possibleTypes: { + ...possibleTypes, + ...cacheConfig.possibleTypes, + }, }), resolvers, defaultOptions: { diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue index e2b0c7fee32..ec2095c91f2 100644 --- a/app/assets/javascripts/notes/components/diff_with_note.vue +++ b/app/assets/javascripts/notes/components/diff_with_note.vue @@ -107,7 +107,7 @@ export default { {{ __('Unable to load the diff') }}