codeant-ai-for-open-source[bot] commented on code in PR #44414:
URL: https://github.com/apache/superset/pull/44414#discussion_r4044125757


##########
superset-frontend/src/utils/downloadAsImage.tsx:
##########
@@ -183,9 +199,25 @@ const processCloneForVisibility = (clone: HTMLElement) => {
   scrollableSelectors.forEach(selector => {
     clone.querySelectorAll(selector).forEach(el => {
       const element = el as HTMLElement;
-      element.style.overflow = 'visible';
       element.style.height = 'auto';
       element.style.maxHeight = 'none';
+      if (!clipsOverflow(element)) return;
+      if (clipHorizontalOverflow) {
+        // The vertical axis stays unclipped so the whole chart paints while 
the
+        // grid reflows around its now auto-height slot. The horizontal axis 
keeps
+        // its clip: the clone preserves every element's on-screen pixel 
width, so
+        // a table that scrolls sideways would otherwise paint its off-slot 
columns
+        // across the charts sitting next to it in the same dashboard row.
+        // `clip` rather than `hidden`, because `hidden` paired with `visible` 
is
+        // not a legal computed combination: the engine promotes the `visible` 
axis
+        // to `auto` and clips that one too. `clip` paired with `visible` 
clips a
+        // single axis and leaves the element a non-scroll-container, so 
nothing
+        // but the sideways bleed changes.
+        element.style.overflowX = 'clip';
+        element.style.overflowY = 'visible';

Review Comment:
   **Suggestion:** Dashboard exports make every matching clipped element 
vertically visible, including chart header titles that rely on hidden overflow 
for ellipsis, allowing labels to bleed outside their chart.
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Often` ยท ๐Ÿท๏ธ `Logic error`
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=c41df96bf5644fe0975f409d356bcb82&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=c41df96bf5644fe0975f409d356bcb82&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent ๐Ÿค– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset-frontend/src/utils/downloadAsImage.tsx
   **Line:** 217:217
   **Comment:**
        *Logic Error: Dashboard exports make every matching clipped element 
vertically visible, including chart header titles that rely on hidden overflow 
for ellipsis, allowing labels to bleed outside their chart.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44414&comment_hash=529b93dec1c351d2659f0d300741672e385f33f70c057b9408fdb73717ef5366&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44414&comment_hash=529b93dec1c351d2659f0d300741672e385f33f70c057b9408fdb73717ef5366&reaction=dislike'>๐Ÿ‘Ž</a>



-- 
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