From 9970b0622407cf99c700eb7532187536b95e888d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 21 Aug 2024 03:07:35 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab/issue_templates/SHA256 Bug.md | 15 +++ .../components/more_actions_dropdown.vue | 8 +- .../milestones/init_more_actions_dropdown.js | 2 + .../javascripts/organizations/mock_data.js | 10 -- .../components/organization_switcher.vue | 7 +- .../stylesheets/framework/super_sidebar.scss | 15 +-- .../stylesheets/page_bundles/milestone.scss | 3 +- .../pajamas/progress_component.html.haml | 2 +- app/helpers/timeboxes_helper.rb | 10 +- .../dashboard/milestones/_milestone.html.haml | 3 +- .../shared/milestones/_milestone.html.haml | 119 +++++++++--------- ...231742_update_weight_widget_definitions.rb | 9 +- ...rm_contacts_widget_from_work_item_types.rb | 2 + ...302_change_epics_hierarchy_restrictions.rb | 2 + ...ss_hierarchy_for_hierarchy_restrictions.rb | 2 + ...rchy_restriction_subepics_maximum_depth.rb | 2 + ...1_add_work_item_types_name_unique_index.rb | 20 +++ ...14209_drop_work_item_types_namespace_id.rb | 31 +++++ db/schema_migrations/20240814213901 | 1 + db/schema_migrations/20240814214209 | 1 + db/structure.sql | 10 +- doc/tutorials/compliance_pipeline/index.md | 15 +-- .../fix_synced_epic_work_item_parent_links.rb | 2 +- .../work_items/base_type_importer.rb | 2 +- lib/gitlab/gon_helper.rb | 18 +++ locale/gitlab.pot | 14 +-- spec/features/dashboard/milestones_spec.rb | 3 +- spec/features/groups/milestone_spec.rb | 30 +---- .../groups/milestones_sorting_spec.rb | 4 +- .../milestones/user_views_milestones_spec.rb | 42 +------ .../milestones/milestones_sorting_spec.rb | 4 +- .../components/more_actions_dropdown_spec.js | 1 + spec/frontend/organizations/mock_data.js | 7 ++ .../components/organization_switcher_spec.js | 10 +- spec/helpers/timeboxes_helper_spec.rb | 18 ++- ...loose_index_scan_batching_strategy_spec.rb | 2 +- spec/lib/gitlab/gon_helper_spec.rb | 38 ++++++ ...s_note_id_to_bigint_for_self_hosts_spec.rb | 2 +- spec/models/work_items/type_spec.rb | 2 +- 39 files changed, 302 insertions(+), 186 deletions(-) create mode 100644 .gitlab/issue_templates/SHA256 Bug.md delete mode 100644 app/assets/javascripts/organizations/mock_data.js create mode 100644 db/post_migrate/20240814213901_add_work_item_types_name_unique_index.rb create mode 100644 db/post_migrate/20240814214209_drop_work_item_types_namespace_id.rb create mode 100644 db/schema_migrations/20240814213901 create mode 100644 db/schema_migrations/20240814214209 diff --git a/.gitlab/issue_templates/SHA256 Bug.md b/.gitlab/issue_templates/SHA256 Bug.md new file mode 100644 index 00000000000..55771122ace --- /dev/null +++ b/.gitlab/issue_templates/SHA256 Bug.md @@ -0,0 +1,15 @@ +/title SHA256 Bug + +### SHA256 Bug Summary + + + +### Steps to reproduce + + + +### Example project + + diff --git a/app/assets/javascripts/milestones/components/more_actions_dropdown.vue b/app/assets/javascripts/milestones/components/more_actions_dropdown.vue index 0a1b8afa162..c2ea3d30500 100644 --- a/app/assets/javascripts/milestones/components/more_actions_dropdown.vue +++ b/app/assets/javascripts/milestones/components/more_actions_dropdown.vue @@ -39,6 +39,7 @@ export default { 'groupName', 'issueCount', 'mergeRequestCount', + 'size', ], data() { return { @@ -49,6 +50,9 @@ export default { }; }, computed: { + widthClasses() { + return this.size === 'small' ? 'gl-min-w-6' : 'gl-min-w-7'; + }, hasUrl() { return this.editUrl || this.closeUrl || this.reopenUrl || this.promoteUrl; }, @@ -169,7 +173,9 @@ export default { no-caret :toggle-text="$options.i18n.actionsLabel" text-sr-only - class="gl-relative gl-w-full gl-sm-w-auto gl-min-w-7" + class="gl-relative gl-w-full sm:gl-w-auto" + :class="widthClasses" + :size="size" :data-testid="showTestIdIfNotDetailPage" @shown="showDropdown" @hidden="hideDropdown" diff --git a/app/assets/javascripts/milestones/init_more_actions_dropdown.js b/app/assets/javascripts/milestones/init_more_actions_dropdown.js index ce3ac6544f8..5d91e535b3f 100644 --- a/app/assets/javascripts/milestones/init_more_actions_dropdown.js +++ b/app/assets/javascripts/milestones/init_more_actions_dropdown.js @@ -25,6 +25,7 @@ export default function InitMoreActionsDropdown() { groupName, issueCount, mergeRequestCount, + size, } = el.dataset; return new Vue({ @@ -45,6 +46,7 @@ export default function InitMoreActionsDropdown() { groupName, issueCount: Number(issueCount), mergeRequestCount: Number(mergeRequestCount), + size: size || 'medium', }, render: (createElement) => createElement(MoreActionsDropdown), }); diff --git a/app/assets/javascripts/organizations/mock_data.js b/app/assets/javascripts/organizations/mock_data.js deleted file mode 100644 index b9759055d7d..00000000000 --- a/app/assets/javascripts/organizations/mock_data.js +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-disable @gitlab/require-i18n-strings */ - -// This is temporary mock data that will be removed when completing https://gitlab.com/gitlab-org/gitlab/-/issues/454935 - -export const defaultOrganization = { - id: 1, - name: 'Default', - web_url: '/-/organizations/default', - avatar_url: null, -}; diff --git a/app/assets/javascripts/super_sidebar/components/organization_switcher.vue b/app/assets/javascripts/super_sidebar/components/organization_switcher.vue index 2aed46b988f..b057bdf4d44 100644 --- a/app/assets/javascripts/super_sidebar/components/organization_switcher.vue +++ b/app/assets/javascripts/super_sidebar/components/organization_switcher.vue @@ -3,7 +3,6 @@ import { GlDisclosureDropdown, GlAvatar, GlIcon, GlLoadingIcon, GlLink } from '@ import getCurrentUserOrganizations from '~/organizations/shared/graphql/queries/organizations.query.graphql'; import { AVATAR_SHAPE_OPTION_RECT } from '~/vue_shared/constants'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; -import { defaultOrganization } from '~/organizations/mock_data'; import { s__, __ } from '~/locale'; import { helpPagePath } from '~/helpers/help_page_helper'; @@ -67,9 +66,7 @@ export default { return this.$apollo.queries.organizations.loading; }, currentOrganization() { - // TODO - use `gon.current_organization` when backend supports it. - // https://gitlab.com/gitlab-org/gitlab/-/issues/437095 - return defaultOrganization; + return window.gon.current_organization; }, nodes() { return this.organizations.nodes || []; @@ -135,7 +132,7 @@ export default {