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


##########
superset/config.py:
##########
@@ -797,7 +797,7 @@ class D3TimeFormat(TypedDict, total=False):
 # Event that Playwright waits for when loading a new page
 # Possible values: "load", "commit", "domcontentloaded", "networkidle"
 # Docs: 
https://playwright.dev/python/docs/api/class-page#page-goto-option-wait-until
-SCREENSHOT_PLAYWRIGHT_WAIT_EVENT = "load"
+SCREENSHOT_PLAYWRIGHT_WAIT_EVENT = "domcontentloaded"

Review Comment:
   ### Premature Screenshot Capture <sub>![category 
Functionality](https://img.shields.io/badge/Functionality-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   Changing to 'domcontentloaded' might lead to incomplete screenshots as it 
doesn't wait for all page resources to be loaded.
   
   
   ###### Why this matters
   Screenshots taken after only the DOM is loaded might miss dynamically loaded 
content, charts, or visualizations that are loaded after the DOM content is 
ready, potentially resulting in incomplete or blank screenshots.
   
   ###### Suggested change ∙ *Feature Preview*
   Consider adding an additional delay or event check to ensure charts are 
rendered before capturing screenshots:
   ```python
   # Wait for both DOM and network idle to ensure complete rendering
   SCREENSHOT_PLAYWRIGHT_WAIT_EVENT = ["domcontentloaded", "networkidle"]
   ```
   
   
   ###### 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/c5a1fd60-bd88-4715-8c10-25bc4e42adf9/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c5a1fd60-bd88-4715-8c10-25bc4e42adf9?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/c5a1fd60-bd88-4715-8c10-25bc4e42adf9?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/c5a1fd60-bd88-4715-8c10-25bc4e42adf9?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c5a1fd60-bd88-4715-8c10-25bc4e42adf9)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:bec7542e-6420-493c-9106-8d60459e81f8 -->
   
   
   [](bec7542e-6420-493c-9106-8d60459e81f8)



-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to