Anki-Android
Anki-Android copied to clipboard
Clarify which folders are expected to be profile folder
I would love for a little bit of consistency in our codebase around variables that represents the profile directory.
For the context, the "profile directory" is called AnkiDroid
right now, and is in the top level of the file system. This will change in a few months hopefully, the day where we'll allow for multiple profiles on the same device.
Many functions takes as input the profile directory. But sometime they take as input the back-up directory or the media directory. It would be great if:
- the documentation of each function taking a directory as input indicates which directory is expected
- the parameter name of the function indicates whether it's a profile, media or backup directory (and more importantly, be uniform, always use the same variable name, for the sake of search and simplicity)
In a separate PR (because that require more discussion): maybe introduce an type that represents those three kinds of directory, so that even the type system would allow to know which kind of directory we expect.
In my book, I'd love ProfileDirectory
, for example, to extend Directory
, or maybe simply File
, and just have two extra methods getMediaDirectory
and getBackupDirectory
Originally posted by @Arthur-Milchior in https://github.com/ankidroid/Anki-Android/pull/10496#pullrequestreview-908056340
@Arthur-Milchior can i work on this issue
@Prince-kushwaha please do
I just want to say, for historical context, I literally started working on AnkiDroid because I found it so useful that I wanted to use it for my child as well. And I needed multiple profiles. And AnkiDroid did not support them and I thought - I can add that!
Instead, I ended up fixing CardTemplateEditor crashes (that took almost 2 years?) and now I'm a maintainer, and I STILL HAVE NOT ADDED MULTIPLE PROFILES :rofl:
So anything that heads in that direction will receive my personal gratitude :bow:
I guess no one's working on this issue currently, so may I work on it ? @Arthur-Milchior
can i work on this @Arthur-Milchior ?
Oops, sorry, @rskbansal if you still want, go for it. Unless you are already working on something
Any update on this issue?
@Jatin887 are you still interested? If so, and if @rskbansal has not answered tuesday, you can. If you are not interested, or don't answer by thursday, @divyansh-dxn can.
@Jatin887 are you still interested? If so, and if @rskbansal has not answered tuesday, you can. If you are not interested, or don't answer by thursday, @divyansh-dxn can.
I am interested
@Jatin887 are you still interested? If so, and if @rskbansal has not answered tuesday, you can. If you are not interested, or don't answer by thursday, @divyansh-dxn can.
Can I start working on this?
Please do @Jatin887. Thanks a lot for keeping interest in this.
I would love for a little bit of consistency in our codebase around variables that represents the profile directory.
For the context, the "profile directory" is called
AnkiDroid
right now, and is in the top level of the file system. This will change in a few months hopefully, the day where we'll allow for multiple profiles on the same device.Many functions takes as input the profile directory. But sometime they take as input the back-up directory or the media directory. It would be great if:
- the documentation of each function taking a directory as input indicates which directory is expected
- the parameter name of the function indicates whether it's a profile, media or backup directory (and more importantly, be uniform, always use the same variable name, for the sake of search and simplicity)
In a separate PR (because that require more discussion): maybe introduce an type that represents those three kinds of directory, so that even the type system would allow to know which kind of directory we expect.
In my book, I'd love
ProfileDirectory
, for example, to extendDirectory
, or maybe simplyFile
, and just have two extra methodsgetMediaDirectory
andgetBackupDirectory
Originally posted by @Arthur-Milchior in #10496 (review)
can you please explain it more . I didn't get it completely
@Jatin887 do you have any specific question? I'd be glad to answer question. Maybe do the part you got, so that you'll get a first PR out of it while we wait to discuss this. If you're on discord, you can also ask here ,that may allow to have quicker discussion to clarify it, and then write down the conclusion here
@Jatin887 are you still on this issue?
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
I'll take that as a no. If I get to a point when I've no review to done quickly, I guess I'll do it
I'll work on this and won't ghost you for sure ;) just some doubts: 1) Do you just want to change the name of some variables for consistency in the codebase? 2)So do I have to manually edit the variable names in each file? 3)If so which files are those and how do I know it's a profile, media or backup directory?
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
keep open
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically