Commit fc519f04 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch 'sh-improve-merge-error-display' into 'master'

Fix unnecessarily escaped merge error text

See merge request gitlab-org/gitlab!44844
parents c4511844 a1cd31aa
...@@ -4,6 +4,7 @@ import MRWidgetStore from 'ee_else_ce/vue_merge_request_widget/stores/mr_widget_ ...@@ -4,6 +4,7 @@ import MRWidgetStore from 'ee_else_ce/vue_merge_request_widget/stores/mr_widget_
import MRWidgetService from 'ee_else_ce/vue_merge_request_widget/services/mr_widget_service'; import MRWidgetService from 'ee_else_ce/vue_merge_request_widget/services/mr_widget_service';
import MrWidgetApprovals from 'ee_else_ce/vue_merge_request_widget/components/approvals/approvals.vue'; import MrWidgetApprovals from 'ee_else_ce/vue_merge_request_widget/components/approvals/approvals.vue';
import stateMaps from 'ee_else_ce/vue_merge_request_widget/stores/state_maps'; import stateMaps from 'ee_else_ce/vue_merge_request_widget/stores/state_maps';
import { GlSafeHtmlDirective } from '@gitlab/ui';
import { sprintf, s__, __ } from '~/locale'; import { sprintf, s__, __ } from '~/locale';
import Project from '~/pages/projects/project'; import Project from '~/pages/projects/project';
import SmartInterval from '~/smart_interval'; import SmartInterval from '~/smart_interval';
...@@ -52,6 +53,9 @@ export default { ...@@ -52,6 +53,9 @@ export default {
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/25 // False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/25
// eslint-disable-next-line @gitlab/require-i18n-strings // eslint-disable-next-line @gitlab/require-i18n-strings
name: 'MRWidget', name: 'MRWidget',
directives: {
SafeHtml: GlSafeHtmlDirective,
},
components: { components: {
Loading, Loading,
'mr-widget-header': WidgetHeader, 'mr-widget-header': WidgetHeader,
...@@ -510,7 +514,7 @@ export default { ...@@ -510,7 +514,7 @@ export default {
</mr-widget-alert-message> </mr-widget-alert-message>
<mr-widget-alert-message v-if="mr.mergeError" type="danger"> <mr-widget-alert-message v-if="mr.mergeError" type="danger">
{{ mergeError }} <span v-safe-html="mergeError"></span>
</mr-widget-alert-message> </mr-widget-alert-message>
<source-branch-removal-status v-if="shouldRenderSourceBranchRemovalStatus" /> <source-branch-removal-status v-if="shouldRenderSourceBranchRemovalStatus" />
......
---
title: Fix unnecessarily escaped merge error text
merge_request: 44844
author:
type: fixed
...@@ -4,6 +4,7 @@ import GroupedMetricsReportsApp from 'ee/vue_shared/metrics_reports/grouped_metr ...@@ -4,6 +4,7 @@ import GroupedMetricsReportsApp from 'ee/vue_shared/metrics_reports/grouped_metr
import reportsMixin from 'ee/vue_shared/security_reports/mixins/reports_mixin'; import reportsMixin from 'ee/vue_shared/security_reports/mixins/reports_mixin';
import { componentNames } from 'ee/reports/components/issue_body'; import { componentNames } from 'ee/reports/components/issue_body';
import MrWidgetLicenses from 'ee/vue_shared/license_compliance/mr_widget_license_report.vue'; import MrWidgetLicenses from 'ee/vue_shared/license_compliance/mr_widget_license_report.vue';
import { GlSafeHtmlDirective } from '@gitlab/ui';
import ReportSection from '~/reports/components/report_section.vue'; import ReportSection from '~/reports/components/report_section.vue';
import BlockingMergeRequestsReport from './components/blocking_merge_requests/blocking_merge_requests_report.vue'; import BlockingMergeRequestsReport from './components/blocking_merge_requests/blocking_merge_requests_report.vue';
...@@ -22,6 +23,9 @@ export default { ...@@ -22,6 +23,9 @@ export default {
GroupedMetricsReportsApp, GroupedMetricsReportsApp,
ReportSection, ReportSection,
}, },
directives: {
SafeHtml: GlSafeHtmlDirective,
},
extends: CEWidgetOptions, extends: CEWidgetOptions,
mixins: [reportsMixin], mixins: [reportsMixin],
componentNames, componentNames,
...@@ -384,7 +388,7 @@ export default { ...@@ -384,7 +388,7 @@ export default {
</mr-widget-alert-message> </mr-widget-alert-message>
<mr-widget-alert-message v-if="mr.mergeError" type="danger"> <mr-widget-alert-message v-if="mr.mergeError" type="danger">
{{ mergeError }} <span v-safe-html="mergeError"></span>
</mr-widget-alert-message> </mr-widget-alert-message>
<source-branch-removal-status v-if="shouldRenderSourceBranchRemovalStatus" /> <source-branch-removal-status v-if="shouldRenderSourceBranchRemovalStatus" />
......
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