diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-11 15:09:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-11 15:09:43 +0300 |
commit | f20820d7faa4b0cc31d4b40be66f1aad5f8442bc (patch) | |
tree | 87dff45ebcf5b6cbb3db6c53185b08724e88d414 /app | |
parent | 289ce60cdc5fe83278ff01f9506db862e6f8e9ac (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
42 files changed, 94 insertions, 165 deletions
diff --git a/app/assets/javascripts/badges/components/badge.vue b/app/assets/javascripts/badges/components/badge.vue index 31531c90b94..1cd5854740e 100644 --- a/app/assets/javascripts/badges/components/badge.vue +++ b/app/assets/javascripts/badges/components/badge.vue @@ -80,7 +80,7 @@ export default { :href="linkUrl" target="_blank" rel="noopener noreferrer" - data-qa-selector="badge_image_link" + data-testid="badge-image-link" :data-qa-link-url="linkUrl" > <img diff --git a/app/assets/javascripts/badges/components/badge_list.vue b/app/assets/javascripts/badges/components/badge_list.vue index b69890572eb..12c9662b30d 100644 --- a/app/assets/javascripts/badges/components/badge_list.vue +++ b/app/assets/javascripts/badges/components/badge_list.vue @@ -100,7 +100,7 @@ export default { <template> <div> <gl-loading-icon v-show="isLoading" size="md" /> - <div data-qa-selector="badge_list_content"> + <div data-testid="badge-list-content"> <gl-table :empty-text="emptyMessage" :fields="fields" @@ -109,7 +109,7 @@ export default { :current-page="currentPage" stacked="md" show-empty - data-qa-selector="badge_list" + data-testid="badge-list" > <template #cell(name)="{ item }"> <label class="label-bold str-truncated mb-0">{{ item.name }}</label> diff --git a/app/assets/javascripts/batch_comments/components/submit_dropdown.vue b/app/assets/javascripts/batch_comments/components/submit_dropdown.vue index f82983a79a7..fac45f32464 100644 --- a/app/assets/javascripts/batch_comments/components/submit_dropdown.vue +++ b/app/assets/javascripts/batch_comments/components/submit_dropdown.vue @@ -6,7 +6,6 @@ import { __ } from '~/locale'; import { createAlert } from '~/alert'; import MarkdownEditor from '~/vue_shared/components/markdown/markdown_editor.vue'; import { scrollToElement } from '~/lib/utils/common_utils'; -import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { CLEAR_AUTOSAVE_ENTRY_EVENT } from '~/vue_shared/constants'; import markdownEditorEventHub from '~/vue_shared/components/markdown/eventhub'; import { trackSavedUsingEditor } from '~/vue_shared/components/markdown/tracking'; @@ -23,7 +22,6 @@ export default { SummarizeMyReview: () => import('ee_component/batch_comments/components/summarize_my_review.vue'), }, - mixins: [glFeatureFlagsMixin()], inject: { canSummarize: { default: false }, }, @@ -151,7 +149,6 @@ export default { <markdown-editor ref="markdownEditor" v-model="noteData.note" - :enable-content-editor="Boolean(glFeatures.contentEditorOnIssues)" class="js-no-autosize" :is-submitting="isSubmitting" :render-markdown-path="getNoteableData.preview_note_path" diff --git a/app/assets/javascripts/ci/ci_variable_list/components/ci_environments_dropdown.vue b/app/assets/javascripts/ci/ci_variable_list/components/ci_environments_dropdown.vue index abd272ee24b..77af643cbb3 100644 --- a/app/assets/javascripts/ci/ci_variable_list/components/ci_environments_dropdown.vue +++ b/app/assets/javascripts/ci/ci_variable_list/components/ci_environments_dropdown.vue @@ -24,10 +24,6 @@ export default { type: Array, required: true, }, - hasEnvScopeQuery: { - type: Boolean, - required: true, - }, selectedEnvironmentScope: { type: String, required: false, @@ -46,26 +42,17 @@ export default { composedCreateButtonLabel() { return sprintf(__('Create wildcard: %{searchTerm}'), { searchTerm: this.searchTerm }); }, - filteredEnvironments() { - const lowerCasedSearchTerm = this.searchTerm.toLowerCase(); - return this.environments.filter((environment) => { - return environment.toLowerCase().includes(lowerCasedSearchTerm); - }); - }, isDropdownLoading() { - return this.areEnvironmentsLoading && this.hasEnvScopeQuery && !this.isDropdownShown; + return this.areEnvironmentsLoading && !this.isDropdownShown; }, isDropdownSearching() { - return this.areEnvironmentsLoading && this.hasEnvScopeQuery && this.isDropdownShown; + return this.areEnvironmentsLoading && this.isDropdownShown; }, searchedEnvironments() { - // If hasEnvScopeQuery (applies only to projects for now), search query will be fired so this - // component will already receive filtered environments during the refetch. - // Otherwise (applies to groups), search the existing list of environments in the frontend - let filtered = this.hasEnvScopeQuery ? this.environments : this.filteredEnvironments; + let filtered = this.environments; // If there is no search term, make sure to include * - if (this.hasEnvScopeQuery && !this.searchTerm) { + if (!this.searchTerm) { filtered = uniq([...filtered, '*']); } @@ -85,9 +72,7 @@ export default { ); }, shouldRenderDivider() { - return ( - (this.hasEnvScopeQuery || this.shouldRenderCreateButton) && !this.areEnvironmentsLoading - ); + return !this.areEnvironmentsLoading; }, environmentScopeLabel() { return convertEnvironmentScope(this.selectedEnvironmentScope); @@ -97,9 +82,7 @@ export default { debouncedSearch: debounce(function debouncedSearch(searchTerm) { const newSearchTerm = searchTerm.trim(); this.searchTerm = newSearchTerm; - if (this.hasEnvScopeQuery) { - this.$emit('search-environment-scope', newSearchTerm); - } + this.$emit('search-environment-scope', newSearchTerm); }, 500), selectEnvironment(selected) { this.$emit('select-environment', selected); @@ -137,7 +120,7 @@ export default { > <template #footer> <gl-dropdown-divider v-if="shouldRenderDivider" /> - <div v-if="hasEnvScopeQuery" data-testid="max-envs-notice"> + <div data-testid="max-envs-notice"> <gl-dropdown-item class="gl-list-style-none" disabled> <gl-sprintf :message="$options.i18n.maxEnvsNote" class="gl-font-sm"> <template #limit> diff --git a/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_drawer.vue b/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_drawer.vue index 14410d8b344..5b2984e5249 100644 --- a/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_drawer.vue +++ b/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_drawer.vue @@ -311,7 +311,6 @@ export default { <ci-environments-dropdown v-if="areScopedVariablesAvailable" class="gl-mb-5" - has-env-scope-query :are-environments-loading="areEnvironmentsLoading" :environments="environments" :selected-environment-scope="variable.environmentScope" diff --git a/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_modal.vue b/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_modal.vue index 2d135056073..cc664d76267 100644 --- a/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_modal.vue +++ b/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_modal.vue @@ -38,7 +38,6 @@ import { VARIABLE_ACTIONS, variableOptions, } from '../constants'; -import { createJoinedEnvironments } from '../utils'; import CiEnvironmentsDropdown from './ci_environments_dropdown.vue'; import { awsTokens, awsTokenList } from './ci_variable_autocomplete_tokens'; @@ -90,10 +89,6 @@ export default { required: false, default: false, }, - hasEnvScopeQuery: { - type: Boolean, - required: true, - }, mode: { type: String, required: true, @@ -147,13 +142,6 @@ export default { isTipVisible() { return !this.isTipDismissed && AWS_TOKEN_CONSTANTS.includes(this.variable.key); }, - environmentsList() { - if (this.hasEnvScopeQuery) { - return this.environments; - } - - return createJoinedEnvironments(this.variables, this.environments, this.newEnvironments); - }, maskedFeedback() { return this.displayMaskedError ? __('This variable value does not meet the masking requirements.') @@ -404,9 +392,8 @@ export default { <ci-environments-dropdown v-if="areScopedVariablesAvailable" :are-environments-loading="areEnvironmentsLoading" - :has-env-scope-query="hasEnvScopeQuery" :selected-environment-scope="variable.environmentScope" - :environments="environmentsList" + :environments="environments" @select-environment="setEnvironmentScope" @search-environment-scope="$emit('search-environment-scope', $event)" /> diff --git a/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_settings.vue b/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_settings.vue index 482f6da5617..2d25a4be9e7 100644 --- a/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_settings.vue +++ b/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_settings.vue @@ -37,10 +37,6 @@ export default { required: false, default: false, }, - hasEnvScopeQuery: { - type: Boolean, - required: true, - }, isLoading: { type: Boolean, required: false, @@ -125,7 +121,6 @@ export default { :are-environments-loading="areEnvironmentsLoading" :are-scoped-variables-available="areScopedVariablesAvailable" :environments="environments" - :has-env-scope-query="hasEnvScopeQuery" :hide-environment-scope="hideEnvironmentScope" :variables="variables" :mode="mode" diff --git a/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_shared.vue b/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_shared.vue index 3d5ed327dc7..ebc0db6fad1 100644 --- a/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_shared.vue +++ b/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_shared.vue @@ -285,7 +285,6 @@ export default { :are-scoped-variables-available="areScopedVariablesAvailable" :entity="entity" :environments="environments" - :has-env-scope-query="hasEnvScopeQuery" :hide-environment-scope="hideEnvironmentScope" :is-loading="isLoading" :max-variable-limit="maxVariableLimit" diff --git a/app/assets/javascripts/ci/ci_variable_list/utils.js b/app/assets/javascripts/ci/ci_variable_list/utils.js index 1faa97a5f73..a7e020206ea 100644 --- a/app/assets/javascripts/ci/ci_variable_list/utils.js +++ b/app/assets/javascripts/ci/ci_variable_list/utils.js @@ -1,29 +1,6 @@ -import { uniq } from 'lodash'; import { allEnvironments } from './constants'; /** - * This function takes a list of variable, environments and - * new environments added through the scope dropdown - * and create a new Array that concatenate the environment list - * with the environment scopes find in the variable list. This is - * useful for variable settings so that we can render a list of all - * environment scopes available based on the list of envs, the ones the user - * added explictly and what is found under each variable. - * @param {Array} variables - * @param {Array} environments - * @returns {Array} - Array of environments - */ - -export const createJoinedEnvironments = ( - variables = [], - environments = [], - newEnvironments = [], -) => { - const scopesFromVariables = variables.map((variable) => variable.environmentScope); - return uniq([...environments, ...newEnvironments, ...scopesFromVariables]).sort(); -}; - -/** * This function job is to convert the * wildcard to text when applicable * in the UI. It uses a constants to compare the incoming value to that * of the * and then apply the corresponding label if applicable. If there diff --git a/app/assets/javascripts/content_editor/extensions/selection.js b/app/assets/javascripts/content_editor/extensions/selection.js index 2e0bb29e5a1..0c24207b395 100644 --- a/app/assets/javascripts/content_editor/extensions/selection.js +++ b/app/assets/javascripts/content_editor/extensions/selection.js @@ -6,12 +6,22 @@ export default Extension.create({ name: 'selection', addProseMirrorPlugins() { + let contextMenuVisible = false; + return [ new Plugin({ key: new PluginKey('selection'), props: { + handleDOMEvents: { + contextmenu() { + contextMenuVisible = true; + setTimeout(() => { + contextMenuVisible = false; + }); + }, + }, decorations(state) { - if (state.selection.empty) return null; + if (state.selection.empty || contextMenuVisible) return null; return DecorationSet.create(state.doc, [ Decoration.inline(state.selection.from, state.selection.to, { diff --git a/app/assets/javascripts/content_editor/services/serialization_helpers.js b/app/assets/javascripts/content_editor/services/serialization_helpers.js index 17e650644b3..0897232cf89 100644 --- a/app/assets/javascripts/content_editor/services/serialization_helpers.js +++ b/app/assets/javascripts/content_editor/services/serialization_helpers.js @@ -561,7 +561,14 @@ const linkType = (sourceMarkdown) => { return LINK_HTML; }; -const normalizeUrl = (url) => decodeURIComponent(removeLastSlashInUrlPath(removeUrlProtocol(url))); +const normalizeUrl = (url) => { + const processedUrl = removeLastSlashInUrlPath(removeUrlProtocol(url)); + try { + return decodeURIComponent(processedUrl); + } catch { + return processedUrl; + } +}; /** * Validates that the provided URL is a valid GFM autolink diff --git a/app/assets/javascripts/design_management/components/design_description/description_form.vue b/app/assets/javascripts/design_management/components/design_description/description_form.vue index 413442074f0..6be643e88dc 100644 --- a/app/assets/javascripts/design_management/components/design_description/description_form.vue +++ b/app/assets/javascripts/design_management/components/design_description/description_form.vue @@ -4,7 +4,6 @@ import SafeHtml from '~/vue_shared/directives/safe_html'; import { __, s__ } from '~/locale'; import { helpPagePath } from '~/helpers/help_page_helper'; import MarkdownEditor from '~/vue_shared/components/markdown/markdown_editor.vue'; -import glFeaturesFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { renderGFM } from '~/behaviors/markdown/render_gfm'; import { toggleMarkCheckboxes } from '~/behaviors/markdown/utils'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; @@ -36,7 +35,6 @@ export default { placeholder: s__('DesignManagement|Write a comment or drag your files hereā¦'), 'aria-label': s__('DesignManagement|Design description'), }, - mixins: [glFeaturesFlagMixin()], markdownDocsPath: helpPagePath('user/markdown'), quickActionsDocsPath: helpPagePath('user/project/quick_actions'), props: { @@ -174,7 +172,6 @@ export default { :render-markdown-path="markdownPreviewPath" :markdown-docs-path="$options.markdownDocsPath" :form-field-props="$options.formFieldProps" - :enable-content-editor="Boolean(glFeatures.contentEditorOnIssues)" :quick-actions-docs-path="$options.quickActionsDocsPath" :autosave-key="autosaveKey" enable-autocomplete diff --git a/app/assets/javascripts/invite_members/components/invite_groups_modal.vue b/app/assets/javascripts/invite_members/components/invite_groups_modal.vue index 91dbd86418c..4b492e48095 100644 --- a/app/assets/javascripts/invite_members/components/invite_groups_modal.vue +++ b/app/assets/javascripts/invite_members/components/invite_groups_modal.vue @@ -16,7 +16,7 @@ import GroupSelect from './group_select.vue'; import InviteGroupNotification from './invite_group_notification.vue'; export default { - name: 'InviteMembersModal', + name: 'InviteGroupsModal', components: { GroupSelect, InviteModalBase, diff --git a/app/assets/javascripts/invite_members/components/invite_modal_base.vue b/app/assets/javascripts/invite_members/components/invite_modal_base.vue index 5a891e23faf..18d22395104 100644 --- a/app/assets/javascripts/invite_members/components/invite_modal_base.vue +++ b/app/assets/javascripts/invite_members/components/invite_modal_base.vue @@ -253,7 +253,6 @@ export default { <gl-modal ref="modal" :modal-id="modalId" - data-qa-selector="invite_members_modal_content" data-testid="invite-modal" size="sm" dialog-class="gl-mx-5" diff --git a/app/assets/javascripts/issues/show/components/app.vue b/app/assets/javascripts/issues/show/components/app.vue index d31b56c0277..756585683c8 100644 --- a/app/assets/javascripts/issues/show/components/app.vue +++ b/app/assets/javascripts/issues/show/components/app.vue @@ -185,12 +185,12 @@ export default { default: false, }, issueId: { - type: Number, + type: String, required: false, default: null, }, issueIid: { - type: Number, + type: String, required: false, default: null, }, @@ -521,7 +521,6 @@ export default { :project-namespace="projectNamespace" :can-attach-file="canAttachFile" :enable-autocomplete="enableAutocomplete" - :issue-id="issueId" :issuable-type="issuableType" @updateForm="setFormState" /> diff --git a/app/assets/javascripts/issues/show/components/description.vue b/app/assets/javascripts/issues/show/components/description.vue index 5735a518a3e..369aa694739 100644 --- a/app/assets/javascripts/issues/show/components/description.vue +++ b/app/assets/javascripts/issues/show/components/description.vue @@ -74,12 +74,12 @@ export default { default: 0, }, issueId: { - type: Number, + type: String, required: false, default: null, }, issueIid: { - type: Number, + type: String, required: false, default: null, }, @@ -365,7 +365,7 @@ export default { addHierarchyChild({ cache, fullPath: this.fullPath, - iid: String(this.issueIid), + iid: this.issueIid, workItem: workItemCreate.workItem, }), }); @@ -400,7 +400,7 @@ export default { removeHierarchyChild({ cache, fullPath: this.fullPath, - iid: String(this.issueIid), + iid: this.issueIid, workItem: { id }, }), }); diff --git a/app/assets/javascripts/issues/show/components/fields/description.vue b/app/assets/javascripts/issues/show/components/fields/description.vue index efe1619ed1f..10323b99665 100644 --- a/app/assets/javascripts/issues/show/components/fields/description.vue +++ b/app/assets/javascripts/issues/show/components/fields/description.vue @@ -2,7 +2,6 @@ <script> import { __ } from '~/locale'; import MarkdownEditor from '~/vue_shared/components/markdown/markdown_editor.vue'; -import glFeaturesFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { trackSavedUsingEditor } from '~/vue_shared/components/markdown/tracking'; import { ISSUE_NOTEABLE_TYPE } from '~/notes/constants'; import updateMixin from '../../mixins/update'; @@ -11,7 +10,7 @@ export default { components: { MarkdownEditor, }, - mixins: [updateMixin, glFeaturesFlagMixin()], + mixins: [updateMixin], props: { value: { type: String, @@ -71,7 +70,6 @@ export default { <label class="sr-only" for="issue-description">{{ __('Description') }}</label> <markdown-editor ref="markdownEditor" - :enable-content-editor="Boolean(glFeatures.contentEditorOnIssues)" class="gl-mt-3" :value="value" :render-markdown-path="markdownPreviewPath" diff --git a/app/assets/javascripts/issues/show/components/form.vue b/app/assets/javascripts/issues/show/components/form.vue index 047bdcdcefc..c2248d66860 100644 --- a/app/assets/javascripts/issues/show/components/form.vue +++ b/app/assets/javascripts/issues/show/components/form.vue @@ -2,10 +2,7 @@ <script> import { GlAlert } from '@gitlab/ui'; import { getDraft, updateDraft, getLockVersion, clearDraft } from '~/lib/utils/autosave'; -import { convertToGraphQLId } from '~/graphql_shared/utils'; -import { TYPENAME_ISSUE, TYPENAME_USER } from '~/graphql_shared/constants'; import { TYPE_INCIDENT, TYPE_ISSUE } from '~/issues/constants'; -import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import eventHub from '../event_hub'; import EditActions from './edit_actions.vue'; import DescriptionField from './fields/description.vue'; @@ -24,7 +21,6 @@ export default { IssuableTypeField, LockedWarning, }, - mixins: [glFeatureFlagMixin()], props: { endpoint: { type: String, @@ -78,11 +74,6 @@ export default { required: false, default: '', }, - issueId: { - type: Number, - required: false, - default: null, - }, }, data() { const autosaveKey = [document.location.pathname, document.location.search]; @@ -110,12 +101,6 @@ export default { showTypeField() { return [TYPE_INCIDENT, TYPE_ISSUE].includes(this.issuableType); }, - resourceId() { - return this.issueId && convertToGraphQLId(TYPENAME_ISSUE, this.issueId); - }, - userId() { - return convertToGraphQLId(TYPENAME_USER, gon.current_user_id); - }, }, watch: { formData: { diff --git a/app/assets/javascripts/issues/show/index.js b/app/assets/javascripts/issues/show/index.js index b94f88f690e..cd5c6f4825a 100644 --- a/app/assets/javascripts/issues/show/index.js +++ b/app/assets/javascripts/issues/show/index.js @@ -131,8 +131,8 @@ export function initIssuableApp(store) { isLocked: this.getNoteableData?.discussion_locked, issuableStatus: this.getNoteableData?.state, issuableType: issueType, - issueId: this.getNoteableData?.id, - issueIid: this.getNoteableData?.iid, + issueId: this.getNoteableData?.id.toString(), + issueIid: this.getNoteableData?.iid.toString(), showTitleBorder: issueType !== TYPE_INCIDENT, }, }); diff --git a/app/assets/javascripts/members/components/members_tabs.vue b/app/assets/javascripts/members/components/members_tabs.vue index de5c9eb5a55..449ad20e7ab 100644 --- a/app/assets/javascripts/members/components/members_tabs.vue +++ b/app/assets/javascripts/members/components/members_tabs.vue @@ -22,7 +22,7 @@ export const TABS = [ { namespace: MEMBER_TYPES.group, title: __('Groups'), - attrs: { 'data-qa-selector': 'groups_list_tab' }, + attrs: { 'data-testid': 'groups-list-tab' }, queryParamValue: TAB_QUERY_PARAM_VALUES.group, }, { diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 142f07973f2..329d6cfec00 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -16,7 +16,6 @@ import { sprintf } from '~/locale'; import { badgeState } from '~/merge_requests/components/merge_request_header.vue'; import MarkdownEditor from '~/vue_shared/components/markdown/markdown_editor.vue'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; -import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { trackSavedUsingEditor } from '~/vue_shared/components/markdown/tracking'; import * as constants from '../constants'; @@ -49,7 +48,7 @@ export default { directives: { GlTooltip: GlTooltipDirective, }, - mixins: [glFeatureFlagsMixin(), issuableStateMixin], + mixins: [issuableStateMixin], props: { noteableType: { type: String, @@ -361,7 +360,6 @@ export default { > <markdown-editor ref="markdownEditor" - :enable-content-editor="Boolean(glFeatures.contentEditorOnIssues)" :value="note" :render-markdown-path="markdownPreviewPath" :markdown-docs-path="markdownDocsPath" diff --git a/app/assets/javascripts/notes/components/note_form.vue b/app/assets/javascripts/notes/components/note_form.vue index 8073428c108..f8a0db93e37 100644 --- a/app/assets/javascripts/notes/components/note_form.vue +++ b/app/assets/javascripts/notes/components/note_form.vue @@ -5,7 +5,6 @@ import { mapGetters, mapActions, mapState } from 'vuex'; import { mergeUrlParams } from '~/lib/utils/url_utility'; import { __ } from '~/locale'; import MarkdownEditor from '~/vue_shared/components/markdown/markdown_editor.vue'; -import glFeaturesFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { trackSavedUsingEditor } from '~/vue_shared/components/markdown/tracking'; import eventHub from '../event_hub'; import issuableStateMixin from '../mixins/issuable_state'; @@ -24,7 +23,7 @@ export default { GlLink, GlFormCheckbox, }, - mixins: [issuableStateMixin, resolvable, glFeaturesFlagMixin()], + mixins: [issuableStateMixin, resolvable], props: { noteBody: { type: String, @@ -224,9 +223,6 @@ export default { placeholder: { link: ['startTag', 'endTag'] }, }; }, - enableContentEditor() { - return Boolean(this.glFeatures.contentEditorOnIssues); - }, codeSuggestionsConfig() { return { canSuggest: this.canSuggest, @@ -361,7 +357,6 @@ export default { <comment-field-layout :noteable-data="getNoteableData" :is-internal-note="isInternalNote"> <markdown-editor ref="markdownEditor" - :enable-content-editor="enableContentEditor" :value="updatedNoteBody" :render-markdown-path="markdownPreviewPath" :markdown-docs-path="markdownDocsPath" diff --git a/app/assets/javascripts/vue_shared/components/markdown/mount_markdown_editor.js b/app/assets/javascripts/vue_shared/components/markdown/mount_markdown_editor.js index 6c2f084591e..f7fb1339bbc 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/mount_markdown_editor.js +++ b/app/assets/javascripts/vue_shared/components/markdown/mount_markdown_editor.js @@ -105,7 +105,6 @@ export function mountMarkdownEditor(options = {}) { return h(MarkdownEditor, { props: { setFacade, - enableContentEditor: Boolean(gon.features?.contentEditorOnIssues), value: formFieldValue, renderMarkdownPath, markdownDocsPath, diff --git a/app/controllers/admin/topics_controller.rb b/app/controllers/admin/topics_controller.rb index c4de600dd1d..40cad2d26f4 100644 --- a/app/controllers/admin/topics_controller.rb +++ b/app/controllers/admin/topics_controller.rb @@ -8,10 +8,6 @@ class Admin::TopicsController < Admin::ApplicationController feature_category :groups_and_projects - before_action do - push_frontend_feature_flag(:content_editor_on_issues, current_user) - end - def index @topics = Projects::TopicsFinder.new(params: params.permit(:search)).execute.page(params[:page]).without_count end diff --git a/app/controllers/groups/milestones_controller.rb b/app/controllers/groups/milestones_controller.rb index cbed75019f2..5f6b55ea928 100644 --- a/app/controllers/groups/milestones_controller.rb +++ b/app/controllers/groups/milestones_controller.rb @@ -9,10 +9,6 @@ class Groups::MilestonesController < Groups::ApplicationController feature_category :team_planning urgency :low - before_action do - push_frontend_feature_flag(:content_editor_on_issues, group) - end - def index respond_to do |format| format.html do diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index fc7865c949d..ac9726112c2 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -45,8 +45,6 @@ class Projects::IssuesController < Projects::ApplicationController before_action do push_frontend_feature_flag(:preserve_unchanged_markdown, project) - push_frontend_feature_flag(:content_editor_on_issues, project&.group) - push_force_frontend_feature_flag(:content_editor_on_issues, project&.content_editor_on_issues_feature_flag_enabled?) push_frontend_feature_flag(:service_desk_new_note_email_native_attachments, project) push_frontend_feature_flag(:saved_replies, current_user) push_frontend_feature_flag(:issues_grid_view) diff --git a/app/controllers/projects/merge_requests/application_controller.rb b/app/controllers/projects/merge_requests/application_controller.rb index 81ff6c215f9..1af0ce3c35e 100644 --- a/app/controllers/projects/merge_requests/application_controller.rb +++ b/app/controllers/projects/merge_requests/application_controller.rb @@ -7,11 +7,6 @@ class Projects::MergeRequests::ApplicationController < Projects::ApplicationCont feature_category :code_review_workflow - before_action do - push_frontend_feature_flag(:content_editor_on_issues, project&.group) - push_force_frontend_feature_flag(:content_editor_on_issues, project&.content_editor_on_issues_feature_flag_enabled?) - end - private # Normally the methods with `check_(\w+)_available!` pattern are diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 858fddb313f..d57cb0a5926 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -36,8 +36,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo end before_action only: [:show, :diffs] do - push_frontend_feature_flag(:content_editor_on_issues, project&.group) - push_force_frontend_feature_flag(:content_editor_on_issues, project&.content_editor_on_issues_feature_flag_enabled?) push_frontend_feature_flag(:core_security_mr_widget_counts, project) push_frontend_feature_flag(:issue_assignees_widget, @project) push_frontend_feature_flag(:moved_mr_sidebar, project) diff --git a/app/controllers/projects/milestones_controller.rb b/app/controllers/projects/milestones_controller.rb index 1f4e5b54500..35b65dbce7e 100644 --- a/app/controllers/projects/milestones_controller.rb +++ b/app/controllers/projects/milestones_controller.rb @@ -24,10 +24,6 @@ class Projects::MilestonesController < Projects::ApplicationController feature_category :team_planning urgency :low - before_action do - push_frontend_feature_flag(:content_editor_on_issues, @project) - end - def index @sort = params[:sort] || 'due_date_asc' @milestones = milestones.sort_by_attribute(@sort) diff --git a/app/events/merge_requests/unblocked_state_event.rb b/app/events/merge_requests/unblocked_state_event.rb new file mode 100644 index 00000000000..2cf79059cf7 --- /dev/null +++ b/app/events/merge_requests/unblocked_state_event.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module MergeRequests + class UnblockedStateEvent < Gitlab::EventStore::Event + def schema + { + 'type' => 'object', + 'required' => %w[ + current_user_id + merge_request_id + ], + 'properties' => { + 'current_user_id' => { 'type' => 'integer' }, + 'merge_request_id' => { 'type' => 'integer' } + } + } + end + end +end diff --git a/app/models/bulk_imports/entity.rb b/app/models/bulk_imports/entity.rb index da620c85676..437118c36e8 100644 --- a/app/models/bulk_imports/entity.rb +++ b/app/models/bulk_imports/entity.rb @@ -144,9 +144,9 @@ class BulkImports::Entity < ApplicationRecord File.join(base_resource_path, 'export_relations') end - def export_relations_url_path - if bulk_import.supports_batched_export? - Gitlab::Utils.add_url_parameters(export_relations_url_path_base, batched: true) + def export_relations_url_path(batched: false) + if batched && bulk_import.supports_batched_export? + Gitlab::Utils.add_url_parameters(export_relations_url_path_base, batched: batched) else export_relations_url_path_base end diff --git a/app/models/group.rb b/app/models/group.rb index f3a501cfb04..587451ac195 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -885,10 +885,6 @@ class Group < Namespace ].compact.min end - def content_editor_on_issues_feature_flag_enabled? - feature_flag_enabled_for_self_or_ancestor?(:content_editor_on_issues) - end - def work_items_feature_flag_enabled? feature_flag_enabled_for_self_or_ancestor?(:work_items) end diff --git a/app/models/integrations/discord.rb b/app/models/integrations/discord.rb index 6aca9fc9921..7917d17eb62 100644 --- a/app/models/integrations/discord.rb +++ b/app/models/integrations/discord.rb @@ -43,7 +43,7 @@ module Integrations end def self.supported_events - %w[push issue confidential_issue merge_request note confidential_note tag_push pipeline wiki_page] + %w[push issue confidential_issue merge_request note confidential_note tag_push pipeline wiki_page deployment] end def configurable_channels? diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 72b0632f9fd..9ac9f94310d 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -1237,13 +1237,14 @@ class MergeRequest < ApplicationRecord def mergeable?( skip_ci_check: false, skip_discussions_check: false, skip_approved_check: false, check_mergeability_retry_lease: false, - skip_draft_check: false, skip_rebase_check: false) + skip_draft_check: false, skip_rebase_check: false, skip_blocked_check: false) return false unless mergeable_state?( skip_ci_check: skip_ci_check, - skip_draft_check: skip_draft_check, skip_discussions_check: skip_discussions_check, - skip_approved_check: skip_approved_check + skip_draft_check: skip_draft_check, + skip_approved_check: skip_approved_check, + skip_blocked_check: skip_blocked_check ) check_mergeability(sync_retry_lease: check_mergeability_retry_lease) @@ -1276,14 +1277,15 @@ class MergeRequest < ApplicationRecord def mergeable_state?( skip_ci_check: false, skip_discussions_check: false, skip_approved_check: false, - skip_draft_check: false) + skip_draft_check: false, skip_blocked_check: false) additional_checks = execute_merge_checks( mergeable_state_checks, params: { skip_ci_check: skip_ci_check, skip_discussions_check: skip_discussions_check, skip_approved_check: skip_approved_check, - skip_draft_check: skip_draft_check + skip_draft_check: skip_draft_check, + skip_blocked_check: skip_blocked_check } ) additional_checks.success? diff --git a/app/models/project.rb b/app/models/project.rb index 2e331c391b1..612931e7d40 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -3187,10 +3187,6 @@ class Project < ApplicationRecord creator.banned? && team.max_member_access(creator.id) == Gitlab::Access::OWNER end - def content_editor_on_issues_feature_flag_enabled? - group&.content_editor_on_issues_feature_flag_enabled? || Feature.enabled?(:content_editor_on_issues, self) - end - def work_items_feature_flag_enabled? group&.work_items_feature_flag_enabled? || Feature.enabled?(:work_items, self) end diff --git a/app/serializers/merge_request_noteable_entity.rb b/app/serializers/merge_request_noteable_entity.rb index 306bac7daae..aac90c20b53 100644 --- a/app/serializers/merge_request_noteable_entity.rb +++ b/app/serializers/merge_request_noteable_entity.rb @@ -15,8 +15,8 @@ class MergeRequestNoteableEntity < IssuableEntity project_tree_path(merge_request.source_project, merge_request.source_branch) end - expose :target_branch_path, if: -> (merge_request) { merge_request.source_project } do |merge_request| - project_tree_path(merge_request.source_project, merge_request.target_branch) + expose :target_branch_path, if: -> (merge_request) { merge_request.target_project } do |merge_request| + project_tree_path(merge_request.target_project, merge_request.target_branch) end expose :diff_head_sha diff --git a/app/services/auto_merge/base_service.rb b/app/services/auto_merge/base_service.rb index caefa9af24a..545e4d9b7dc 100644 --- a/app/services/auto_merge/base_service.rb +++ b/app/services/auto_merge/base_service.rb @@ -63,7 +63,7 @@ module AutoMerge !merge_request.broken? && (skip_draft_check(merge_request) || !merge_request.draft?) && merge_request.mergeable_discussions_state? && - !merge_request.merge_blocked_by_other_mrs? && + (skip_blocked_check(merge_request) || !merge_request.merge_blocked_by_other_mrs?) && yield end end @@ -114,5 +114,10 @@ module AutoMerge def skip_draft_check(merge_request) false end + + # Will skip the blocked check or not when checking if strategy is available + def skip_blocked_check(merge_request) + false + end end end diff --git a/app/views/dashboard/projects/_zero_authorized_projects.html.haml b/app/views/dashboard/projects/_zero_authorized_projects.html.haml index e72762f2ae5..da25dee1e88 100644 --- a/app/views/dashboard/projects/_zero_authorized_projects.html.haml +++ b/app/views/dashboard/projects/_zero_authorized_projects.html.haml @@ -1,6 +1,6 @@ .container .gl-text-center.gl-pt-6.gl-pb-7 - %h2.gl-font-size-h1{ data: { qa_selector: 'welcome_title_content' } } + %h2.gl-font-size-h1{ data: { testid: 'welcome-title-content' } } = _('Welcome to GitLab') %p.gl-m-0 = _('Faster releases. Better code. Less pain.') diff --git a/app/views/layouts/component_preview.html.haml b/app/views/layouts/component_preview.html.haml index 8217ac13c52..4ef7ba04868 100644 --- a/app/views/layouts/component_preview.html.haml +++ b/app/views/layouts/component_preview.html.haml @@ -5,6 +5,12 @@ - else = stylesheet_link_tag "application_dark" = stylesheet_link_tag "application_utilities_dark" + + - if ::Feature.enabled?(:font_display_swap, current_user) + = stylesheet_link_tag_defer "fonts_swap" + - else + = stylesheet_link_tag_defer "fonts_optional" + %body .gl-mt-6{ class: (params[:lookbook][:display][:layout] == "fluid" ? "container-fluid" : "container") } - if params[:lookbook][:display][:bg_dark] diff --git a/app/workers/bulk_imports/export_request_worker.rb b/app/workers/bulk_imports/export_request_worker.rb index 1b2183e96b4..44759916f99 100644 --- a/app/workers/bulk_imports/export_request_worker.rb +++ b/app/workers/bulk_imports/export_request_worker.rb @@ -125,7 +125,7 @@ module BulkImports end def export_url - entity.export_relations_url_path + entity.export_relations_url_path(batched: Feature.enabled?(:bulk_imports_batched_import_export)) end end end diff --git a/app/workers/bulk_imports/finish_batched_pipeline_worker.rb b/app/workers/bulk_imports/finish_batched_pipeline_worker.rb index 91365d23dea..b1f3757e058 100644 --- a/app/workers/bulk_imports/finish_batched_pipeline_worker.rb +++ b/app/workers/bulk_imports/finish_batched_pipeline_worker.rb @@ -43,7 +43,7 @@ module BulkImports end def import_in_progress? - tracker.batches.any?(&:started?) + tracker.batches.any? { |b| b.started? || b.created? } end end end diff --git a/app/workers/bulk_imports/pipeline_batch_worker.rb b/app/workers/bulk_imports/pipeline_batch_worker.rb index 634d7ed3c87..6230d517641 100644 --- a/app/workers/bulk_imports/pipeline_batch_worker.rb +++ b/app/workers/bulk_imports/pipeline_batch_worker.rb @@ -14,15 +14,16 @@ module BulkImports def perform(batch_id) @batch = ::BulkImports::BatchTracker.find(batch_id) @tracker = @batch.tracker + @pending_retry = false try_obtain_lease { run } ensure - ::BulkImports::FinishBatchedPipelineWorker.perform_async(tracker.id) + ::BulkImports::FinishBatchedPipelineWorker.perform_async(tracker.id) unless pending_retry end private - attr_reader :batch, :tracker + attr_reader :batch, :tracker, :pending_retry def run return batch.skip! if tracker.failed? || tracker.finished? @@ -31,6 +32,7 @@ module BulkImports tracker.pipeline_class.new(context).run batch.finish! rescue BulkImports::RetryPipelineError => e + @pending_retry = true retry_batch(e) rescue StandardError => e fail_batch(e) |