feat: Add option to disable CloudProviders sidebar integration#9233
feat: Add option to disable CloudProviders sidebar integration#9233eriolloan wants to merge 3 commits intonextcloud:masterfrom
Conversation
Adds a new setting in General preferences to control whether synchronized folders appear in the file manager sidebar via CloudProviders on Linux. Changes: - Add 'showCloudProvidersInFileManager' config setting (defaults to true) - Add checkbox in General Settings UI (Linux only) - Check setting during CloudProviderManager initialization - Skip DBus registration when disabled The setting requires application restart to take effect. Signed-off-by: eriolloan <15250783+eriolloan@users.noreply.github.com>
3d821a7 to
cc8a441
Compare
| OCC::ConfigFile cfg; | ||
| if (!cfg.showCloudProvidersInFileManager()) { | ||
| qCInfo(lcNextcloudCloudProviderIntegration) << "CloudProviders disabled by user setting"; | ||
| return; | ||
| } | ||
|
|
There was a problem hiding this comment.
I think it makes more sense to move this logic to application.cpp, do the check before calling ownCloudGui::setupCloudProviders:
desktop/src/gui/application.cpp
Line 408 in a514416
src/gui/generalsettings.cpp
Outdated
| void GeneralSettings::slotToggleCloudProviders(bool checked) | ||
| { | ||
| ConfigFile cfgFile; | ||
| cfgFile.setShowCloudProvidersInFileManager(checked); |
There was a problem hiding this comment.
beyond changing the config file, you need to call here ownCloudGui::setupCloudProviders (I could be wrong, maybe another function), so the change will take effect without restarting the client.
There was a problem hiding this comment.
Thanks I'll look into it tomorrow
Moves the setting check from CloudProviderManager constructor to Application startup, following the suggestion to check before calling setupCloudProviders rather than inside the manager itself. This keeps the initialization logic cleaner and more consistent with how other optional components are handled. Signed-off-by: eriolloan <15250783+eriolloan@users.noreply.github.com>
|
Thanks for the review! I've moved the check to application.cpp. Regarding making the toggle take effect without restart - I looked into this and ran into a few complications. Tell me if I'm mistaken but it looks like :
Is keeping the restart requirement acceptable for now? The tooltip does mention it's needed. |
Thanks for the PR. We discussed your changes in the team and I am afraid I didn't realize the implications of your changes when I first reviewed it. So we would like to propose the following:
I think you can leave this as it is now.
Given that now it would require to change the config file by hand, then items 2 and 3 are not a concern anymore. I hope this proposal is OK with you :) |
|
Thanks for discussing this with the team! I'm happy to make the changes you suggest. Before I do though, I'd like to share some context on why I thought a UI option would be valuable: The problem affects several user groups:
There are existing reports of this issue: issue #3361 (from 2021, still open) and I found myself in a combination of some of these situations, prompting the PR. That said, I fully understand the concern about UI clutter for a niche feature. |
|
Hello there, 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.) |
mgallien
left a comment
There was a problem hiding this comment.
@eriolloan did you try bringing the point to the nautilus or other file managers using libcloudproviders to allow hiding the entries you do not want
I think you are trying to solve the issue at the wrong level
Remove UI checkbox from General Settings. Use showCloudProvidersInFileManager config file setting instead.
|
I updated the MR based on feedback. The CloudProviders setting is now config-only (removed from UI), keeping it accessible for advanced users who need it. You're probably right about the level where it should be implemented. So I've also started a discussion on GNOME Discourse about per-entry visibility controls for CloudProviders in Nautilus. If this gets somewhere, it could eventually allow users to selectively hide individual cloud provider entries directly in their file manager – making this global setting unnecessary in the long term. In the meantime, thanks for considering addressing this issue. Also, I noticed this comment in the issue mentioning adding a config flag in the command line. Is this something I should work on? |
|
Does this fix the issue of the integration causing the nextcloud client to automatically be started? See #2622 |
|
Hi @Imberflur, If you want to confirm this you can compile from my branch: https://github.com/eriolloan/desktop/tree/feature/optional-cloudproviders-sidebar |
|
Unfortunately, I'm not using nextcloud right now so it would be difficult to test myself. I just remember this being a major issue for me. |
|
@eriolloan can you have a try at fixing the failing DCO check ? |
|
Sure thing. I'll try to look at it this week.
|
Summary
Adds a new user setting to optionally disable CloudProviders D-Bus integration on Linux, allowing users to hide synchronized folders from the file manager sidebar while keeping sync functionality intact.
Changes
Implementation details
showCloudProvidersInFileManager(defaults totrue)#ifndef Q_OS_LINUX)CloudProviderManagerconstructor when disabledTesting
Screenshot
Related issues
Fixes #1982