yaooqinn opened a new pull request, #54482:
URL: https://github.com/apache/spark/pull/54482

   ### What changes were proposed in this pull request?
   
   This is a follow-up fix for #53864. Replace the initial `viewBox` attribute 
with `width` and `height` on the SQL plan SVG element.
   
   ### Why are the changes needed?
   
   Setting `viewBox` before dagre-d3 renders the graph changes the SVG 
coordinate system, which affects how dagre-d3 positions elements. This causes 
display issues as reported by @pan3793 in 
https://github.com/apache/spark/pull/53864#issuecomment-3889339344.
   
   Using `width` and `height` instead gives a large initial canvas (preventing 
the tiny default render — the original intent of #53864) without altering the 
coordinate system that dagre-d3 depends on. The `resizeSvg()` function still 
correctly sets the final `viewBox`, `width`, and `height` after rendering 
completes.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, fixes the SQL plan visualization display regression introduced by 
#53864.
   
   ### How was this patch tested?
   
   Tested in Chrome DevTools.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Yes, GitHub Copilot was used.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to