feat(task): move new comment form to match sort order
When comments are sorted newest first, the new comment form now appears above the list rather than below it, keeping the input close to the most recent comments.
This commit is contained in:
parent
cf1273c1d9
commit
0a8cf36714
|
|
@ -146,6 +146,7 @@
|
|||
<div
|
||||
v-if="canWrite"
|
||||
class="media comment d-print-none"
|
||||
:class="{'new-comment-top': commentSortOrder === 'desc'}"
|
||||
>
|
||||
<figure class="media-left is-hidden-mobile">
|
||||
<img
|
||||
|
|
@ -656,6 +657,23 @@ function getCommentUrl(commentId: string) {
|
|||
}
|
||||
}
|
||||
|
||||
.comments {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.new-comment-top {
|
||||
order: -1;
|
||||
// Override the top separator inherited from .media + .media (DOM order places this last)
|
||||
border-block-start: none;
|
||||
margin-block-start: 0;
|
||||
padding-block-start: 0;
|
||||
// Provide the separator on the bottom side instead, toward the first existing comment
|
||||
border-block-end: 1px solid rgba(var(--border-rgb), 0.5);
|
||||
margin-block-end: 1rem;
|
||||
padding-block-end: 1rem;
|
||||
}
|
||||
|
||||
.comments-container {
|
||||
scroll-margin-block-start: 4rem;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue