mirror of
https://github.com/dergigi/boris.git
synced 2026-02-11 18:14:31 +01:00
debug: add detailed logging to highlight application useEffect
- Log when useEffect is triggered - Log contentRef status, relevant highlights count, and html presence - Log specific reason when skipping highlight application - This will help identify why highlights aren't being applied to DOM
This commit is contained in:
@@ -85,7 +85,18 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
|
||||
|
||||
// Apply highlights after DOM is rendered
|
||||
useEffect(() => {
|
||||
if (!contentRef.current || relevantHighlights.length === 0) return
|
||||
console.log('🔍 useEffect triggered:', {
|
||||
hasContentRef: !!contentRef.current,
|
||||
relevantHighlightsCount: relevantHighlights.length,
|
||||
hasHtml: !!html
|
||||
})
|
||||
|
||||
if (!contentRef.current || relevantHighlights.length === 0) {
|
||||
console.log('⚠️ Skipping highlight application:', {
|
||||
reason: !contentRef.current ? 'no contentRef' : 'no relevant highlights'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
console.log('🔍 Applying highlights to rendered DOM:', {
|
||||
highlightsCount: relevantHighlights.length,
|
||||
|
||||
Reference in New Issue
Block a user