Skip to content

Fix show overlay#49

Merged
zoccoler merged 19 commits intomainfrom
fix_show_overlay
Apr 30, 2025
Merged

Fix show overlay#49
zoccoler merged 19 commits intomainfrom
fix_show_overlay

Conversation

@zoccoler
Copy link
Contributor

This pull request introduces several updates to the biaplotter library, including a version bump, bug fixes, and enhancements to the toolbar functionality. The most significant changes involve the addition of a new show_overlay_button to the toolbar and improvements to the overlay visibility logic.

Version Update

  • Updated the library version from 0.2.0 to 0.3.0 in src/biaplotter/__init__.py.

Bug Fixes

  • Fixed a bug in color_indices_to_rgba where the method incorrectly used self._color_indices instead of the indices parameter.
  • Updated the overlay_visible method to ensure the overlay is properly reset when toggled off by using a zeroed array for _color_indices.

Toolbar Enhancements

  • Added a new show_overlay_button to the toolbar in CanvasWidget, allowing users to toggle the visibility of the plot overlay. This includes:
    • Adding the show_overlay_signal to emit visibility changes. [1] [2]
    • Modifying the _initialize_toolbar and _build_selection_toolbar_layout methods to include the new button. [1] [2] [3]
    • Replacing the old hide_color_overlay method with show_color_overlay to align with the new button functionality.

Code Refinements

  • Updated imports in src/biaplotter/plotter.py to include CustomToolButton for the new toolbar button.

…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)
@codecov
Copy link

codecov bot commented Apr 29, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 90.47%. Comparing base (233336f) to head (bb777c0).
Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
src/biaplotter/artists.py 78.26% 5 Missing ⚠️
src/biaplotter/plotter.py 86.20% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zoccoler zoccoler marked this pull request as ready for review April 29, 2025 09:06
@zoccoler zoccoler requested a review from Copilot April 30, 2025 13:38
Copy link
Contributor

Copilot AI left a 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 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.

zoccoler and others added 2 commits April 30, 2025 15:45
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@zoccoler zoccoler merged commit 530492b into main Apr 30, 2025
19 of 21 checks passed
@zoccoler zoccoler deleted the fix_show_overlay branch July 14, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants