Repository navigation
Extra options for uploading subfolders - #11852
Conversation
|
@dean36963 would you mind adding some screenshots, so @nextcloud/designers can have a look? Thanks in advance 👍 |
jancborchardt
left a comment
There was a problem hiding this comment.
Looks very nice @dean36963! :) Only one adjustment maybe, to make it a little bit less busy when "Use subfolders" is not checked, the "Subfolder options" could only be shown once that is checked?
| AutoMigration(from = 68, to = 69), | ||
| AutoMigration(from = 69, to = 70) | ||
| AutoMigration(from = 69, to = 70), | ||
| AutoMigration(from = 71, to = 72) |
There was a problem hiding this comment.
@tobiasKaminsky not needed, right? Since there is an actual migration?
There was a problem hiding this comment.
I tried reverting this section, and when I moved from a build before my changes, to a build including all my changes (including reverting this - not pushed) I saw that some auto upload folder settings were lost. Keeping this line as is currently committed seemed to keep folder settings as I'd expect when upgrading.
It might be that I'd need to revert this and also change another section, but I am unsure what that change would be.
There was a problem hiding this comment.
Can't say for sure and would need to check if and which changes have been made for 70,71,72 to know When to set the Auto Migration. 👍
There was a problem hiding this comment.
Logic of Room is, afaik:
- if auto migrate is enabled, then it keeps entire DB, but changes/add new column
- if no auto migrate and no manual migration -> resets entire DB -> all is lost
- 72.json is for a new database (new app installation)
--> now the question is, do we need a manual migration, e.g. to add a specific value to hidden or subFolderRule? If not, then it should work with AutoMigration and 72.json as it is now.
There was a problem hiding this comment.
now the question is, do we need a manual migration, e.g. to add a specific value to hidden or subFolderRule?
In this regard, I've currently got it so the previous option for this (YYYY/MM) is the first option in the dropdown and appears as the default value post migration (and just in general for new folders). So I think in it's current state, no default value is needing to be set.
However, if it's more sensible to reorder these options visually (yearly then monthly, then daily for example), it might be required to then do a manual migration?
| val hidden: Int? | ||
| val hidden: Int?, | ||
| @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_SUBFOLDER_RULE) | ||
| val subFolderRule: Int? |
There was a problem hiding this comment.
this one (new column, so no auto migration, right @tobiasKaminsky ?
|
Some minor comments and I'll bee needing some feedback from @tobiasKaminsky regarding the room migration code bits. |
There was a problem hiding this comment.
Looks very nice :)
A couple of non blocking comments regarding design:
- I think that the complexity of these settings warrant the use of a full page view as opposed to a dialog. It will also work better on smaller mobile screens.
- There's a conceptual mismatch between the title of the page and the switch right next to it. I assume that the switch turns auto-upload on and off but the title says "preferences for auto upload", so it's a little confusing. I think we should change the title to "Auto upload" only.
381de90 to
35d125c
Compare
|
Rebased and good to go |
4d78049 to
c29bfc0
Compare
c29bfc0 to
612aad9
Compare
612aad9 to
e5032c9
Compare
Adds some extra options for uploading photos into various patterns of subfolders. yyyy or yyyy/MM or yyyy/MM/dd supported. Currently just adds an extra field for this, and has to be used in conjunction with the "use subfolder" checkbox, the new option is greyed out and disabled when "use subfolder" is not checked. Signed-off-by: Dean Birch <[email protected]>
Signed-off-by: Dean Birch <[email protected]>
Signed-off-by: Dean Birch <[email protected]>
Signed-off-by: Dean Birch <[email protected]>
Signed-off-by: Dean Birch <[email protected]>
Instead of greying out the subfolder rules when not active, hide them. Also reverts changes to make a function out of getAlpha. Signed-off-by: Dean Birch <[email protected]>
Signed-off-by: Dean Birch <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
e5032c9 to
22b7d23
Compare
Signed-off-by: tobiasKaminsky <[email protected]>
22b7d23 to
f32cb61
Compare
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/11852.apk |
|
Merged! Nice work @dean36963 🎉 And thanks for building and polishing it 💯 |
|
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! |
















resolves #11642
Adds some extra options for uploading photos into various patterns of subfolders. yyyy or yyyy/MM or yyyy/MM/dd supported.
Currently just adds an extra field for this, and has to be used in conjunction with the "use subfolder" checkbox, the new option is greyed out and disabled when "use subfolder" is not checked.
Notes
List of considerations to add:
✅ Does dropdown make sense UI/UX-wise? (Andy: fine I would say, while other option for upload behavior uses a dialog with a radio button group)
✅ Does the database migrations make sense? This is the first time I've done that sort of migration so probably needs extra checks.
✅ Unit tests! As there's now more ways of uploading files, should we have some new unit tests for checking new upload location is correct for all new options?
✅ Order of imports and line wrapping settings, I'm not sure if this is already covered by the idea settings files in git and android-studio doing this, or do I need to run somethings?
✅ Order of the dropdown isn't ideal visually, but I wanted to make sure in case after a migration, a 0 in the database should be the first option, so previous behavior is kept (though this makes an assumption that 0 is the default which might be incorrect).
✅ Localisation concerns? There's been a change to
prefs_instant_upload_path_use_subfolders_summary(but only in one language), due to a change in behaviour, so text might not make sense any more in other languages.✅ detectNewJavaFiles: should all new classes be Kotlin? (ah I may have forgotten copyright headers...)
Tests written, or not not needed