Skip to content
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

add to viewer button > double-click #49

Merged
merged 8 commits into from
Jul 27, 2023
Merged

Conversation

alessandrofelder
Copy link
Member

@alessandrofelder alessandrofelder commented Jul 21, 2023

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

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

What does this PR do?

  • moves the atlas info to be a tooltip on the atlas table view
  • removes the download and add to viewer button, which are replaced by double-clicking rows
  • to guard users from a too rash download, a confirmation dialog is displayed

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:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • [n/a] The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@alessandrofelder alessandrofelder self-assigned this Jul 21, 2023
@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

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

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

Additional details and impacted files
@@            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 Coverage Δ
src/brainglobe_napari/atlas_download_dialog.py 100.00% <100.00%> (ø)
src/brainglobe_napari/atlas_viewer_widget.py 98.16% <100.00%> (+2.19%) ⬆️
src/brainglobe_napari/tests/conftest.py 55.55% <100.00%> (+18.71%) ⬆️
...rainglobe_napari/tests/test_atlas_viewer_widget.py 100.00% <100.00%> (+1.47%) ⬆️
...rc/brainglobe_napari/tests/test_download_dialog.py 100.00% <100.00%> (ø)
...e_napari/tests/test_napari_atlas_representation.py 100.00% <100.00%> (ø)

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

@alessandrofelder alessandrofelder marked this pull request as ready for review July 24, 2023 10:19
@alessandrofelder alessandrofelder requested a review from a team July 24, 2023 10:20
Copy link
Member

@adamltyson adamltyson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I added a small comment about the dialogue.

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

@alessandrofelder alessandrofelder merged commit 8598161 into main Jul 27, 2023
@alessandrofelder alessandrofelder deleted the double-click-row branch July 27, 2023 14:17
@alessandrofelder
Copy link
Member Author

alessandrofelder commented Jul 27, 2023

... 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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Simplify widget visuals
2 participants