-
Notifications
You must be signed in to change notification settings - Fork 81
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
Anki v24.06+ back card side automatic swap fix #651
Conversation
helitopia
commented
Aug 24, 2024
- See the discussion comment for the details
4708a11
to
8182005
Compare
Force pushed to resolve merge conflict as forgot to sync master branch in fork with the upstream. |
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.
Maybe a little comment to explain that code
is for backwards compatibility with Anki <= x.y?
I hesitated when writing commit message, as it is already mentioned in the discussion:
And since I am linking the discussion thread, thought that it would be redundant. |
I'm all for writing readable code and limiting the number of comments, but this is a case where a very short comment can be super helpful in the long term. It can be tedious to find discussions linked to a piece of code: one has to "blame" the specific line to find which commit last modified it then go to the corresponding PR and then to the related discussion. It becomes a lot more difficult when that piece of code gets moved to a different file or gets changed multiple times... In 5 years' time, if it stops working or if someone stumbles upon this code and thinks that |
Thanks very much for diagnosing and fixing this!
|
It is not a problem, completely agree that a shortcut for explanation would be helpful. I guess I can then move IIFE reasoning from wiki into code as well. |
- See [the discussion comment](anki-geo#649 (reply in thread)) for the details
- Specifically the intention of the introduced documentation is to keep a notice of the reasoning of IIFE usage
8182005
to
496ebae
Compare
Separated into two commits, one for the card swap and the other - IIFE docs. Not sure why, but I am somewhat triggered by regular comments in code. Probably due to having prior experience with the project that compensated for shitty code with comments everywhere :). Hence, refactored into separate function with proper JSDoc comment above it. Tell me what you think about it. |
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 a lot!