-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Desktop: Add type 'info' and 'OK' button to update dialog when version up-to-date #1148
Desktop: Add type 'info' and 'OK' button to update dialog when version up-to-date #1148
Conversation
Should probably be tested on Mac/Windows as well. In Windows the dialog already looks like this: due to
|
I'm not sure.. I guess this use of default values makes this happen for both Mac and Windows in different ways. As long as you state the type (for the logo) and buttons explicitly, it should anyways look similar on all platforms :) I don't have any strong feelings about using the info icon or Joplin icon for this. If you want the Joplin Icon I guess I can change the type line to using the same icon as in the About Joplin-window:
Note: The 'info' type was copied from the dialog when an update is available, so IIRC this dialog also shows an info icon. |
What's the standard for message boxes on Linux? Maybe if the Electron team didn't put the OK button is because it's more normal on Linux not to have one? In any case, if we make this change, we should probably change |
Based on the documentation for Electron I thought that it automatically added 'OK' to Windows, but it indeed seems like this default action happens for MacOS as well - but not for Linux (as shown in my initial screenshot). There's not a coherent standard for Linux AFAIK, it's likely different in different distros and graphical environments. But not having a button does not look good and does not cohere with the general design in the application IMO. To suppress the default icon action, adding When I took another look at the code I see that using showmessagebox directly is not recommended: joplin/ElectronClient/app/bridge.js Lines 65 to 67 in 8ff2418
so perhaps showInfoMessageBox from bridge.js should be used instead?joplin/ElectronClient/app/bridge.js Lines 90 to 97 in 8ff2418
It's only in |
Thanks @matsest, I think this is fine. I might be difficult to use functions from bridge from that script, so let's keep that way. |
This removes a minor issue (not found Issues) where the text in the check for update messagebox is automatically selected. It adds a 'OK' button and makes the messagebox consistent with other boxes (type 'info'). This is only for the dialog when the version is up-to-date.
Issue
Current behavior when pressing check for update:
Text is automatically selected in lack of a button. ESC must be pressed to exit the window.
Fix
With this PR:
OK is automatically selected, icon is shown. ESC or Enter (for 'OK') can be pressed to exit the window.