brainglobe / brainrender-napari

A napari plugin to render BrainGlobe atlases and associated data as layers.
BSD 3-Clause "New" or "Revised" License
18 stars 1 forks source link

add to viewer button > double-click #49

Closed alessandrofelder closed 11 months ago

alessandrofelder commented 11 months ago

Description

What is this PR

Why is this PR needed? Our widgets are multiplying and there's no space for them any more

What does this PR do?

To account for this, the atlas widget tests were refactored heavily. This refactor includes the adding of a new fixture in conftest.py to simplify emulating a user doubleclicking on a view.

References

Closes #45

How has this PR been tested?

Existing tests were refactored and some new ones added. Automated tests pass, and I've tested manually too.

Is this a breaking change?

yes, the UI changes completely (but no underlying fu

Does this PR require an update to the documentation?

Nope

Checklist:

codecov[bot] commented 11 months ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +1.59 :tada:

Comparison is base (78bf071) 93.10% compared to head (1ee198c) 94.69%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #49 +/- ## ========================================== + Coverage 93.10% 94.69% +1.59% ========================================== Files 9 11 +2 Lines 377 415 +38 ========================================== + Hits 351 393 +42 + Misses 26 22 -4 ``` | [Impacted Files](https://app.codecov.io/gh/brainglobe/brainglobe-napari/pull/49?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe) | Coverage Δ | | |---|---|---| | [src/brainglobe\_napari/atlas\_download\_dialog.py](https://app.codecov.io/gh/brainglobe/brainglobe-napari/pull/49?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe#diff-c3JjL2JyYWluZ2xvYmVfbmFwYXJpL2F0bGFzX2Rvd25sb2FkX2RpYWxvZy5weQ==) | `100.00% <100.00%> (ø)` | | | [src/brainglobe\_napari/atlas\_viewer\_widget.py](https://app.codecov.io/gh/brainglobe/brainglobe-napari/pull/49?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe#diff-c3JjL2JyYWluZ2xvYmVfbmFwYXJpL2F0bGFzX3ZpZXdlcl93aWRnZXQucHk=) | `98.16% <100.00%> (+2.19%)` | :arrow_up: | | [src/brainglobe\_napari/tests/conftest.py](https://app.codecov.io/gh/brainglobe/brainglobe-napari/pull/49?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe#diff-c3JjL2JyYWluZ2xvYmVfbmFwYXJpL3Rlc3RzL2NvbmZ0ZXN0LnB5) | `55.55% <100.00%> (+18.71%)` | :arrow_up: | | [...rainglobe\_napari/tests/test\_atlas\_viewer\_widget.py](https://app.codecov.io/gh/brainglobe/brainglobe-napari/pull/49?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe#diff-c3JjL2JyYWluZ2xvYmVfbmFwYXJpL3Rlc3RzL3Rlc3RfYXRsYXNfdmlld2VyX3dpZGdldC5weQ==) | `100.00% <100.00%> (+1.47%)` | :arrow_up: | | [...rc/brainglobe\_napari/tests/test\_download\_dialog.py](https://app.codecov.io/gh/brainglobe/brainglobe-napari/pull/49?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe#diff-c3JjL2JyYWluZ2xvYmVfbmFwYXJpL3Rlc3RzL3Rlc3RfZG93bmxvYWRfZGlhbG9nLnB5) | `100.00% <100.00%> (ø)` | | | [...e\_napari/tests/test\_napari\_atlas\_representation.py](https://app.codecov.io/gh/brainglobe/brainglobe-napari/pull/49?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe#diff-c3JjL2JyYWluZ2xvYmVfbmFwYXJpL3Rlc3RzL3Rlc3RfbmFwYXJpX2F0bGFzX3JlcHJlc2VudGF0aW9uLnB5) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

alessandrofelder commented 11 months ago

... I think the UI needs to be made more intuitive (not sure how) or add some instructions to the user within the UI.

I agree. For now, there are instructions for the table to double-click a row in its tooltip. I would suggest this be complement with an info logo that you can hover over somewhere?

[Edit: moving this discussion to #52]