desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Add some extra syncing details to the tray icon tooltip

Open nilsding opened this issue 1 year ago • 3 comments

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: Screenshot_20240829_172644

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): Screenshot_20240829_171619

nilsding avatar Aug 29 '24 16:08 nilsding

adding @nextcloud/designers for feedback.

camilasan avatar Aug 29 '24 16:08 camilasan

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.

Screenshot_20240830_091944

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? :)

nilsding avatar Aug 30 '24 07:08 nilsding

rebased and updated. Now it looks more clean:

Screenshot_20240830_101724

...whereas on Windows it segfaults on with more than one connection. Will fix that shortly.

nilsding avatar Aug 30 '24 08:08 nilsding

this is what the tooltip will look like on Windows with multiple sync connections now:

Screenshot_20240830_103123

With only one connection it will be still the same as before: Screenshot_20240830_103633

I'll squash that fixup commit into the first one when this PR gets some approvals. :>

nilsding avatar Aug 30 '24 08:08 nilsding

@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.

jancborchardt avatar Aug 30 '24 09:08 jancborchardt

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:

Screenshot_20240830_120707

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.

Screenshot_20240830_120655

nilsding avatar Aug 30 '24 10:08 nilsding

@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

nilsding avatar Sep 02 '24 16:09 nilsding

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.

camilasan avatar Sep 02 '24 16:09 camilasan

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 :>

nilsding avatar Sep 02 '24 16:09 nilsding

just cleaned up the commits a bit and rebased on top of master again

nilsding avatar Sep 04 '24 16:09 nilsding

@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

mgallien avatar Sep 05 '24 16:09 mgallien

/backport to stable-3.14

mgallien avatar Sep 05 '24 16:09 mgallien

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.)

github-actions[bot] avatar Apr 14 '25 02:04 github-actions[bot]