From d5d804b47f001e7cea197953127012ddf3352e4b Mon Sep 17 00:00:00 2001 From: Quentin Guidée Date: Thu, 22 Dec 2022 11:03:19 -0500 Subject: Refine file comments design MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Quentin Guidée --- apps/comments/src/components/Comment.vue | 156 +++++++++++++++++-------------- 1 file changed, 84 insertions(+), 72 deletions(-) (limited to 'apps/comments') diff --git a/apps/comments/src/components/Comment.vue b/apps/comments/src/components/Comment.vue index 062dda74756..df9a22a1709 100644 --- a/apps/comments/src/components/Comment.vue +++ b/apps/comments/src/components/Comment.vue @@ -24,75 +24,79 @@ :class="{'comment--loading': loading}" class="comment"> -
+
- {{ actorDisplayName }} - - - - - - - {{ t('comments', 'Cancel edit') }} - - - - -
- - -
- - -
- - - - +
+
+ {{ actorDisplayName }} + + + + + + + {{ t('comments', 'Cancel edit') }} + + + + +
+ + + +
+ + +
+ + + + +
+ + + + +
- - - - -
@@ -258,17 +262,29 @@ export default { $comment-padding: 10px; .comment { + display: flex; + gap: 16px; position: relative; - padding: $comment-padding 0 $comment-padding * 1.5; + padding: 5px $comment-padding; + + &__side { + display: flex; + align-items: flex-start; + padding-top: 16px; + } + + &__body { + display: flex; + flex-grow: 1; + flex-direction: column; + } &__header { display: flex; align-items: center; min-height: 44px; - padding: math.div($comment-padding, 2) 0; } - &__author, &__actions { margin-left: $comment-padding !important; } @@ -283,16 +299,11 @@ $comment-padding: 10px; &_loading, &__timestamp { margin-left: auto; + text-align: right; + white-space: nowrap; color: var(--color-text-maxcontrast); } - &__editor, - &__message { - position: relative; - // Avatar size, align with author name - padding-left: 32px + $comment-padding; - } - &__submit { position: absolute !important; right: 0; @@ -306,6 +317,7 @@ $comment-padding: 10px; word-break: break-word; max-height: 70px; overflow: hidden; + margin-top: -6px; &--expanded { max-height: none; overflow: visible; -- cgit v1.2.3