@@ -207,9 +207,9 @@ watch(isActiveComment, (active) => {
207207 }
208208});
209209
210- /* ── Step 3: Thread collapse (Google Docs pattern) ──
211- * >=3 replies → collapse: parent + first reply + "N more replies" + last reply
212- * <3 replies → show all
210+ /* ── Step 3: Thread collapse ──
211+ * >=2 replies → collapse: parent + "N more replies" + last reply
212+ * <2 replies → show all
213213 * Clicking "N more replies" or the card → expand all + activate
214214 * Deactivating → re-collapse
215215 */
@@ -218,27 +218,26 @@ const childComments = computed(() => comments.value.slice(1));
218218
219219const shouldCollapseThread = computed (() => {
220220 if (threadExpanded .value ) return false ;
221- return childComments .value .length >= 3 ;
221+ return childComments .value .length >= 2 ;
222222});
223223
224224const visibleComments = computed (() => {
225225 if (! shouldCollapseThread .value ) return comments .value ;
226- // Collapsed: parent + first reply + last reply
226+ // Collapsed: parent + last reply
227227 const parent = comments .value [0 ];
228- const first = childComments .value [0 ];
229228 const last = childComments .value [childComments .value .length - 1 ];
230- return [parent, first, last].filter (Boolean );
229+ return [parent, last].filter (Boolean );
231230});
232231
233232const collapsedReplyCount = computed (() => {
234233 if (! shouldCollapseThread .value ) return 0 ;
235- return childComments .value .length - 2 ; // first + last are shown
234+ return childComments .value .length - 1 ; // only last is shown
236235});
237236
238237const collapsedReplyAuthors = computed (() => {
239238 if (! shouldCollapseThread .value ) return [];
240- // Hidden = middle replies (first + last are visible)
241- const hidden = childComments .value .slice (1 , - 1 );
239+ // Hidden = all replies except last
240+ const hidden = childComments .value .slice (0 , - 1 );
242241 const seen = new Set ();
243242 return hidden
244243 .map ((c ) =>
@@ -543,9 +542,9 @@ watch(editingCommentId, (commentId) => {
543542 / >
544543 < / div>
545544 < div class = " reply-actions" >
546- < button class = " reply-btn-cancel" @click .stop .prevent = " handleCancel" > Cancel< / button>
545+ < button class = " sd-button reply-btn-cancel" @click .stop .prevent = " handleCancel" > Cancel< / button>
547546 < button
548- class = " reply-btn-primary"
547+ class = " sd-button primary reply-btn-primary"
549548 @click .stop .prevent = " handleAddComment"
550549 : disabled= " !hasTextContent"
551550 : class = " { 'is-disabled': !hasTextContent }"
@@ -669,8 +668,8 @@ watch(editingCommentId, (commentId) => {
669668 < / div>
670669 < / div>
671670
672- <!-- Thread collapse: after first reply (index 1 ), show " N more replies" -->
673- < template v- if = " shouldCollapseThread && index === 1 " >
671+ <!-- Thread collapse: after parent (index 0 ), show " N more replies" -->
672+ < template v- if = " shouldCollapseThread && index === 0 " >
674673 < div class = " comment-separator" >< / div>
675674 < div class = " collapsed-replies" @click .stop .prevent = " expandThread" >
676675 < div class = " collapsed-avatars" >
@@ -702,9 +701,9 @@ watch(editingCommentId, (commentId) => {
702701 / >
703702 < / div>
704703 < div class = " reply-actions" >
705- < button class = " reply-btn-cancel" @click .stop .prevent = " handleCancel" > Cancel< / button>
704+ < button class = " sd-button reply-btn-cancel" @click .stop .prevent = " handleCancel" > Cancel< / button>
706705 < button
707- class = " reply-btn-primary"
706+ class = " sd-button primary reply-btn-primary"
708707 @click .stop .prevent = " handleAddComment"
709708 : disabled= " !hasTextContent"
710709 : class = " { 'is-disabled': !hasTextContent }"
@@ -724,7 +723,7 @@ watch(editingCommentId, (commentId) => {
724723 flex- direction: column;
725724 padding: var (-- sd- comment- padding, 16px );
726725 border- radius: var (-- sd- comment- radius, 12px );
727- background- color: var (-- sd- comment- bg, #f5f5f5 );
726+ background- color: var (-- sd- comment- bg, #f3f6fd );
728727 border: 1px solid transparent;
729728 font- family: var (-- sd- ui- font- family, Arial, Helvetica, sans- serif);
730729 font- size: var (-- sd- comment- body- size, 14px );
@@ -740,7 +739,7 @@ watch(editingCommentId, (commentId) => {
740739 cursor: pointer;
741740}
742741.comments - dialog: not (.is - active): not (.is - resolved): hover {
743- background- color: var (-- sd- comment- bg- hover, #f2f2f2 );
742+ background- color: var (-- sd- comment- bg- hover, #f3f6fd );
744743}
745744.comments - dialog: not (.is - resolved): hover : deep (.overflow - menu ) {
746745 opacity: 1 ;
@@ -749,7 +748,7 @@ watch(editingCommentId, (commentId) => {
749748.comments - dialog .is - active {
750749 background- color: var (-- sd- comment- bg- active, #ffffff);
751750 border- color: var (-- sd- comment- border- active, #e0e0e0);
752- box- shadow: var (-- sd- comment- shadow, 0 4px 20px rgba (15 , 23 , 42 , 0.08 ));
751+ box- shadow: var (-- sd- comment- shadow, 0px 4px 12px 0px rgba (50 , 50 , 50 , 0.15 ));
753752 z- index: 10 ;
754753}
755754.comments - dialog .is - resolved {
@@ -967,7 +966,7 @@ watch(editingCommentId, (commentId) => {
967966 transition: background 150ms ;
968967}
969968.reply - btn- primary: hover {
970- background: var (-- sd- color - blue - 600 , #0f44cc );
969+ background: var (-- sd- action - primary - hover , #0f44cc );
971970}
972971.reply - btn- primary .is - disabled {
973972 background: var (-- sd- color- gray- 400 , #dbdbdb);
@@ -986,7 +985,7 @@ watch(editingCommentId, (commentId) => {
986985 justify- content: flex- end;
987986 width: 100 % ;
988987}
989- .sd - button {
988+ .comment - footer . sd - button {
990989 font- size: 12px ;
991990 margin- left: 5px ;
992991}
0 commit comments