Add some extra syncing details to the tray icon tooltip
This pull request adds some more details to the tray icon tooltip text.
There was some unused code that updated some status bar text, so I opted to re-use that. As of now it displays what the old code did -- the file size to be synced and the estimated time left if applicable.
On my Linux (KDE) system it will display that information per folder:
On Windows it will only display if there is only one folder to be synced. The tooltip message will roughly look like that (still need to check that it doesn't get truncated):
adding @nextcloud/designers for feedback.
Hey @jancborchardt, thanks for the feedback :D
Getting rid of the Nextcloud: application name prefix would be as easy as modifying/removing the overridden method in systray.cpp. https://github.com/nextcloud/desktop/blob/99aa2557fc7cba6ffac397e4f0cf3fd74d33b03c/src/gui/systray.cpp#L569-L572
I think we could keep it for the Windows platform though, as it will display a summary of everything anyway.
On other platforms the tooltip can be more even more detailed, e.g. display the sync status of all possible folder sync configurations (and on macOS even the accounts using the VFS), e.g.
I think in the case of more than one active sync configuration it'd be better to display the Folder prefix too, just to be extra clear. And if there's only one sync configuration, that prefix can be dropped entirely. What do you think? :)
rebased and updated. Now it looks more clean:
...whereas on Windows it segfaults on with more than one connection. Will fix that shortly.
this is what the tooltip will look like on Windows with multiple sync connections now:
With only one connection it will be still the same as before:
I'll squash that fixup commit into the first one when this PR gets some approvals. :>
@nilsding looks great now! Only a super small detail, we can shorten the time display from "3 minutes 15 seconds remaining" to "3:15 minutes remaining" Then it also usually doesn't line break.
But it's also fine to do it in a follow-up if it just uses some desktop native time format.
Sadly there is no utility function to convert the time in milliseconds to a short time like 3:15 yet, but I think for the tooltip it's more than enough to say 3 minutes instead:
I also added some handling for the special case when the estimated ETA is 0; i.e. instead of 0 seconds left it will now display A few seconds left, similar to how the usual folder status view does it.
@mgallien thanks for the review :)
re. the app name prefix on Windows I'm waiting on Jan's opinion first -- if neither of us have a strong opinion about that I'll just drop that override altogether
re. the app name prefix on Windows I'm waiting on Jan's opinion first -- if neither of us have a strong opinion about that I'll just drop that override altogether
I would just drop it, we usually try to keep the same between the 3 platforms unless there is specific guidelines saying otherwise.
we usually try to keep the same between the 3 platforms unless there is specific guidelines saying otherwise.
ah, good to know. Will remove it then :>
just cleaned up the commits a bit and rebased on top of master again
@nilsding thanks again :smile: I will take care of the merge as PR from external repositories (i.e. clone) will not be run at our drone CI sonarcloud check will also fail due to access rights again
/backport to stable-3.14
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
(If you believe you should not receive this message, you can add yourself to the blocklist.)