put comment input field on top when the newest activity is first (#4470)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2024-01-29 22:34:18 +05:00 committed by GitHub
parent f94089b7dd
commit 0d822f4096
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,7 +85,12 @@
bind:isNewestFirst
/>
</div>
<div class="p-activity select-text" id={activity.string.Activity}>
{#if isNewestFirst && showCommenInput}
<div class="ref-input newest-first">
<ActivityExtensionComponent kind="input" {extensions} props={{ object, boundary, focusIndex }} />
</div>
{/if}
<div class="p-activity select-text" id={activity.string.Activity} class:newest-first={isNewestFirst}>
{#if filteredMessages.length}
<Grid column={1} rowGap={0}>
{#each filteredMessages as message}
@ -102,8 +107,8 @@
</Grid>
{/if}
</div>
{#if showCommenInput}
<div class="ref-input">
{#if showCommenInput && !isNewestFirst}
<div class="ref-input oldest-first">
<ActivityExtensionComponent kind="input" {extensions} props={{ object, boundary, focusIndex }} />
</div>
{/if}
@ -111,12 +116,22 @@
<style lang="scss">
.ref-input {
flex-shrink: 0;
margin-top: 1.75rem;
&.newest-first {
margin-bottom: 1rem;
padding-top: 1rem;
}
&.oldest-first {
padding-bottom: 2.5rem;
}
}
.p-activity {
margin-top: 1.75rem;
&.newest-first {
padding-bottom: 1.75rem;
}
&:not(.newest-first) {
margin: 1.75rem 0;
}
}
.invisible {