-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[GSoC] Add Use new backend
(persistent) preference
#11977
Conversation
e3ec29e
to
6f2e17e
Compare
6f2e17e
to
3d30a07
Compare
Would it be worth moving these into the Advanced section so alpha testers can try too? #11808 (comment) |
Also, I don't really see the benefit of the separate csv pref. The csv importer will require v16 to be enabled, so it's going to be hidden by default even without a separate preference. |
I'm particularly quite in favor of releasing it as an Advanced preference. If I get a green light of the maintainers, I'll do it.
I actually prefer enabling the CSV importer if the new backend is active instead of a preference as well. Good to hear that another person find this reasonable too. Better than taking the "safe" approach (the CSV importer screen is self contained, so shouldn't break the rest of the app). edit: done this |
3d30a07
to
54f081c
Compare
Use V16 backend
(persistent) and Enable CSV importer
dev optionsUse V16 backend
(persistent) dev option and Text/CSV import dialog option
0284a16
to
78197a1
Compare
Use V16 backend
(persistent) dev option and Text/CSV import dialog optionUse V16 backend
(persistent) dev option
Noticed that I should refactor some of the file selection code, so I'll keep this PR only for the V16 option edit: moved to the Advanced category anyway, that's what I interpreted #11808 (comment) wants, and sooner or later it will have do be done |
977293a
to
1c31890
Compare
Use V16 backend
(persistent) dev optionUse V16 backend
(persistent) preference
1c31890
to
2ec6659
Compare
you have a merge conflict |
AnkiDroid/src/main/java/com/ichi2/anki/preferences/AdvancedSettingsFragment.kt
Outdated
Show resolved
Hide resolved
2ec6659
to
151fa6b
Compare
I reviewed the changes and I'm questioning if we really need the temporary backend change. The permanent backend change preference has several advantages:
The temporary backend change:
At this point did I close the app? I would say yes, and others might as well At this point, although I left the app, the backend wasn't changed back. Can I see/realize this by looking at the preferences? No, as the temporary backend change doesn't offer any visual feedback. So the text would need to be changed to mention that the user has to kill the app from the task manager(which indeed reverts the backend). At this point, if we require the user to go to the task manager and kill the app, we might as well just use the permanent backend preference. Also, I really think that changing any of these preferences should bring up a confirmation dialog. When I was first checking the preferences, as I scrolled, I accidentally touched the permanent backend change preference and I enabled it. A simple misplaced touch shouldn't automatically enable such preferences. |
Fair points about visibility and confirmation. I think the reason David originally added the temporary toggle is out of concern that the user might turn it on, find it crashes the app on startup due to some code path/condition we didn't anticipate, and then will be unable to revert to the old setting. That's a legitimate concern while this code is so fresh, and I actually encountered such a situation today - if the collection has the current deck id stored incorrectly as a string (which happened with old AnkiDroid versions IIRC), the new schema path currently crashes AnkiDroid on startup. |
Added confirmation and visual indication if temporary pref is enabled or not 2022-08-08.08-43-49.mp4 |
Use V16 backend
(persistent) preferenceUse new backend
(persistent) preference
Sorry to drop in here semi-uninformed and kind of tardy, but I just got a network time slice and my thoughts were/are:
Also, it allows developers here to more easily test their GSoC stuff (because it's persistent) and for people doing QA on GSoC to test it more easily (because it's persistent...) Hoping to review this (if someone doesn't beat me to it) shortly but just in case I get pulled away again for a week or whatever (like I did last week) I at least stated my vision for it. Done traveling on Aug 18 so I'm about to be able to really help push things forward again. Cheers |
12d52e2
to
befe26d
Compare
And remove the old temporary "Use V16 backend" preference
Okey dokey. No temporary preference it is. Make your backups and have fun testing, people! Cheers. |
befe26d
to
793abec
Compare
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.
I don't think this should be offered as an option.
The preference existed specifically for developers to test v16 only if the app was built under DEBUG. This was with the expectation that the code was unstable (despite unit tests passing)
The preference specifically reverts after an 'app close' to allow the app to be usable in the case of catastrophic failure.
Instead of implementing this, we should focus on getting the new backend stable, and then switching to it permanently.
If we do not feel that the new code is stable enough to offer to users, users should not be able to enable it.
FWIW, my opinion is:
I'm strong on the first two points. I've stated my opinion about the third point, but I'm happy with any path taken. |
I still want this. There's a chicken-and-egg problem of getting enough testing to feel that it's stable enough to offer to "users", and "users" is not just two classes ("people with debug builds from source" and "people using alphas / betas / etc"). There is at the moment one specific group of people - our alpha users - that are installing manually a thing labeled "alpha" and if they want to test, they would specifically tap a thing that warns them about the danger. At that point it could eat the family pet and we have clean conscience I think. In the meantime a subset of these people (v3 scheduler requesters) is motivated to try it, and we'll start getting some real usage of the backend. Realistically, I think this will net us probably 4-5 testers max, 2 alpha / non-developer v3 people, and 2-3 of "us" (people that regular test / PR things) Sync works, review works, undo works, those are the basic use cases. And for problems, we've got Damien and myself ready for fixes. My vision for duration of v3 stabilization is just a couple weeks and I'm happy to re-hide this if there are problems and/or if we're about to go to beta, if for some reason it takes a lot longer or it becomes a problem. Where to put it? Definitely "advanced" but it can't be in "developer options" since that is for debug-builds only Note that I have still not reviewed the text - when I do so I'll make sure it says something about "There is a chance this could corrupt your installation completely, requiring app uninstall and deletion of /sdcard/AnkiDroid, and has a chance of propagating corruption via sync to ankiweb. We welcome the testing, but please make sure you have a valid non-AnkiWeb backup." (or similar) |
8bc98d6
to
7095a91
Compare
7095a91
to
699807f
Compare
With a warning like that, I believe any "reasonable person" (yes, that's vague, but it's a US legal standard at least, I'm being sincere) can agree that if something goes wrong, you were warned...... |
AnkiDroid/src/main/java/com/ichi2/anki/preferences/AdvancedSettingsFragment.kt
Show resolved
Hide resolved
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.
This works for me, I personally appreciate the change. I also respect the legitimate worries about this and will own (via user support, which I provide on mailing list, play store, and issue tracker...) issues if they pop up. I hope on balance it does help testing...I think it will 🤞
maintainer note: doing i18n sync prior to merging this, so the string change from this does not mix with unrelated translations (a real string review velocity killer...) |
Purpose / Description
legacy_schema=false
onlocal.properties
while not having to re-enable every time the app is reopened.Fixes
A tiny bit of #6772
Approach
On the commits
How Has This Been Tested?
Emulator SDK 25
untitled.webm
(not so sure why Android Studio recording is getting dark, maybe I should buy a faster computer)
Checklist
Please, go through these checks before submitting the PR.
if
statements)