ui:update findpreview and commentlist

This commit is contained in:
2025-11-22 11:39:18 +01:00
parent 63b3e5112b
commit 42d7246cff
4 changed files with 21 additions and 11 deletions

View File

@@ -75,7 +75,6 @@
<style>
.comment-form {
padding: 0.75rem 1rem;
border-top: 1px solid hsl(var(--border));
background: hsl(var(--background));
flex-shrink: 0;
}

View File

@@ -92,6 +92,12 @@
{#if isExpanded}
<div class="comments-container">
{#if showCommentForm}
<div class="comment-form-container">
<CommentForm onSubmit={handleAddComment} />
</div>
{/if}
{#if $commentsState.isLoading && !hasLoadedComments}
{@render loadingSkeleton()}
{:else if $commentsState.error}
@@ -119,10 +125,6 @@
{/if}
</div>
{/if}
{#if showCommentForm}
<CommentForm onSubmit={handleAddComment} />
{/if}
</div>
{/if}
</div>
@@ -148,14 +150,21 @@
}
.comments-container {
border-top: 1px solid hsl(var(--border));
margin-top: 0.5rem;
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
}
.comment-form-container {
flex-shrink: 0;
border-bottom: 1px solid hsl(var(--border));
position: sticky;
top: 0;
background: hsl(var(--background));
z-index: 1;
}
.comments {
padding: 0.75rem 0;
}
@@ -165,6 +174,7 @@
overflow-y: auto;
padding: 0.75rem 1rem;
min-height: 0;
max-height: 300px;
}
.see-more {

View File

@@ -151,7 +151,7 @@
<CommentsList
findId={id}
{currentUserId}
collapsed={false}
collapsed={true}
maxComments={5}
showCommentForm={true}
/>

View File

@@ -260,6 +260,7 @@
<CommentsList
findId={find.id}
{currentUserId}
collapsed={false}
isScrollable={true}
showCommentForm={true}
/>
@@ -307,7 +308,8 @@
width: 100%;
min-width: 0;
max-width: none;
height: 90vh;
height: auto;
max-height: calc(90vh - 20px);
border-radius: 16px 16px 0 0;
animation: slideUp 0.3s ease-out;
}
@@ -534,7 +536,6 @@
gap: 0.5rem;
color: hsl(var(--muted-foreground));
font-size: 0.875rem;
margin-bottom: 1.5rem;
}
.actions {
@@ -588,7 +589,7 @@
flex-direction: column;
background: rgba(255, 255, 255, 0.5);
max-height: 400px;
overflow-y: auto;
overflow: hidden;
}
/* Mobile specific adjustments */