-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: customize screenshot width for alerts/reports #24547
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24547 +/- ##
==========================================
+ Coverage 68.98% 69.08% +0.10%
==========================================
Files 1906 1906
Lines 74114 74157 +43
Branches 8155 8162 +7
==========================================
+ Hits 51124 51232 +108
+ Misses 20871 20806 -65
Partials 2119 2119
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
/testenv up FEATURE_ALERT_REPORTS = True |
@yousoph Container image not yet published for this PR. Please try again when build is complete. |
@yousoph Ephemeral environment creation failed. Please check the Actions logs for details. |
0c88517
to
6a358f5
Compare
6a358f5
to
e6edcde
Compare
/testenv up FEATURE_ALERT_REPORTS = True |
@yousoph Ephemeral environment spinning up at http://54.218.34.104:8080. Credentials are |
) | ||
|
||
@validates("custom_width") | ||
def validate_custom_width(self, value: int) -> None: # pylint: disable=no-self-use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add the same validation to the UI? With some danger text under the input or sth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
This PR is part 1 of 2. It adds a new input to the Alerts & Reports create/edit modals, as well as the report modal from charts and dashboards. In the new input users can configure a custom width for the screenshots
This PR updates the model, adds the migration to introduce a
custom_width
column (andcustom_height
, though it's not used), and add the affordances to set the custom width in the create/edit flows.The next PR will read the information from the DB and use it when running the alerts and reports.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
New:
TESTING INSTRUCTIONS
Create a few alerts & reports with custom width, then check the DB:
ADDITIONAL INFORMATION