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

Change base widget used to position install plugin pop up message/warning and delta #68

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

dalthviz
Copy link
Member

@dalthviz dalthviz commented Jul 5, 2024

References and relevant issues

Fixes #65

Description

Checking the code related with the install plugin pop up positioning, seems like the logic was using the process error indicator widget (one of the labels used to show the actions state on the bottom rigth side of the dialog). Since this label is only shown when there is a code error when executing an installation, using it as the base one to get the position where the pop up should appear causes the pop up to end up using as base position the top left dialog when no error happens (since the label is hidden and its position gets mapped to that base point)

Following the above this PR changes the base widget used to get the base position where the pop up should be shown. Some exploration about what widget to use is being done:

Option Preview
Use the close button (which always is visible), and use a -50 delta to change the base coordinates to show the pop up along side the label showing the status of the actions (✔️ or ⚠️) install_plugin_popup
(Current PR state) Use the installed plugins counter label using the label text width + 5 to calculate the initial position of the pop up 347029289-f38c99fe-b555-48ae-8d97-113bbee2cb1e

Notes

@dalthviz dalthviz self-assigned this Jul 5, 2024
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.90%. Comparing base (e1cee5e) to head (5bebd1f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #68   +/-   ##
=======================================
  Coverage   86.89%   86.90%           
=======================================
  Files           9        9           
  Lines        1343     1344    +1     
=======================================
+ Hits         1167     1168    +1     
  Misses        176      176           

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

@jaimergp
Copy link
Contributor

jaimergp commented Jul 6, 2024

Thanks! Is there a risk that if the base window is attached to the right side of the display, the popup will be hidden beyond the edge?

@dalthviz
Copy link
Member Author

dalthviz commented Jul 8, 2024

Is there a risk that if the base window is attached to the right side of the display, the popup will be hidden beyond the edge?

If I'm understanding correctly the case mentioned I would say yes. So, for example, if I put the dialog to touch the screen right edge I see something like:

imagen

Could it be better to position the popup in a place that ensures it will be inside the dialog? Maybe along side the installed plugins counter label? So something like:

imagen

Let me know!


Edit - Ended up pushing a commit making the popup appear besides the installed label counter text, so things are looking something like the following:

plugin_install_popup

@dalthviz dalthviz marked this pull request as ready for review July 9, 2024 16:27
@jaimergp
Copy link
Contributor

Ended up pushing a commit making the popup appear besides the installed label counter text, so things are looking something like the following:

Sorry for the bikeshedding here, but in my eyes this pop up in general is a bit weird. It's supposed to give information about a the plugin dialog. This small box looks more like a tooltip that, if anything, should appear next to the button that triggered the action.

I feel that a message bar like this is more appropriate. It would be placed either at the top of the dialog box, or at the bottom. It should cover the full width of the dialog too.

image

And maybe this is useful for some other notifications. But speaking of that... if this is too much work or you see it as unnecessary... why not push a message to the napari notification system?

@dalthviz
Copy link
Member Author

Improving the way feedback is given after installation with a new widget that better shows status of the dialog operations or using the already available napari notifications component makes sense to me (indeed the current approach to show notifications/info after installing/before uninstalling is easy to confuse with a tooltip). The only thing on the top of my head that makes me prefer the idea of a message bar widget inside the plugin dialog is the possibility of not being aware of the notification from the main napari window due to the plugin manager dialog being bigger than the main window. So for example in the following situation:

plugin_dialog_size

It would be easy for an user to be unaware that something is being shown over the application main window (unless they first resize the plugin manager dialog or make the main window bigger than the dialog).

Maybe asking for an opinion about this to a designer (e.g Isabela) could be worthy? 🤔

@dalthviz
Copy link
Member Author

Given the upcoming napari release, maybe going forward with the position change fix of the pop up proposed on this PR could be good enough? And maybe could be worthy to open a new issue to discuss more in dept improvements/new ideas mentioned here related to the way users get feedback for install/unistall actions for future work @jaimergp ?

@jaimergp
Copy link
Contributor

Sounds good.

@dalthviz dalthviz changed the title [WIP] Change base widget used to position install plugin pop up message/warning and delta Change base widget used to position install plugin pop up message/warning and delta Jul 10, 2024
@dalthviz dalthviz merged commit 15a0b19 into napari:main Jul 10, 2024
12 checks passed
@goanpeca goanpeca added the bug Something isn't working label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin installation popup showing outside plugin dialog
3 participants