iercan commented on a change in pull request #13157:
URL: https://github.com/apache/superset/pull/13157#discussion_r578337076
##########
File path: superset/utils/screenshots.py
##########
@@ -195,12 +195,34 @@ def resize_image(
class ChartScreenshot(BaseScreenshot):
thumbnail_type: str = "chart"
element: str = "chart-container"
- window_size: WindowSize = (800, 600)
- thumb_size: WindowSize = (800, 600)
+
+ def __init__(
+ self,
+ url: str,
+ digest: str,
+ window_size: Optional[WindowSize] = None,
+ thumb_size: Optional[WindowSize] = None,
+ ):
+ super().__init__(url, digest)
+ self.window_size = (
+ window_size or current_app.config["WEBDRIVER_WINDOW"]["slice"]
+ )
+ self.thumb_size = thumb_size or (800, 600)
Review comment:
If I didn't understand wrong, screenshots taken with resolution of
windows_size and resized to thumb_size(maybe to save space I'm not sure why). I
provided thumb_size same with window_size for reports so that they will not
shrink.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]