Skip to content
Snippets Groups Projects
Commit 81f61e71 authored by Sascha Eggenberger's avatar Sascha Eggenberger :speech_balloon:
Browse files

Add highlight color to reply form if comment is highlighted

Changelog: changed
parent b87063fc
No related branches found
No related tags found
1 merge request!123626Add highlight color to reply form if comment is highlighted
......@@ -170,6 +170,7 @@ export default {
return {
'is-replying gl-pt-0!': this.isReplying,
'internal-note': this.isDiscussionInternal,
'public-note': !this.isDiscussionInternal,
'gl-pt-0!': !this.discussion.diff_discussion && this.isReplying,
};
},
......
......@@ -40,8 +40,9 @@
&:target,
&.target {
.timeline-content {
background: $line-target-blue !important;
.timeline-content,
+ .public-note.discussion-reply-holder {
background-color: $line-target-blue !important;
}
&.system-note .note-body .note-text.system-note-commit-list::after {
......
......@@ -177,6 +177,23 @@ describe('noteable_discussion component', () => {
expect(replyWrapper.exists()).toBe(true);
expect(replyWrapper.classes('internal-note')).toBe(true);
});
it('should add `public-note` class when the discussion is not internal', async () => {
const softCopyInternalNotes = [...discussionMock.notes];
const mockPublicNotes = softCopyInternalNotes.splice(0, 2);
mockPublicNotes[0].internal = false;
const mockDiscussion = {
...discussionMock,
notes: [...mockPublicNotes],
};
wrapper.setProps({ discussion: mockDiscussion });
await nextTick();
const replyWrapper = wrapper.find('[data-testid="reply-wrapper"]');
expect(replyWrapper.exists()).toBe(true);
expect(replyWrapper.classes('public-note')).toBe(true);
});
});
describe('for resolved thread', () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment