Release v0.3.1
- Feed bounded context with DDD implementation (Phases 1-5) - Domain event handlers for cross-context coordination - Fix Blossom media upload setting persistence - Fix wallet connection persistence on page reload - New branding assets and icons - Vitest testing infrastructure with 151 domain model tests - Help page scaffolding - Keyboard navigation provider 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import { useSecondaryPage } from '@/PageManager'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Skeleton } from '@/components/ui/skeleton'
|
||||
import { useKeyboardNavigable } from '@/hooks/useKeyboardNavigable'
|
||||
import { useThread } from '@/hooks/useThread'
|
||||
import { getEventKey, isMentioningMutedUsers } from '@/lib/event'
|
||||
import { toNote } from '@/lib/link'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useContentPolicy } from '@/providers/ContentPolicyProvider'
|
||||
import { TNavigationColumn } from '@/providers/KeyboardNavigationProvider'
|
||||
import { useMuteList } from '@/providers/MuteListProvider'
|
||||
import { useScreenSize } from '@/providers/ScreenSizeProvider'
|
||||
import { useUserTrust } from '@/providers/UserTrustProvider'
|
||||
@@ -29,13 +31,17 @@ export default function ReplyNote({
|
||||
parentEventId,
|
||||
onClickParent = () => {},
|
||||
highlight = false,
|
||||
className = ''
|
||||
className = '',
|
||||
navColumn,
|
||||
navIndex
|
||||
}: {
|
||||
event: Event
|
||||
parentEventId?: string
|
||||
onClickParent?: () => void
|
||||
highlight?: boolean
|
||||
className?: string
|
||||
navColumn?: TNavigationColumn
|
||||
navIndex?: number
|
||||
}) {
|
||||
const { t } = useTranslation()
|
||||
const { isSmallScreen } = useScreenSize()
|
||||
@@ -46,6 +52,13 @@ export default function ReplyNote({
|
||||
const eventKey = useMemo(() => getEventKey(event), [event])
|
||||
const replies = useThread(eventKey)
|
||||
const [showMuted, setShowMuted] = useState(false)
|
||||
|
||||
// Keyboard navigation
|
||||
const { ref: navRef, isSelected } = useKeyboardNavigable(
|
||||
navColumn ?? 2,
|
||||
navIndex ?? 0,
|
||||
{ meta: { type: 'note', event } }
|
||||
)
|
||||
const show = useMemo(() => {
|
||||
if (showMuted) {
|
||||
return true
|
||||
@@ -79,9 +92,11 @@ export default function ReplyNote({
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={navRef}
|
||||
className={cn(
|
||||
'relative pb-3 transition-colors duration-500 clickable',
|
||||
'relative pb-3 transition-colors duration-500 clickable scroll-mt-[6.5rem]',
|
||||
highlight ? 'bg-primary/40' : '',
|
||||
isSelected && 'ring-2 ring-primary ring-inset',
|
||||
className
|
||||
)}
|
||||
onClick={() => push(toNote(event))}
|
||||
|
||||
Reference in New Issue
Block a user