Merged
Conversation
…bug when clearing overlay)
…show_color_overlay, connect button callback to show_color_overlay, invert callback logic (due to new button icons) and add a "show_overlay_signal" to CanvasWidget
… on internal _color_indices when hiding anymore, therefore, it preserves color_indices values to be restored when overlay is made visible again)
5 tasks
…de_color_overlay`) and format code
…de_color_overlay`)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
==========================================
- Coverage 90.95% 90.47% -0.49%
==========================================
Files 9 9
Lines 951 976 +25
==========================================
+ Hits 865 883 +18
- Misses 86 93 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…r_overlay` method to `_toggle_show_color_overlay`
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes issues in the overlay visibility logic, adds a new toolbar button for toggling the plot overlay, and updates tests and documentation to reflect these changes. Key updates include:
- Adding a new signal and property (show_color_overlay) with corresponding toolbar button functionality.
- Correcting the bug in color_indices_to_rgba by using the passed indices parameter.
- Updating tests and docs to use the new overlay API and deprecating the old hide_color_overlay method.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/biaplotter/plotter.py | Added new toolbar button and associated signal/property updates. |
| src/biaplotter/artists_base.py | Minor formatting updates and import reordering. |
| src/biaplotter/artists.py | Fixed bug in color_indices_to_rgba and improved overlay logic. |
| src/biaplotter/_tests/test_widget.py | Updated tests to reflect overlay property usage. |
| src/biaplotter/_tests/test_artists.py | Adjusted tests to match updated API and formatting. |
| src/biaplotter/init.py | Bumped version from 0.2.0 to 0.3.0. |
| docs/plotter_api.md | Updated API documentation to include the new overlay properties. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several updates to the
biaplotterlibrary, including a version bump, bug fixes, and enhancements to the toolbar functionality. The most significant changes involve the addition of a newshow_overlay_buttonto the toolbar and improvements to the overlay visibility logic.Version Update
0.2.0to0.3.0insrc/biaplotter/__init__.py.Bug Fixes
color_indices_to_rgbawhere the method incorrectly usedself._color_indicesinstead of theindicesparameter.overlay_visiblemethod to ensure the overlay is properly reset when toggled off by using a zeroed array for_color_indices.Toolbar Enhancements
show_overlay_buttonto the toolbar inCanvasWidget, allowing users to toggle the visibility of the plot overlay. This includes:show_overlay_signalto emit visibility changes. [1] [2]_initialize_toolbarand_build_selection_toolbar_layoutmethods to include the new button. [1] [2] [3]hide_color_overlaymethod withshow_color_overlayto align with the new button functionality.Code Refinements
src/biaplotter/plotter.pyto includeCustomToolButtonfor the new toolbar button.