Commit 66dae5ea authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '209770-design-comments-text-wrapping-behavior' into 'master'

Resolve "Design comments: Text wrapping behavior"

See merge request gitlab-org/gitlab!40359
parents 8298504f 48ddf84a
...@@ -102,12 +102,12 @@ export default { ...@@ -102,12 +102,12 @@ export default {
</a> </a>
<span class="note-headline-light note-headline-meta"> <span class="note-headline-light note-headline-meta">
<span class="system-note-message"> <slot></slot> </span> <span class="system-note-message"> <slot></slot> </span>
<template v-if="note.createdAt"> <a
<span class="system-note-separator"></span> class="note-timestamp system-note-separator gl-display-block gl-mb-2"
<a class="note-timestamp system-note-separator" :href="`#note_${noteAnchorId}`"> :href="`#note_${noteAnchorId}`"
<time-ago-tooltip :time="note.createdAt" tooltip-placement="bottom" /> >
</a> <time-ago-tooltip :time="note.createdAt" tooltip-placement="bottom" />
</template> </a>
</span> </span>
</div> </div>
<div class="gl-display-flex"> <div class="gl-display-flex">
......
---
title: 'Resolve Design comments: Text wrapping behavior'
merge_request: 40359
author:
type: fixed
...@@ -46,7 +46,16 @@ exports[`Design note component should match the snapshot 1`] = ` ...@@ -46,7 +46,16 @@ exports[`Design note component should match the snapshot 1`] = `
class="system-note-message" class="system-note-message"
/> />
<!----> <a
class="note-timestamp system-note-separator gl-display-block gl-mb-2"
href="#note_123"
>
<time-ago-tooltip-stub
cssclass=""
time="2019-07-26T15:02:20Z"
tooltipplacement="bottom"
/>
</a>
</span> </span>
</div> </div>
......
...@@ -15,6 +15,7 @@ const note = { ...@@ -15,6 +15,7 @@ const note = {
userPermissions: { userPermissions: {
adminNote: false, adminNote: false,
}, },
createdAt: '2019-07-26T15:02:20Z',
}; };
HTMLElement.prototype.scrollIntoView = scrollIntoViewMock; HTMLElement.prototype.scrollIntoView = scrollIntoViewMock;
...@@ -79,10 +80,7 @@ describe('Design note component', () => { ...@@ -79,10 +80,7 @@ describe('Design note component', () => {
it('should render a time ago tooltip if note has createdAt property', () => { it('should render a time ago tooltip if note has createdAt property', () => {
createComponent({ createComponent({
note: { note,
...note,
createdAt: '2019-07-26T15:02:20Z',
},
}); });
expect(wrapper.find(TimeAgoTooltip).exists()).toBe(true); expect(wrapper.find(TimeAgoTooltip).exists()).toBe(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