Feature uploadsubfolders#35
Conversation
| android:title="@string/prefs_instant_upload_path_title" | ||
| android:key="instant_upload_path" /> | ||
| <com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle | ||
| android:title="@string/prefs_instant_upload_path_use_subfolders_title" |
There was a problem hiding this comment.
Please only lines with 80 chars, this makes review on github a lot easier.
There was a problem hiding this comment.
@tobiasKaminsky 120 is fine with me ;) Since this is still enough for the files changed tab :D So I would vote to go for 120 line length. @przybylski
There was a problem hiding this comment.
Longer line would be great I would vote to stick to how android code is written, which is 100 lines.
https://source.android.com/source/code-style.html#limit-line-length
There was a problem hiding this comment.
@tobiasKaminsky what do you think? I am with @przybylski on this, so I also vote for 100 💯
There was a problem hiding this comment.
100 is also fine for me. I do not know who said 80 back on owncloud, but if 100 is still visible in changes tab on github everything is fine.
There was a problem hiding this comment.
I think I introduced 80 chars limit. I don't recall why :D
There was a problem hiding this comment.
I think Github would also work with 120, not sure though...
|
Thanks for this feature! |
|
implemented your feedback. It now works for videos as well. |
|
pinging @jancborchardt for input regarding the mechanism and UX. I am unsure if and how this should work. I do like the idea of having more than simply one hard coded folder to where all my photos get uploaded but I am also not sure how to solve this since would use hierarchies as in folders for the year with subfolders in them. Since it is an optional setting I don't care too much about arguing about if and how to do this. Besides that I usually group my photos based on events like a vacation within the corresponding year's folder like "2016/05-Rome" which is not something we can implement since this is something for Google Photos server farm... |
|
@jancborchardt In general my question here is probably how to handle and deal with additional app settings being introduced. #notAnExpert |
|
@AndyScherzinger i thought about this too. But opted to hardcode the path. My initial thought was to offer placeholders, so the user is able to use his own subfolder scheme based on different variables. However the current folder selections isn´t done by editing a string, and furthermore it might get to complicated to know all that placeholders / write a correct string. I don´t have a lot of experience in android app development, this is probably the 3rd time i looked into an android app / changed something, so i didn´t want to make my life to complicated ;) |
|
@AndyScherzinger this has been discussed on owncloud, ref: owncloud/android#1421 I think it is a good approach. If we see that another mechanism for subfolder is needed we can extend this setting. |
|
Perfectly fine with me :) |
| <string name="error__upload__local_file_not_copied">%1$s could not be copied to %2$s local folder</string> | ||
| <string name="prefs_instant_upload_path_title">Upload path</string> | ||
| <string name="prefs_instant_upload_path_use_subfolders_title">Use subfolders</string> | ||
| <string name="prefs_instant_upload_path_use_subfolders_summary">Store in subfolders based on year and month</string> |
There was a problem hiding this comment.
year & month: plural or singular ?
There was a problem hiding this comment.
both, as year and month refers to a single subfolder, but multiple subfolders are created.
|
Hmm, I would rather go for test and merge on master and put that into the Google Play beta and after two weeks release to stable. This is totally aside from the "real" beta you publish on f-droid. |
|
@przybylski is the code now fine for you? |
| } | ||
| try { | ||
| SimpleDateFormat formatter = new SimpleDateFormat( | ||
| "yyyy" + OCFile.PATH_SEPARATOR + "MM" + OCFile.PATH_SEPARATOR, Locale.ENGLISH); |
There was a problem hiding this comment.
IMO it should be Locale.getDefault()
|
Just a question regarding the first iteration – is this similar to how Dropbox and Google Drive or other solutions do it, so we don’t do something entirely different which people will not be used to? |
|
@jancborchardt they don't offer this at all because they don't have to due to a smart clustering. The UI is taking care of displaying clusters of photos as in time, location, people, etc. |
Right, like iOS does as well in photos. We could do this as well instead of imposing a hard structure via folders, right? |
|
Theoretically, yes. This would then mean that the client (web, Android, etc.) would need to be implement such a view the tricky part is we have an one-for-all approach, we don't just do media we do any kind of line, so it is hard to decide when to cluster (images) and when not to. |
|
A indexing solution on the server with an API would be nice. However this is far off IMHO and not related to the android app currently, server infrastructure has to be in place beforehand. |
I’d argue that this is what we’re here to solve though. :) cc @LukasReschke @schiessle for the server. @Spacefish the difficult part about such a feature is that when it’s in, it’s hard to remove. As soon as we have a structure, it will likely need to be in forever. And especially here I’m very hesitant to include it since it adds a lot of complexity and levels for when you just want to have a few photos synced. |
|
A giant drawback of this as well is that when you have a vacation which is on the end+beginning of a month or year (such as new year festivities), the pictures will be in completely different folders. That makes no sense at all. ;) |
|
Yes, there are pro and cons, the solution to put pictures in subfolders based on month, is the same that shotwell choose to order their imported pictures by default. |
Sorry about that, we really value your contribution. But this is not a simple bikeshedding discussion – while it might help your specific case, it’s something which will actually impair the experience for people who just have a few pictures. You might have also read recently »Rule #1 of open-source: no is temporary, yes is forever.« Meaning that if we »just merge the feature« right now, then it will be incredibly hard to remove it in the future should we reconsider. Discussion time vs development time is never an argument for any sensible software. ;) With Nextcloud we really want to provide a product which is very easy and fun to use. That often means fussing over details, and discussing stuff. Since this feature wasn’t discussed or specced prior to this implementation, we of course have to weigh it now. |
|
(Btw @Spacefish I just saw you are based in Stuttgart – you should meet up with @karlitschek and @schiessle some time as they’re there too! Probably time to get a Stuttgart Nextcloud meetup going. ;) |
|
As it is an optional feature I think it is not such a problem.
This is a very rarely scenario and on the opposite site I could say: what if the folder gets > 10k images and is not managable by the user. This feature is, at least for me, a slightly enhancement and is not that strict as the user still can move the files around, like @AndyScherzinger and me are doing it: regular photos in year/month and special images are moved to a meaningful subfolder. BTW: As this is the second PR (after #4) that is heavily discussed after developing we should really keep this schema: feature request/idea -> discuss -> implement -> testing -> merging. Of course it can happen that a requirement changes, but the features should be so small that it happens rarely. So long speech, I would merge this, but by default the behaviour remains the same as now. |
|
I second @tobiasKaminsky's vote here. The standard way is still the standard behavior and in this case I don't see any problems since this feature isn't a one way street and could be removed whenever we come up and ship a smarter processing and wouldn't run into (technical) problems. |
|
@jancborchardt we would like to get some final feedback / vote because this is the last open PR for the beta release 🚀 |
|
Seconding @AndyScherzinger and @tobiasKaminsky here. LGTM. |
|
Ok, let’s try this out. Can’t be that bad since it’s optional and apparently lots of people want it. Not going to be against that then ;) 👍 Wording is fine too. |
|
Thanks for the feedback @jancborchardt @LukasReschke next up we will prepare the master branch for a Play store release for the beta channel :) @tobiasKaminsky and I will prepare everything for you to simply build and deploy :) |
🚀 |
|
@Spacefish @AndyScherzinger @tobiasKaminsky sorry about the longer discussion btw – while the basic points regarding design of course stand, I must have missed that this is an optional subsetting. :) |
|
No worries, thanks for the feedback. All new features are now on master and we are preparing the beta release :) |
My InstantUpload folder is pretty crowded with thousands of pictures.. so i programmed a feature, which upload the pictures into subfolders based on year / month.
My folder got too so big, such that opening it takes quite a lot of time..