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


##########
superset-frontend/plugins/plugin-chart-country-map/src/CountryMap.ts:
##########
@@ -244,13 +244,11 @@ function CountryMap(element: HTMLElement, props: 
CountryMapProps) {
   };
 
   const updatePopupPosition = (): void => {
-    const svgHeight = svg.node().getBoundingClientRect().height;
     const [x, y] = d3.mouse(svg.node());
     hoverPopup
       .style('display', 'block')
       .style('top', `${y + 30}px`)
-      .style('left', `${x}px`)
-      .classed('popup-at-bottom', y > (svgHeight * 2) / 3);
+      .style('left', `${x}px`);

Review Comment:
   **Suggestion:** Near the chart’s right edge, `left` uses the cursor’s x 
coordinate without accounting for popup width, so the popup extends beyond the 
chart.
   
   **Assessment:** 🟠 `Major` · 🔁 `Occurrence: Sometimes` · 🏷️ `Css layout issue`
   
   [![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=6c47f8e7df35487ba6612c7eec8d3a41&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=6c47f8e7df35487ba6612c7eec8d3a41&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/plugins/plugin-chart-country-map/src/CountryMap.ts
   **Line:** 251:251
   **Comment:**
        *Css Layout Issue: Near the chart’s right edge, `left` uses the 
cursor’s x coordinate without accounting for popup width, so the popup extends 
beyond the 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%2F45000&comment_hash=8bbc95701054af0ae0a4e28aacefa75b250d64283711b344d052d913055f0d4d&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45000&comment_hash=8bbc95701054af0ae0a4e28aacefa75b250d64283711b344d052d913055f0d4d&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