Commit 04706487 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch '230841-update-alert-gfm-like-reference' into 'master'

Update alert GFM reference in highlight bar

See merge request gitlab-org/gitlab!43104
parents 84d76ca2 5cb97624
<script>
import { GlLink, GlTooltipDirective, GlSprintf } from '@gitlab/ui';
import { GlLink, GlTooltipDirective } from '@gitlab/ui';
import { formatDate } from '~/lib/utils/datetime_utility';
export default {
components: {
GlLink,
GlSprintf,
},
directives: {
GlTooltip: GlTooltipDirective,
......@@ -26,16 +25,12 @@ export default {
<template>
<div
class="gl-border-solid gl-border-1 gl-border-gray-100 gl-p-5 gl-mb-3 gl-rounded-base gl-display-flex gl-justify-content-space-between"
class="gl-border-solid gl-border-1 gl-border-gray-100 gl-p-5 gl-mb-3 gl-rounded-base gl-display-flex gl-justify-content-space-between gl-xs-flex-direction-column"
>
<div class="gl-pr-3">
<span class="gl-font-weight-bold">{{ s__('HighlightBar|Original alert:') }}</span>
<gl-link v-gl-tooltip :title="alert.title" :href="alert.detailsUrl">
<gl-sprintf :message="__('Alert #%{alertId}')">
<template #alertId>
<span>{{ alert.iid }}</span>
</template>
</gl-sprintf>
#{{ alert.iid }}
</gl-link>
</div>
......
---
title: Surface Alert number GFM reference in highlight bar
merge_request: 42832
title: Update alert GFM reference in highlight bar
merge_request: 43104
author:
type: changed
......@@ -2192,9 +2192,6 @@ msgid_plural "Alerts"
msgstr[0] ""
msgstr[1] ""
msgid "Alert #%{alertId}"
msgstr ""
msgid "AlertManagement|Acknowledged"
msgstr ""
......
import { shallowMount } from '@vue/test-utils';
import { GlLink, GlSprintf } from '@gitlab/ui';
import { GlLink } from '@gitlab/ui';
import HighlightBar from '~/issue_show/components/incidents/highlight_bar.vue';
import { formatDate } from '~/lib/utils/datetime_utility';
......@@ -21,9 +21,6 @@ describe('Highlight Bar', () => {
propsData: {
alert,
},
stubs: {
GlSprintf,
},
});
};
......@@ -44,7 +41,7 @@ describe('Highlight Bar', () => {
expect(findLink().exists()).toBe(true);
expect(findLink().attributes('href')).toBe(alert.detailsUrl);
expect(findLink().attributes('title')).toBe(alert.title);
expect(findLink().text()).toBe(`Alert #${alert.iid}`);
expect(findLink().text()).toBe(`#${alert.iid}`);
});
it('renders formatted start time of the alert', () => {
......
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