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

Switch SearchResult display to model/view paradigm #290

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

gselzer
Copy link
Collaborator

@gselzer gselzer commented Aug 16, 2023

This PR converts the search result QTreeWidget to use Qt's model/view paradigm - not only is this a better separation of concerns, but it also makes it easier to do things like adding icons to search results.

@gselzer gselzer added the enhancement New feature or request label Aug 16, 2023
@gselzer gselzer added this to the 0.2.0 milestone Aug 16, 2023
@gselzer gselzer requested a review from ctrueden August 16, 2023 20:17
@gselzer gselzer self-assigned this Aug 16, 2023
@gselzer gselzer linked an issue Aug 16, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Patch coverage: 87.35% and project coverage change: -0.24% ⚠️

Comparison is base (94271a1) 88.51% compared to head (2d95b4f) 88.28%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #290      +/-   ##
==========================================
- Coverage   88.51%   88.28%   -0.24%     
==========================================
  Files          53       53              
  Lines        4912     4925      +13     
==========================================
  Hits         4348     4348              
- Misses        564      577      +13     
Files Changed Coverage Δ
src/napari_imagej/widgets/widget_utils.py 81.06% <34.78%> (-7.45%) ⬇️
src/napari_imagej/java.py 93.93% <66.66%> (-0.20%) ⬇️
src/napari_imagej/widgets/napari_imagej.py 74.50% <69.56%> (-0.33%) ⬇️
src/napari_imagej/widgets/result_tree.py 91.66% <92.15%> (ø)
tests/widgets/test_result_tree.py 90.90% <97.43%> (-2.17%) ⬇️
src/napari_imagej/types/converters/images.py 95.31% <100.00%> (ø)
src/napari_imagej/utilities/_module_utils.py 83.62% <100.00%> (ø)
tests/utils.py 96.61% <100.00%> (+0.03%) ⬆️
tests/widgets/test_napari_imagej.py 100.00% <100.00%> (+1.29%) ⬆️
tests/widgets/widget_utils.py 96.15% <100.00%> (+0.69%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gselzer gselzer marked this pull request as ready for review August 17, 2023 14:15
We aren't implementing this behavior anymore (it's the default with
QTreeView), so we don't need to test it.
@gselzer gselzer force-pushed the 284-search-results-should-show-icons-to-help-disambiguate branch from 29cd578 to ff7a205 Compare August 17, 2023 15:06
...jpype is so smart!
@gselzer gselzer force-pushed the 284-search-results-should-show-icons-to-help-disambiguate branch from ff7a205 to 998e5ad Compare August 17, 2023 18:01
On MacOS, this prevents the categories from being highlighted
We haven't coded this behavior, so let's not test it!
@gselzer gselzer force-pushed the 284-search-results-should-show-icons-to-help-disambiguate branch from 2db5d2e to 2d95b4f Compare August 17, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
napari-imagej plugin
Awaiting triage
Development

Successfully merging this pull request may close these issues.

Search results should show icons to help disambiguate
1 participant