-
-
Notifications
You must be signed in to change notification settings - Fork 573
add exception copy to clipboard #8034
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
Conversation
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.
Pull Request Overview
This PR enhances the autoreload exception handler by adding a copy-to-clipboard button to error alerts, and includes a unit test for the new button.
- Introduces
_create_copy_buttonto generate aButtonIconwith clipboard functionality - Updates
autoreload_handle_exceptionto wrap alerts and the copy button in a relative container - Adds
test_create_copy_buttonto validate the new widget’s basic properties
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| panel/io/handlers.py | Implements _create_copy_button, integrates it into exception UI with styling and JS callback |
| panel/tests/io/test_handlers.py | Imports private helper and adds test_create_copy_button to assert icon and positioning |
Comments suppressed due to low confidence (2)
panel/tests/io/test_handlers.py:212
- [nitpick] The test only verifies the 'position' style. Consider adding assertions for other critical properties (top, right, z-index, background-color, etc.) and checking that the
js_on_clickcallback is attached correctly to improve coverage.
assert styles['position'] == 'absolute'
panel/io/handlers.py:285
- The CSS variable includes an extra colon inside
var(). It should bevar(--panel-surface-color)(without the trailing colon) to apply correctly.
'background-color': 'var(--panel-surface-color:)',
|
I've removed the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8034 +/- ##
==========================================
+ Coverage 86.03% 87.08% +1.04%
==========================================
Files 346 346
Lines 53475 53493 +18
==========================================
+ Hits 46008 46584 +576
+ Misses 7467 6909 -558 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Closing #8019
Visual test