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 toolbutton to select action from direct entry install #96

Merged
merged 6 commits into from
Aug 19, 2024

Conversation

goanpeca
Copy link
Contributor

@goanpeca goanpeca commented Aug 9, 2024

Fixes #84

napari

Conda/pypi options are exclusive so selecting one, will leave that as the default.

To test locally this https://github.com/napari/napari-plugin-manager/pull/96/files#diff-c4a932d5522a5a713957223899c8991682affd18d838b197d3c508ea32333a1eR1215

might need a manual if True

@goanpeca goanpeca self-assigned this Aug 9, 2024
Copy link

codecov bot commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.57%. Comparing base (d5bba24) to head (a0ee0f1).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
+ Coverage   93.09%   93.57%   +0.48%     
==========================================
  Files          10       10              
  Lines        1781     1822      +41     
==========================================
+ Hits         1658     1705      +47     
+ Misses        123      117       -6     

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

@goanpeca goanpeca requested a review from Czaki August 9, 2024 19:47
@goanpeca goanpeca marked this pull request as ready for review August 9, 2024 19:47
Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

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

Gave this a check on Windows and seems like things are working:

  • pip installed napari case:

imagen

  • conda installed napari case:

imagen

However, for the conda case, it took my a moment to realize that I had to hold the button for the menu to show up:

install_toolbutton

I think that instead of setting self.direct_entry_btn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) we could set the toolbutton popupMode to QToolButton.MenuButtonPopup. That should enable the toolbutton to trigger the menu by clicking an arrow that gets added to the toolbutton. Left a suggestion for that in case clicking instead of holding makes more sense.

Besides that maybe disabling the toolbutton while a command is being executed could be worthy? Or maybe is expected to be able to launch multiple installs commands at the same time? 🤔

napari_plugin_manager/qt_plugin_dialog.py Outdated Show resolved Hide resolved
@goanpeca
Copy link
Contributor Author

goanpeca commented Aug 13, 2024

Had to make some qss changes @dalthviz, could you check again?

Besides that maybe disabling the toolbutton while a command is being executed could be worthy? Or maybe is expected to be able to launch multiple installs commands at the same time? 🤔

You should be able to do that, also after triggering the install the lineedit will clear, si you will still need to type something and hit install again

@goanpeca goanpeca merged commit 7ab6096 into napari:main Aug 19, 2024
12 checks passed
@goanpeca goanpeca deleted the enh/direct-entry branch August 19, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to select what installer tool to use when using the direct entry
4 participants