-
Notifications
You must be signed in to change notification settings - Fork 669
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
Discovery: Add branding option to disable default sync of 'M' directo… #5340
Conversation
@ogoffart, thanks for your PR! By analyzing the history of the files in this pull request, we identified @dragotin, @guruz and @cryptomilk to be potential reviewers. |
(untested) |
@SamuAlfageme calling you! 📲 |
👎 doesn't work, debugging |
@SamuAlfageme You can test this by having an external storage configured in your oC server (files_external). I tried with a system wide mount but you could try with a user mount. |
@ogoffart @guruz let me get this straight: |
So far what I found:
|
@SamuAlfageme What is the exact test procedure? |
@michaelstingl you need to modify the theme to set From there, I can provide you with a test server with 2/3 different external storage options configured and running. And you can see how the auto-deselect doesn't work neither on the create account wizard nor when deleting (to force restore) the Second scenario unchecks the external storage folders but does not remove them from the local filesystem when selecting any of those 3 options. |
One of @SamuAlfageme's issues is that the initial folder setup doesn't check for 'M' directories. In a way this is similar to what I addressed in #5426. It'd be nice to share the "dubious folder" logic between discovery and initial setup so we don't have to worry about it in the future. |
🔝 Cherrypicking the changes in #5426 for testing purposes... |
@SamuAlfageme @ogoffart I've addressed the inconsistency between setup and later synchronization in ckamm@39d048a - shall I include that patch here? |
@ckamm sure! will re-test as soon as it's ready. |
@SamuAlfageme I've put it into this PR for now, but it's pending @ogoffart's opinion. |
I added some fixup commit. The remaining issues i could think of with this patch:
|
New tests after these changes are looking good so far: 🎉 There's also this one conceptual thing we need to address: #5421 (comment) because cc/ @michaelstingl |
After including the message pointing the cause of folders being unchecked there should be the same for newly created storages. cc/ @ckamm Answering to @ogoffart's #5340 (comment)
Well, looks like yes, if you specify a path for the mounting point instead of a single, folder name; it's mounted that path (if available; I'm investigating a bug related with this). I don't know if this is the expected behavior though. cc/ @PVince81 Also, again, we have discrepancies between what happens on the wizards and if changes were made in an already created folder sync connection. In the second scenario, folder is unchecked: In the first, as addressed in 7344571 it isn't. So we should have an uniform way of dealing with this. @ogoffart agreed on having a different name for the option as current (double negation antipattern) is too confusing (and was source of my question on #5340 (comment)) |
@michaelstingl Should the branding option be only for new folder, or also for new sync? i.e, in the first sync, if the user selected "Sync Everything" in the wizard, should the 'M' folder be sync'ed or not? |
@ogoffart How about we merge this to have it in 2.3 and create a new ticket to discuss the implications on the wizards? If merging this soon isn't urgent, we can also keep it like this. |
@SamuAlfageme Thanks for testing! I have fixed most issues. I icreased the default size of the wizard so everything fits.
That is expected i'd say. (See comment #5340 (comment) )
The API for notifications is "fire and forget". So we'd need to accumulate them and only show the notification when discovery is finished. We can do that. But that's a bigger change which i might do later.
I could not reproduce that. Maybe it's only on Mac? |
@ogoffart awesome, updated #5340 (comment) and will move some of the things that can be improved to individual issues to address them later so we can merge here. Couple of simple things before so,
|
@ogoffart and finally, extracted from #5340 (comment):
|
@SamuAlfageme : Do you think the wizard is now too big? Regarding the choose what to sync, i'll change their icon in a follow up pull request. |
struct SyncOptions { | ||
/** Maximum size (in Bytes) a folder can have without asking for confirmation. | ||
* -1 means infinite */ | ||
qint64 _newBigFolderSizeLimit = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just saying in future it would be nice if all variables with time or bytes are called something like ...msec or ..bytes etc. Not important now
@@ -200,6 +215,11 @@ QStringList OwncloudAdvancedSetupPage::selectiveSyncBlacklist() const | |||
return _selectiveSyncBlacklist; | |||
} | |||
|
|||
bool OwncloudAdvancedSetupPage::confirmBigFolder() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to have such functions named "is..." or "are..." to see it is a getter
@@ -275,6 +275,15 @@ qint64 Theme::newBigFolderSizeLimit() const | |||
return 500; | |||
} | |||
|
|||
bool Theme::wizardHideExternalStorageConfirmationCheckbox() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @rperezb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guruz thanks!
Kind of, yeah 😕. Took the whole screen on my Win7 VM, it's bigger than the application main window and there's a lot of unused space on the right.
Great! 😉
They do if they're set as global settings, so I would rather enable them for both options and place them under the radio buttons. |
Code looks OK 👍 wizard is also too big on my screen, please reduce and merge. @SamuAlfageme Did you also test this with deeper directory structures? Will creating a new directory on the server side deep inside the mounted storage again ask for confirmation? |
Yeah, looks good so far:
Tried making superficial changes on the external storage and it was ok, program logic could point otherwise? |
The advanced page has become quite complex and does not fit on the screen anymore if the fonts are too big
We need to forward the information that the folder is an external storage for the notification message. Issue: #5340 (comment)
… added The Size limit, or confirmation checkboxes might have changed. We need to guard against saving if the control changes while we are loading Issue: #5340 (comment)
…ill want to confirm big folder Issue: #5340 (comment)
I resized the wizard again (750 pixels wide) |
Added two checkboxes in the Account Wizard in the advanced page to change the first options. Also added a checkbox in the general settings to ask for confirmation for external storages. Theme options allow to hide the checkboxes in the wizard. As described in issue #5340
The sync engine rely on the 'M' in premission to ask for confirmation (As requested in issue #5340) But we only want to ask the premission for the 'root' of the mounting point and not for every subfolders within it. So we change the discovery phase in a way that it does not keep the 'M' for children within the external storage.
We need to forward the information that the folder is an external storage for the notification message. Issue: #5340 (comment)
… added The Size limit, or confirmation checkboxes might have changed. We need to guard against saving if the control changes while we are loading Issue: #5340 (comment)
@ogoffart I accidently merged this to master instead of 2.3. |
…ries
Issue #5331 and https://github.com/owncloud/enterprise/issues/1594