korbit-ai[bot] commented on code in PR #36051:
URL: https://github.com/apache/superset/pull/36051#discussion_r2508087871


##########
superset/utils/screenshot_utils.py:
##########
@@ -100,17 +100,17 @@ def take_tiled_screenshot(
             const el = document.querySelector(".{element_name}");
             const rect = el.getBoundingClientRect();
             return {{
+                width: el.scrollWidth
                 height: el.scrollHeight,
-                top: rect.top + window.scrollY,
                 left: rect.left + window.scrollX,
-                width: el.scrollWidth
+                top: rect.top + window.scrollY,
             }};

Review Comment:
   ### Missing comma in JavaScript object literal <sub>![category 
Functionality](https://img.shields.io/badge/Functionality-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   Missing comma after 'width: el.scrollWidth' in the JavaScript object literal 
returned by page.evaluate().
   
   
   ###### Why this matters
   This syntax error will cause the JavaScript evaluation to fail at runtime, 
preventing the function from obtaining the element dimensions needed for 
screenshot capture. The entire tiled screenshot functionality will break.
   
   ###### Suggested change ∙ *Feature Preview*
   Add a comma after 'width: el.scrollWidth':
   
   ```javascript
   return {
       width: el.scrollWidth,
       height: el.scrollHeight,
       left: rect.left + window.scrollX,
       top: rect.top + window.scrollY,
   };
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/635c770f-aaf4-4ebc-a722-5fb3f597a5f7/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/635c770f-aaf4-4ebc-a722-5fb3f597a5f7?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/635c770f-aaf4-4ebc-a722-5fb3f597a5f7?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/635c770f-aaf4-4ebc-a722-5fb3f597a5f7?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/635c770f-aaf4-4ebc-a722-5fb3f597a5f7)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:04fe6d4f-6d6e-4981-8bc7-9baed54858ed -->
   
   
   [](04fe6d4f-6d6e-4981-8bc7-9baed54858ed)



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