fix(editor): preserve code languages in Live imports - #9816
Conversation
Use a zeed-dom-compatible lookup when Plane Live converts API-authored HTML into Yjs state, and cover the complete conversion round trip.
◈ PR Lens
Architecture 2 components touched across 2 lanes. Data flow
View
Tip The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change. 🪧 More tips
Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Plane Live now preserves code-block language metadata when it imports HTML into Yjs. The server-side DOM implementation does not populate
firstElementChildas the browser does, solanguage-*classes were dropped during the first collaborative-editor load even when the submitted HTML was correct.This is useful for every syntax-highlighted code block and lets the Mermaid renderer in #9787 recognize agent-authored
language-mermaidblocks after Live conversion.Type of Change
Screenshots and Media (if applicable)
Not applicable; this fixes server-side document conversion.
Test Scenarios
language-mermaid.pnpm turbo run build --filter=live(10/10 tasks).language="mermaid"for state, flowchart, and sequence diagrams.References
Related: #9787