Skip to content

fix(ui): render graph labels without remote font fetches#496

Open
77652189 wants to merge 1 commit into
DeusData:mainfrom
77652189:fix-embedded-ui-font-fetch
Open

fix(ui): render graph labels without remote font fetches#496
77652189 wants to merge 1 commit into
DeusData:mainfrom
77652189:fix-embedded-ui-font-fetch

Conversation

@77652189

Copy link
Copy Markdown

Summary

  • replace graph node labels from @react-three/drei's Text with canvas-backed Three.js sprites so label rendering does not trigger troika's runtime font fetch path
  • remove Google Fonts links from the embedded UI HTML so the graph UI has no external font/link loads
  • keep label selection behavior unchanged: highlighted nodes first, otherwise top nodes by size

Closes #453

Testing

  • npm run build
  • rg -n 'cdn\.jsdelivr\.net|troika-three-text|unicodeFontsURL|fonts\.gstatic|fonts\.googleapis' graph-ui\dist graph-ui\src graph-ui\index.html (no matches)
  • rg -n 'https?://' graph-ui\index.html graph-ui\src graph-ui\dist\index.html (no matches)
  • Playwright smoke test against vite preview with mocked graph data: canvas rendered non-blank (non_background_pixels=11799) and recorded externalRequests=[]

Signed-off-by: Nan <630971265@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Graph UI: embedded UI makes runtime CDN requests via troika-three-text, breaks rendering when CDN is blocked

1 participant