fix: update initial state of CommentThreads to collapsed and refine styles for better visibility

This commit is contained in:
Nalvazhuthi 2025-05-22 16:10:19 +05:30
parent b5edb3f572
commit bbf0a6d86a
3 changed files with 33 additions and 8 deletions

View File

@ -2,7 +2,7 @@ import React, { useState } from "react";
import { getAvatarColor } from "../../../modules/collaboration/functions/getAvatarColor"; import { getAvatarColor } from "../../../modules/collaboration/functions/getAvatarColor";
const CommentThreads: React.FC = () => { const CommentThreads: React.FC = () => {
const [expand, setExpand] = useState(true); const [expand, setExpand] = useState(false);
const commentsedUsers = [ const commentsedUsers = [
{ {
userId: "1", userId: "1",

View File

@ -45,4 +45,4 @@
// //
@use "./scene/scene"; @use "./scene/scene";
@use "./scene/comments"; @use "./scene/comments";

View File

@ -7,19 +7,21 @@
left: 50%; left: 50%;
padding: 4px; padding: 4px;
background: var(--background-color); background: var(--background-color);
border-radius: #{$border-radius-large} #{$border-radius-large} #{$border-radius-large} border-radius: #{$border-radius-large} #{$border-radius-large} #{$border-radius-large} 0;
0;
backdrop-filter: blur(12px); backdrop-filter: blur(12px);
z-index: 1000; z-index: 1000;
transform: translateY(-100%); transform: translateY(-100%);
outline: 1px solid var(--border-color); outline: 1px solid var(--border-color);
transition: all 0.2s ease-out; transition: all 0.2s ease-out;
.comments-threads-container { .comments-threads-container {
display: flex; display: flex;
align-items: start; align-items: start;
flex-direction: column; flex-direction: column;
.users-commented { .users-commented {
@include flex-center; @include flex-center;
.users { .users {
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
@ -28,35 +30,49 @@
border-radius: 50%; border-radius: 50%;
} }
} }
.last-comment-details { .last-comment-details {
display: flex; display: flex;
align-items: start; align-items: start;
flex-direction: column; flex-direction: column;
padding-top: 0; // padding-top: 0;
height: 0; // height: 0;
width: 0; // width: 0;
overflow: hidden; overflow: hidden;
transition: all 0.2s; transition: all 0.2s;
.header { .header {
@include flex-center; @include flex-center;
gap: 10px; gap: 10px;
.user-name { .user-name {
text-transform: capitalize; text-transform: capitalize;
} }
.time { .time {
font-size: var(--font-size-small); font-size: var(--font-size-small);
color: var(--input-text-color); color: var(--input-text-color);
} }
} }
.message { .message {
margin-top: 10px; margin-top: 10px;
} }
.replies { .replies {
margin-top: 10px; margin-top: 10px;
font-size: var(--font-size-small); font-size: var(--font-size-small);
color: var(--input-text-color); color: var(--input-text-color);
} }
.header,
.message,
.replies {
opacity: 0;
display: none;
}
} }
.expand { .expand {
min-width: 200px; min-width: 200px;
max-width: 260px; max-width: 260px;
@ -64,9 +80,18 @@
height: 100%; height: 100%;
} }
} }
.open { .open {
.users-commented { .users-commented {
padding: 12px; padding: 12px;
} }
.header,
.message,
.replies {
opacity: 1 !important;
display: flex !important;
}
} }
} }