File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export const JsonDocRenderer = ({
5757 ) }
5858 { /* Page title */ }
5959 { page . properties ?. title && (
60- < h1 className = "json-doc-page-title" >
60+ < h1 className = "json-doc-page-title" data-page-id = { page . id } >
6161 { page . properties . title . title ?. [ 0 ] ?. plain_text || "Untitled" }
6262 </ h1 >
6363 ) }
@@ -106,7 +106,6 @@ export const JsonDocRenderer = ({
106106 < div className = { `json-doc-renderer ${ className } ` } >
107107 { viewJson ? (
108108 < div className = "flex h-screen" >
109- < div className = "w-1/2 overflow-y-auto" > { renderedContent } </ div >
110109 < JsonViewPanel data = { page } />
111110 </ div >
112111 ) : (
Original file line number Diff line number Diff line change @@ -130,12 +130,14 @@ export function processBackref(backref: Backref): HTMLSpanElement | null {
130130/**
131131 * Processes a backref that targets a page title
132132 */
133- export function processPageTitleBackref ( backref : Backref ) : HTMLSpanElement | null {
133+ export function processPageTitleBackref (
134+ backref : Backref
135+ ) : HTMLSpanElement | null {
134136 // Find the specific page title element using data-page-id
135137 const pageTitleElement = document . querySelector (
136138 `[data-page-id="${ backref . page_id } "]`
137139 ) ;
138-
140+
139141 if ( ! pageTitleElement ) {
140142 return null ;
141143 }
Original file line number Diff line number Diff line change 1+ - page title highlighting work
2+ - block highlighting should work
3+ - invalid backref shouldn't trigger highlighting
4+ - incorrect block page number shouldn't break the rendering
5+ - make sure all blocks are rendered
6+ - make sure numbered lists are correctly labeled
7+ - make sure bad page is gracefully handled
8+ - invalid block type should show error block UI
You can’t perform that action at this time.
0 commit comments