Commit 3d59c8a7 authored by Mike Greiling's avatar Mike Greiling

Merge branch 'ps-mr-checkboxes-reduce-style-coupling' into 'master'

Refactor MR widget merge checkboxes to more flex

See merge request gitlab-org/gitlab!55951
parents bacc60c6 b1ce7c40
...@@ -455,8 +455,8 @@ export default { ...@@ -455,8 +455,8 @@ export default {
<div class="mr-widget-body media" :class="{ 'gl-pb-3': shouldRenderMergeTrainHelperText }"> <div class="mr-widget-body media" :class="{ 'gl-pb-3': shouldRenderMergeTrainHelperText }">
<status-icon :status="iconClass" /> <status-icon :status="iconClass" />
<div class="media-body"> <div class="media-body">
<div class="mr-widget-body-controls media space-children"> <div class="mr-widget-body-controls gl-display-flex gl-align-items-center">
<gl-button-group> <gl-button-group class="gl-align-self-start">
<gl-button <gl-button
size="medium" size="medium"
category="primary" category="primary"
...@@ -495,46 +495,48 @@ export default { ...@@ -495,46 +495,48 @@ export default {
/> />
</gl-dropdown> </gl-dropdown>
</gl-button-group> </gl-button-group>
<div class="media-body-wrap space-children"> <div
<template v-if="shouldShowMergeControls"> v-if="shouldShowMergeControls"
<gl-form-checkbox class="gl-display-flex gl-align-items-center gl-flex-wrap"
v-if="canRemoveSourceBranch" >
id="remove-source-branch-input" <gl-form-checkbox
v-model="removeSourceBranch" v-if="canRemoveSourceBranch"
:disabled="isRemoveSourceBranchButtonDisabled" id="remove-source-branch-input"
class="js-remove-source-branch-checkbox gl-min-h-7 gl-display-flex gl-align-items-center gl-mr-2" v-model="removeSourceBranch"
:disabled="isRemoveSourceBranchButtonDisabled"
class="js-remove-source-branch-checkbox gl-mx-3 gl-display-flex gl-align-items-center"
>
{{ __('Delete source branch') }}
</gl-form-checkbox>
<!-- Placeholder for EE extension of this component -->
<squash-before-merge
v-if="shouldShowSquashBeforeMerge"
v-model="squashBeforeMerge"
:help-path="mr.squashBeforeMergeHelpPath"
:is-disabled="isSquashReadOnly"
class="gl-mx-3"
/>
</div>
<template v-else>
<div class="bold js-resolve-mr-widget-items-message gl-ml-3">
<div
v-if="hasPipelineMustSucceedConflict"
class="gl-display-flex gl-align-items-center"
data-testid="pipeline-succeed-conflict"
> >
{{ __('Delete source branch') }} <gl-sprintf :message="pipelineMustSucceedConflictText" />
</gl-form-checkbox> <gl-link
:href="mr.pipelineMustSucceedDocsPath"
<!-- Placeholder for EE extension of this component --> target="_blank"
<squash-before-merge class="gl-display-flex gl-ml-2"
v-if="shouldShowSquashBeforeMerge"
v-model="squashBeforeMerge"
:help-path="mr.squashBeforeMergeHelpPath"
:is-disabled="isSquashReadOnly"
/>
</template>
<template v-else>
<div class="bold js-resolve-mr-widget-items-message">
<div
v-if="hasPipelineMustSucceedConflict"
class="gl-display-flex gl-align-items-center"
data-testid="pipeline-succeed-conflict"
> >
<gl-sprintf :message="pipelineMustSucceedConflictText" /> <gl-icon name="question" />
<gl-link </gl-link>
:href="mr.pipelineMustSucceedDocsPath"
target="_blank"
class="gl-display-flex gl-ml-2"
>
<gl-icon name="question" />
</gl-link>
</div>
<gl-sprintf v-else :message="mergeDisabledText" />
</div> </div>
</template> <gl-sprintf v-else :message="mergeDisabledText" />
</div> </div>
</template>
</div> </div>
<div v-if="isSHAMismatch" class="d-flex align-items-center mt-2 js-sha-mismatch"> <div v-if="isSHAMismatch" class="d-flex align-items-center mt-2 js-sha-mismatch">
<gl-icon name="warning-solid" class="text-warning mr-1" /> <gl-icon name="warning-solid" class="text-warning mr-1" />
......
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
:checked="value" :checked="value"
:disabled="isDisabled" :disabled="isDisabled"
name="squash" name="squash"
class="qa-squash-checkbox js-squash-checkbox gl-min-h-7 gl-display-flex gl-align-items-center gl-mr-2" class="qa-squash-checkbox js-squash-checkbox gl-mr-2 gl-display-flex gl-align-items-center"
:title="tooltipTitle" :title="tooltipTitle"
@change="(checked) => $emit('input', checked)" @change="(checked) => $emit('input', checked)"
> >
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment