napari-imagej icon indicating copy to clipboard operation
napari-imagej copied to clipboard

Switch SearchResult display to model/view paradigm

Open gselzer opened this issue 1 year ago • 1 comments

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 avatar Aug 16 '23 20:08 gselzer

Codecov Report

Patch coverage: 87.35% and project coverage change: -0.24% :warning:

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%) :arrow_down:
src/napari_imagej/java.py 93.93% <66.66%> (-0.20%) :arrow_down:
src/napari_imagej/widgets/napari_imagej.py 74.50% <69.56%> (-0.33%) :arrow_down:
src/napari_imagej/widgets/result_tree.py 91.66% <92.15%> (ø)
tests/widgets/test_result_tree.py 90.90% <97.43%> (-2.17%) :arrow_down:
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%) :arrow_up:
tests/widgets/test_napari_imagej.py 100.00% <100.00%> (+1.29%) :arrow_up:
tests/widgets/widget_utils.py 96.15% <100.00%> (+0.69%) :arrow_up:

... and 1 file with indirect coverage changes

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

codecov[bot] avatar Aug 16 '23 20:08 codecov[bot]

This PR now loads all icons stored as resources within jars. It does not yet load icons from the web, mostly due to performance implications. Filed #296 to track that item.

gselzer avatar Sep 20 '24 22:09 gselzer

@gselzer Can you give an example of an icon referenced via a remote URL in this way?

ctrueden avatar Sep 23 '24 00:09 ctrueden

For example, the user icons from SearchResults pulled from forum.image.sc

gselzer avatar Sep 23 '24 00:09 gselzer