fix: Formatting toolbar clipped on first comment in sidebar, closes #6841

This commit is contained in:
Tom Moor
2024-04-24 22:53:56 -04:00
parent cffd0be0cf
commit bf848f3a2f
3 changed files with 27 additions and 4 deletions

View File

@@ -42,6 +42,7 @@ function Comments() {
.threadsInDocument(document.id)
.filter((thread) => !thread.isNew || thread.createdById === user.id);
const hasComments = threads.length > 0;
const hasMultipleComments = comments.inDocument(document.id).length > 1;
return (
<Sidebar
@@ -50,8 +51,9 @@ function Comments() {
scrollable={false}
>
<Scrollable
bottomShadow={!focusedComment}
id="comments"
overflow={hasMultipleComments ? undefined : "initial"}
bottomShadow={!focusedComment}
hiddenScrollbars
topShadow
>