mirror of
https://github.com/layer-systems/website.git
synced 2026-09-12 21:53:40 +02:00
Address review feedback on nested reply threading
- Remove invalid aria-setsize={-1}; the real set size isn't tracked here.
- Make aria-expanded an explicit boolean and keep aria-controls consistent
across active/inactive Reply buttons.
- Fix cycle field docstring to match its boolean type.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BYiUtZMQeA5RHggQw73wto
This commit is contained in:
@@ -334,7 +334,6 @@ function ThreadNode({
|
||||
<div
|
||||
role="treeitem"
|
||||
aria-level={depth}
|
||||
aria-setsize={-1}
|
||||
aria-expanded={node.children.length > 0 ? true : undefined}
|
||||
className={cn(
|
||||
!isRootReply &&
|
||||
|
||||
@@ -74,8 +74,8 @@ export function NoteCard({ event, compact, onReply, replyOpen, className }: Note
|
||||
size="sm"
|
||||
className="h-7 gap-1.5 px-2 text-xs text-muted-foreground"
|
||||
onClick={() => onReply(event)}
|
||||
aria-expanded={replyOpen}
|
||||
aria-controls={replyOpen ? 'reply-composer' : undefined}
|
||||
aria-expanded={!!replyOpen}
|
||||
aria-controls="reply-composer"
|
||||
>
|
||||
<MessageSquareReply className="size-3.5" aria-hidden />
|
||||
Reply
|
||||
|
||||
@@ -144,7 +144,7 @@ export interface ReplyNode {
|
||||
children: ReplyNode[];
|
||||
/** True when the event landed here as a fallback, not via its NIP-10 tags. */
|
||||
misplaced: boolean;
|
||||
/** Depth of the cycle this event is part of, when its chain loops. */
|
||||
/** Whether this event's chain loops back on itself. */
|
||||
cycle?: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user