betodealmeida commented on code in PR #24547:
URL: https://github.com/apache/superset/pull/24547#discussion_r1247034331
##########
superset/reports/schemas.py:
##########
@@ -208,10 +209,34 @@ class ReportSchedulePostSchema(Schema):
dump_default=None,
)
force_screenshot = fields.Boolean(dump_default=False)
+ custom_width = fields.Integer(
+ metadata={
+ "description": _("Custom width of the screenshot in pixels"),
+ "example": 1000,
+ },
+ allow_none=True,
+ required=False,
+ default=None,
+ )
+
+ @validates("custom_width")
+ def validate_custom_width(self, value: int) -> None: # pylint:
disable=no-self-use
Review Comment:
Good point, we currently show validation errors post-`POST`, but it would be
great to show client-side.
Since this is time sensitive I'm going to do that in a separate PR, though,
are you OK with that?
--
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]