Fix bug UpdateComment, Fix styling on Comment

- There was a bug that updates to comments were not being displayed
because of a v-show... https://vuejs.org/v2/guide/conditional.html#v-if-vs-v-show
Basically, what it says that is important for this bug is
"v-if...ensures that event listeners and child components inside the
conditional block are properly destroyed and re-created during toggles"

- Since we are using the editor to display comments in ContentViewer, we
need to set the min-height to 0px

- Co-authored-by: Alina Beck <alina.beck@mail.com>
- Co-authored-by: Robert Schäfer <git@roschaefer.de>
This commit is contained in:
mattwr18 2019-09-25 13:39:18 +02:00
parent db9810b436
commit 0f40df7cb4
2 changed files with 6 additions and 2 deletions

View File

@ -11,7 +11,7 @@
</div>
<div v-else :class="{ comment: true, 'disabled-content': comment.deleted || comment.disabled }">
<ds-card :id="`commentId-${comment.id}`">
<ds-space margin-bottom="small" margin-top="base">
<ds-space margin-bottom="small" margin-top="small">
<hc-user :user="author" :date-time="comment.createdAt" />
<!-- Content Menu (can open Modals) -->
<client-only>
@ -37,7 +37,7 @@
@collapse="isCollapsed = true"
/>
</div>
<div v-show="!openEditCommentMenu">
<div v-else>
<content-viewer
v-if="$filters.removeHtml(comment.content).length < 180"
:content="comment.content"

View File

@ -189,6 +189,10 @@ export default {
margin-top: $space-small;
position: relative;
}
.ProseMirror {
min-height: 0px;
}
}
.ds-card-image {