brainglobe / brainglobe-utils

Shared general purpose tools for the BrainGlobe project
MIT License
11 stars 1 forks source link

Collapsible Widget API v1.1 #23

Closed IgorTatarnikov closed 9 months ago

IgorTatarnikov commented 9 months ago

Description

What is this PR

Why is this PR needed?

The API for the collapsible widget was awkward to use.

What does this PR do?

The CollapsibleWidgetContainer now takes any QWidget and if the collapsible flag is True instantiates a CollapsibleWidget and replaces the content with the input QWidget. Before, the user had to instantiate a CollapsibleWidget and pass that to the CollapsibleWidgetContainer if they wanted to widget to be collapsible.

How has this PR been tested?

Tests have been added to cover the new functionality.

Checklist:

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (cb48329) 83.00% compared to head (3ae2145) 83.30%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #23 +/- ## ========================================== + Coverage 83.00% 83.30% +0.30% ========================================== Files 20 20 Lines 606 617 +11 ========================================== + Hits 503 514 +11 Misses 103 103 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.