-
Notifications
You must be signed in to change notification settings - Fork 57
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
Field history more features #102
base: master
Are you sure you want to change the base?
Field history more features #102
Conversation
Thanks, Arthur! I will take a look at these over the weekend. |
Any chances this feature will be accepted? Here is above mentioned request: |
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.
Thanks again for taking the time to contribute, Arthur, and sorry for taking ages to respond! I left a few notes on some parts of the code.
Having tested your changes for a bit, I can see their use, but I also feel like they would be better suited for a separate add-on. Since the predefined fields option is using a separate hotkey anyway, and I don't see much potential for conflicts otherwise, how would you feel about just forking field history and publishing your own version for choosing from a set of predefined values? I think that would make it easier for both of us to focus on one specific area of functionality and maintain that going forward.
License: GNU AGPLv3 or later <https://www.gnu.org/licenses/agpl.html> | ||
""" | ||
|
||
# Do not modify the following line | ||
from __future__ import unicode_literals | ||
from anki import version as anki_version | ||
anki21 = anki_version.startswith("2.1.") | ||
from .config import getConfig |
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 think you meant to file the changes for browser refresh as a separate PR?
@@ -0,0 +1,15 @@ | |||
{ | |||
"limit search to deck": true, |
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.
Although I can see the advantage of including spaces in config keys for readability, I still prefer going old school json and using camelCase config keys (whitespace in keys always makes me nervous. might just be because I started programming with bash...)
@@ -37,15 +38,16 @@ | |||
|
|||
from anki import version | |||
ANKI21 = version.startswith("2.1") | |||
from .config import getConfig |
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 currently throws an error because config.py is using getUserOption
As you now know extremely well, I've no problem forking an add-on and uploading it. |
First commit allows to use «history» in browser and edit field. In those case, it does not restrict the search to the current deck. This has been requested recently on reddit (which is currently broken, thus I can't link)
Second commit allows to define in add-on configuration some predefined values. So you can put directly one of those values in the field. Requested in same reddit post