Commit 896af1ac authored by Nathan Friend's avatar Nathan Friend

Add merge train helper text to MR widget (CE)

This commit adds a helper text that describes what will happen when a
user clicks the "Start/Add to merge train when pipeline succeeds"
button.  This text appears at the bottom of the merge request widget.

In addition, this commit renames the "merge_train_info" component to
"merge_train_position_indicator" to avoid ambiguity with the
"merge_train_helper_text" component.
parent b3aa0711
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
}; };
</script> </script>
<template> <template>
<section class="mr-widget-help"> <section class="mr-widget-help font-italic">
<template v-if="missingBranch"> <template v-if="missingBranch">
{{ missingBranchInfo }} {{ missingBranchInfo }}
</template> </template>
......
...@@ -18,8 +18,8 @@ export default { ...@@ -18,8 +18,8 @@ export default {
Deployment, Deployment,
MrWidgetContainer, MrWidgetContainer,
MrWidgetPipeline, MrWidgetPipeline,
MergeTrainInfo: () => MergeTrainPositionIndicator: () =>
import('ee_component/vue_merge_request_widget/components/merge_train_info.vue'), import('ee_component/vue_merge_request_widget/components/merge_train_position_indicator.vue'),
}, },
props: { props: {
mr: { mr: {
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
showVisualReviewAppLink() { showVisualReviewAppLink() {
return this.mr.visualReviewAppAvailable; return this.mr.visualReviewAppAvailable;
}, },
showMergeTrainInfo() { showMergeTrainPositionIndicator() {
return _.isNumber(this.mr.mergeTrainIndex); return _.isNumber(this.mr.mergeTrainIndex);
}, },
}, },
...@@ -90,8 +90,8 @@ export default { ...@@ -90,8 +90,8 @@ export default {
:visual-review-app-meta="visualReviewAppMeta" :visual-review-app-meta="visualReviewAppMeta"
/> />
</div> </div>
<merge-train-info <merge-train-position-indicator
v-if="showMergeTrainInfo" v-if="showMergeTrainPositionIndicator"
class="mr-widget-extension" class="mr-widget-extension"
:merge-train-index="mr.mergeTrainIndex" :merge-train-index="mr.mergeTrainIndex"
/> />
......
...@@ -31,6 +31,9 @@ export default class MergeRequestStore { ...@@ -31,6 +31,9 @@ export default class MergeRequestStore {
this.targetBranchSha = data.target_branch_sha; this.targetBranchSha = data.target_branch_sha;
this.sourceBranch = data.source_branch; this.sourceBranch = data.source_branch;
this.sourceBranchProtected = data.source_branch_protected; this.sourceBranchProtected = data.source_branch_protected;
this.conflictsDocsPath = data.conflicts_docs_path;
this.mergeRequestPipelinesHelpPath = data.merge_request_pipelines_docs_path;
this.mergeTrainWhenPipelineSucceedsDocsPath = data.merge_train_when_pipeline_succeeds_docs_path;
this.mergeStatus = data.merge_status; this.mergeStatus = data.merge_status;
this.commitMessage = data.default_merge_commit_message; this.commitMessage = data.default_merge_commit_message;
this.shortMergeCommitSha = data.short_merge_commit_sha; this.shortMergeCommitSha = data.short_merge_commit_sha;
......
...@@ -397,7 +397,6 @@ ...@@ -397,7 +397,6 @@
.mr-widget-help { .mr-widget-help {
padding: 10px 16px 10px ($gl-padding-8 * 7); padding: 10px 16px 10px ($gl-padding-8 * 7);
font-style: italic;
} }
.ci-coverage { .ci-coverage {
...@@ -906,7 +905,7 @@ ...@@ -906,7 +905,7 @@
} }
.deploy-heading, .deploy-heading,
.merge-train-info { .merge-train-position-indicator {
@include media-breakpoint-up(md) { @include media-breakpoint-up(md) {
padding: $gl-padding-8 $gl-padding; padding: $gl-padding-8 $gl-padding;
} }
......
...@@ -233,6 +233,8 @@ export default { ...@@ -233,6 +233,8 @@ export default {
'http://localhost:3000/root/acets-app/commit/53027d060246c8f47e4a9310fb332aa52f221775', 'http://localhost:3000/root/acets-app/commit/53027d060246c8f47e4a9310fb332aa52f221775',
troubleshooting_docs_path: 'help', troubleshooting_docs_path: 'help',
merge_request_pipelines_docs_path: '/help/ci/merge_request_pipelines/index.md', merge_request_pipelines_docs_path: '/help/ci/merge_request_pipelines/index.md',
merge_train_when_pipeline_succeeds_docs_path:
'/help/ci/merge_request_pipelines/pipelines_for_merged_results/merge_trains/#startadd-to-merge-train-when-pipeline-succeeds',
squash: true, squash: true,
visual_review_app_available: true, visual_review_app_available: true,
merge_trains_enabled: true, merge_trains_enabled: true,
......
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