diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 1a53db2560f..82f756389ef 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -dd6ef2a257606d4499cab51c80966a474f1a840f +f8f71797e1e8a1ad0e451becfe5294578e28894d 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 b4f6f7b9e5a..4aae563d9ff 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 @@ -381,6 +381,8 @@ export default { }, resetForm() { this.variable = { ...defaultVariableState }; + + this.visibility = VISIBILITY_VISIBLE; }, setEnvironmentScope(scope) { this.variable = { ...this.variable, environmentScope: scope }; diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue index 69ceb18bc69..cddef1d9890 100644 --- a/app/assets/javascripts/notes/components/diff_with_note.vue +++ b/app/assets/javascripts/notes/components/diff_with_note.vue @@ -9,7 +9,7 @@ import { getDiffMode } from '~/diffs/store/utils'; import { diffViewerModes } from '~/ide/constants'; import DiffViewer from '~/vue_shared/components/diff_viewer/diff_viewer.vue'; import { isCollapsed } from '~/diffs/utils/diff_file'; -import { FILE_DIFF_POSITION_TYPE } from '~/diffs/constants'; +import { FILE_DIFF_POSITION_TYPE, IMAGE_DIFF_POSITION_TYPE } from '~/diffs/constants'; const FIRST_CHAR_REGEX = /^(\+|-| )/; @@ -69,11 +69,21 @@ export default { return this.discussion.position?.position_type; }, isFileDiscussion() { + if (!this.discussion.diff_file) { + return ( + this.discussion.original_position.position_type === IMAGE_DIFF_POSITION_TYPE || + this.discussion.original_position.position_type === FILE_DIFF_POSITION_TYPE + ); + } + return this.positionType === FILE_DIFF_POSITION_TYPE; }, showHeader() { + if (this.discussion.diff_file) return true; + return ( - this.discussion.diff_file || this.discussion.original_position.position_type === 'file' + this.discussion.original_position.position_type === FILE_DIFF_POSITION_TYPE || + this.discussion.original_position.position_type === IMAGE_DIFF_POSITION_TYPE ); }, backfilledDiffFile() { diff --git a/app/assets/javascripts/notes/components/noteable_discussion.vue b/app/assets/javascripts/notes/components/noteable_discussion.vue index 84aa4066685..557a6612b5a 100644 --- a/app/assets/javascripts/notes/components/noteable_discussion.vue +++ b/app/assets/javascripts/notes/components/noteable_discussion.vue @@ -13,6 +13,7 @@ import diffLineNoteFormMixin from '~/notes/mixins/diff_line_note_form'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import { detectAndConfirmSensitiveTokens } from '~/lib/utils/secret_detection'; +import { FILE_DIFF_POSITION_TYPE, IMAGE_DIFF_POSITION_TYPE } from '~/diffs/constants'; import eventHub from '../event_hub'; import noteable from '../mixins/noteable'; import resolvable from '../mixins/resolvable'; @@ -163,9 +164,22 @@ export default { }, canShowReplyActions() { if (this.shouldRenderDiffs) { + if (this.discussion.diff_file?.diff_refs) { + return true; + } + + /* + * https://gitlab.com/gitlab-com/gl-infra/production/-/issues/19118 + * + * For most diff discussions we should have a `diff_file`. + * However in some cases we might we might not have this object. + * In these we need to check if the `original_position.position_type` + * is either a file or an image, doing this allows us to still + * render the reply actions. + */ return ( - this.discussion.original_position.position_type === 'file' || - this.discussion.diff_file?.diff_refs + this.discussion.original_position?.position_type === FILE_DIFF_POSITION_TYPE || + this.discussion.original_position?.position_type === IMAGE_DIFF_POSITION_TYPE ); } diff --git a/app/assets/javascripts/packages_and_registries/settings/project/components/container_protection_tag_rule_form.vue b/app/assets/javascripts/packages_and_registries/settings/project/components/container_protection_tag_rule_form.vue new file mode 100644 index 00000000000..9b410ab0b7d --- /dev/null +++ b/app/assets/javascripts/packages_and_registries/settings/project/components/container_protection_tag_rule_form.vue @@ -0,0 +1,100 @@ + + + diff --git a/app/assets/javascripts/packages_and_registries/settings/project/components/container_protection_tag_rules.vue b/app/assets/javascripts/packages_and_registries/settings/project/components/container_protection_tag_rules.vue index ec3da88b32b..ce346481827 100644 --- a/app/assets/javascripts/packages_and_registries/settings/project/components/container_protection_tag_rules.vue +++ b/app/assets/javascripts/packages_and_registries/settings/project/components/container_protection_tag_rules.vue @@ -3,6 +3,7 @@ import { GlAlert, GlBadge, GlButton, + GlDrawer, GlLoadingIcon, GlModal, GlModalDirective, @@ -11,6 +12,7 @@ import { GlTooltipDirective, } from '@gitlab/ui'; import CrudComponent from '~/vue_shared/components/crud_component.vue'; +import ContainerProtectionTagRuleForm from '~/packages_and_registries/settings/project/components/container_protection_tag_rule_form.vue'; import getContainerProtectionTagRulesQuery from '~/packages_and_registries/settings/project/graphql/queries/get_container_protection_tag_rules.query.graphql'; import deleteContainerProtectionTagRuleMutation from '~/packages_and_registries/settings/project/graphql/mutations/delete_container_protection_tag_rule.mutation.graphql'; import { __, s__ } from '~/locale'; @@ -22,10 +24,12 @@ const I18N_MINIMUM_ACCESS_LEVEL_TO_DELETE = s__('ContainerRegistry|Minimum acces export default { components: { + ContainerProtectionTagRuleForm, CrudComponent, GlAlert, GlBadge, GlButton, + GlDrawer, GlLoadingIcon, GlModal, GlSprintf, @@ -63,6 +67,7 @@ export default { protectionRuleMutationItem: null, protectionRulesQueryPayload: { nodes: [], pageInfo: {} }, protectionRulesQueryPaginationParams: { first: MAX_LIMIT }, + showDrawer: false, }; }, computed: { @@ -98,6 +103,9 @@ export default { clearAlertMessage() { this.alertErrorMessage = ''; }, + closeDrawer() { + this.showDrawer = false; + }, async deleteProtectionRule(protectionRule) { this.clearAlertMessage(); @@ -121,6 +129,9 @@ export default { this.resetProtectionRuleMutation(); } }, + openDrawer() { + this.showDrawer = true; + }, refetchProtectionRules() { this.$apollo.queries.protectionRulesQueryPayload.refetch(); }, @@ -181,8 +192,11 @@ export default {