From a03d45be0074198f05eee941087e13cf18ea7cbd Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 May 2024 18:17:26 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .rubocop_todo/layout/argument_alignment.yml | 26 -------- .../layout/space_in_lambda_literal.yml | 15 ----- .../components/toolbar_table_button.vue | 9 ++- .../wikis/components/delete_wiki_modal.vue | 31 ++++++++- .../shared/wikis/components/wiki_form.vue | 5 +- .../wikis/components/wiki_more_dropdown.vue | 63 ++++++++++--------- .../javascripts/pages/shared/wikis/show.js | 16 +++-- app/assets/stylesheets/framework/filters.scss | 5 ++ .../work_items/parent_links/create_service.rb | 7 +++ .../parent_links/destroy_service.rb | 9 +++ app/views/shared/wikis/show.html.haml | 8 ++- doc/ci/runners/new_creation_workflow.md | 2 + doc/development/documentation/versions.md | 11 +++- doc/development/documentation/workflow.md | 4 +- lib/api/entities/user_basic.rb | 2 +- lib/api/environments.rb | 8 +-- lib/api/error_tracking/client_keys.rb | 2 +- lib/api/error_tracking/project_settings.rb | 2 +- lib/api/events.rb | 4 +- lib/api/feature_flags.rb | 6 +- lib/api/files.rb | 46 +++++++------- lib/api/go_proxy.rb | 2 +- lib/api/group_container_repositories.rb | 2 +- lib/api/group_labels.rb | 46 +++++++------- lib/api/group_packages.rb | 42 ++++++------- lib/api/groups.rb | 24 +++---- lib/api/helm_packages.rb | 4 +- .../14_analytics/performance_bar_spec.rb | 4 ++ .../components/toolbar_table_button_spec.js | 47 +++++++++++--- .../shared/wikis/components/wiki_form_spec.js | 3 +- .../components/wiki_more_dropdown_spec.js | 25 ++++++++ .../parent_links/create_service_spec.rb | 10 +++ .../parent_links/destroy_service_spec.rb | 4 ++ .../work_items/update_service_spec.rb | 2 + .../user_creates_wiki_page_shared_examples.rb | 9 ++- .../user_updates_wiki_page_shared_examples.rb | 9 ++- .../user_views_wiki_empty_shared_examples.rb | 2 +- .../update_service_shared_examples.rb | 8 ++- 38 files changed, 331 insertions(+), 193 deletions(-) diff --git a/.rubocop_todo/layout/argument_alignment.yml b/.rubocop_todo/layout/argument_alignment.yml index 9bc9095a6c7..ac2dcf75942 100644 --- a/.rubocop_todo/layout/argument_alignment.yml +++ b/.rubocop_todo/layout/argument_alignment.yml @@ -115,19 +115,6 @@ Layout/ArgumentAlignment: - 'ee/app/graphql/types/work_items/widgets/iteration_input_type.rb' - 'ee/app/graphql/types/work_items/widgets/iteration_type.rb' - 'ee/app/graphql/types/work_items/widgets/progress_input_type.rb' - - 'ee/app/graphql/types/work_items/widgets/requirement_legacy_filter_input_type.rb' - - 'ee/app/graphql/types/work_items/widgets/requirement_legacy_type.rb' - - 'ee/app/graphql/types/work_items/widgets/status_filter_input_type.rb' - - 'ee/app/graphql/types/work_items/widgets/status_input_type.rb' - - 'ee/app/graphql/types/work_items/widgets/weight_input_type.rb' - - 'ee/app/services/analytics/devops_adoption/enabled_namespaces/bulk_find_or_create_service.rb' - - 'ee/app/services/audit_events/streaming/event_type_filters/destroy_service.rb' - - 'ee/app/services/auto_merge/merge_train_service.rb' - - 'ee/app/services/dashboard/projects/create_service.rb' - - 'ee/app/services/dora/aggregate_metrics_service.rb' - - 'ee/app/services/ee/applications/create_service.rb' - - 'ee/app/services/ee/boards/issues/list_service.rb' - - 'ee/app/services/ee/issues/base_service.rb' - 'ee/app/services/ee/issues/clone_service.rb' - 'ee/app/services/ee/issues/move_service.rb' - 'ee/app/services/ee/keys/create_service.rb' @@ -336,19 +323,6 @@ Layout/ArgumentAlignment: - 'lib/api/entities/pull_mirror.rb' - 'lib/api/entities/release.rb' - 'lib/api/entities/resource_access_token.rb' - - 'lib/api/entities/user_basic.rb' - - 'lib/api/environments.rb' - - 'lib/api/error_tracking/client_keys.rb' - - 'lib/api/error_tracking/project_settings.rb' - - 'lib/api/events.rb' - - 'lib/api/feature_flags.rb' - - 'lib/api/files.rb' - - 'lib/api/go_proxy.rb' - - 'lib/api/group_container_repositories.rb' - - 'lib/api/group_labels.rb' - - 'lib/api/group_packages.rb' - - 'lib/api/groups.rb' - - 'lib/api/helm_packages.rb' - 'lib/api/helpers.rb' - 'lib/api/helpers/custom_attributes.rb' - 'lib/api/helpers/events_helpers.rb' diff --git a/.rubocop_todo/layout/space_in_lambda_literal.yml b/.rubocop_todo/layout/space_in_lambda_literal.yml index 85534c6eacd..0384b81adfb 100644 --- a/.rubocop_todo/layout/space_in_lambda_literal.yml +++ b/.rubocop_todo/layout/space_in_lambda_literal.yml @@ -143,21 +143,6 @@ Layout/SpaceInLambdaLiteral: - 'ee/app/serializers/vulnerabilities/feedback_entity.rb' - 'ee/app/serializers/vulnerabilities/finding_entity.rb' - 'ee/app/serializers/vulnerability_note_entity.rb' - - 'ee/lib/ee/api/entities/ci/job_request/response.rb' - - 'ee/lib/ee/api/entities/epic.rb' - - 'ee/lib/ee/api/entities/issue.rb' - - 'ee/lib/ee/api/entities/list.rb' - - 'ee/lib/ee/api/entities/member.rb' - - 'ee/lib/ee/api/entities/project_approval_rule.rb' - - 'ee/lib/ee/api/entities/vulnerability_issue_link.rb' - - 'ee/lib/ee/gitlab/background_migration/backfill_epic_cache_counts.rb' - - 'ee/lib/ee/gitlab/background_migration/delete_approval_rules_with_vulnerability.rb' - - 'ee/lib/ee/gitlab/background_migration/migrate_shared_vulnerability_scanners.rb' - - 'ee/lib/ee/gitlab/background_migration/populate_approval_merge_request_rules_with_security_orchestration.rb' - - 'ee/lib/ee/gitlab/background_migration/populate_approval_project_rules_with_security_orchestration.rb' - - 'ee/lib/ee/gitlab/background_migration/populate_resolved_on_default_branch_column.rb' - - 'ee/lib/ee/gitlab/ci/config/entry/need.rb' - - 'ee/lib/ee/gitlab/event_store.rb' - 'lib/atlassian/jira_connect/serializers/author_entity.rb' - 'lib/bulk_imports/groups/transformers/group_attributes_transformer.rb' - 'lib/container_registry/base_client.rb' diff --git a/app/assets/javascripts/content_editor/components/toolbar_table_button.vue b/app/assets/javascripts/content_editor/components/toolbar_table_button.vue index a5ac560ad42..73c1e569b48 100644 --- a/app/assets/javascripts/content_editor/components/toolbar_table_button.vue +++ b/app/assets/javascripts/content_editor/components/toolbar_table_button.vue @@ -34,12 +34,14 @@ export default { setRowsAndCols(rows, cols) { this.rows = rows; this.cols = cols; - this.maxRows = clamp(rows + 1, MIN_ROWS, MAX_ROWS); - this.maxCols = clamp(cols + 1, MIN_COLS, MAX_COLS); + this.maxRows = clamp(rows + 1, this.maxRows, MAX_ROWS); + this.maxCols = clamp(cols + 1, this.maxCols, MAX_COLS); }, resetState() { this.rows = 1; this.cols = 1; + this.maxRows = MIN_ROWS; + this.maxCols = MIN_COLS; }, insertTable() { this.tiptapEditor @@ -74,6 +76,8 @@ export default { this.setRowsAndCols(rows, cols); }, setFocus(row, col) { + this.resetState(); + this.$refs[`table-${row}-${col}`][0].$el.focus(); }, }, @@ -97,6 +101,7 @@ export default { text-sr-only :fluid-width="true" @shown="setFocus(1, 1)" + @hidden="resetState" >
-import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui'; +import { GlButton, GlDisclosureDropdownItem, GlModal, GlModalDirective } from '@gitlab/ui'; import { escape } from 'lodash'; import { s__, __, sprintf } from '~/locale'; import { isTemplate } from '../utils'; @@ -8,11 +8,19 @@ export default { components: { GlModal, GlButton, + GlDisclosureDropdownItem, }, directives: { 'gl-modal': GlModalDirective, }, inject: ['deleteWikiUrl', 'pageTitle', 'csrfToken', 'pagePersisted'], + props: { + showAsDropdownItem: { + type: Boolean, + required: false, + default: false, + }, + }, computed: { isTemplate, title() { @@ -48,6 +56,19 @@ export default { cancelProps() { return { text: this.$options.i18n.cancelButtonText, + href: this.deleteWikiUrl, + extraAttrs: { + class: 'gl-text-red-500!', + }, + }; + }, + listItem() { + return { + text: this.deleteTemplateText, + extraAttrs: { + class: 'gl-text-red-500!', + 'data-testid': 'page-delete-button', + }, }; }, }, @@ -73,8 +94,14 @@ export default {