-
-
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
Get next time for review in WebView #6388
Conversation
This will be useful when card developer designing cards and want to show next time below custom answer buttons. |
Is there any improvement for this PR? |
Hi @infinyte7 there is a conflict right now that needs resolution but I think the main thing is just that we're a bit constrained by available time so we haven't had a good look yet, sorry |
It's okay. When you have time then review this PR. |
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.
Could do with a line of JavaDoc documentation about whether "2" means the second button, or always means the hard button.
What is returned when the first card is a learn card in SchedV1, and "hard" is requested?
No issues with the functionality, looks good to me!
It will be good with a page containing May be more good way, like this |
Nice! I like that (the documentation adds) - would be good perhaps to cross-link to the HTML/JS debugging page, and also directly link to card.js internally as the "source of truth", plus start adding information about API registration and the reason behind it. Might be good to make a whole separate page for "AnkiDroid Javascript API" developers and link to it from where you've started adding things And it looks like there's a conflict now in one of the files, possibly because of a related change from you that I just merged |
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.
LGTM!
Yes, I will add the all information as suggested in a separate page. |
Just waiting for conflict resolution then re-request review from me @infinyte7 and I'll mark it pending merge to make sure CI goes green |
How can I add re-request review from you @mikehardy ? |
Up at the very top right you'll see our review states, and you can hit the little re-do icon for it to trigger a request to me (which gives me a notification, so I know to do 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.
Except I won't even be in the review state area unless I review it :-)
Needs a conflict resolve
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.
No need to ask me to review again unless you've changed something significant. Looks as good as it did the first time!
Is conflict resolved or should I create a separate PR? @mikehardy |
@infinyte7 If you scroll down, you should be able to see: The warning at the bottom means there's still a conflict to be 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.
LGTM
Pull Request template
Purpose / Description
When redesigning card in CSS & JS, then it may required to show next review time below buttons. This is continuation of #6307
Fixes
Fixes Link to the issues.
Approach
Added javascript interface in WebView settings then added functions in under
@JavascriptInterface
How Has This Been Tested?
Tested on emulator,
Add following function in
<script>
tag in card templates, then use at/below buttons designed in css & jsLearning (optional, can help others)
https://developer.android.com/reference/android/webkit/WebView#addJavascriptInterface(java.lang.Object,%20java.lang.String)
Checklist
Please, go through these checks before submitting the PR.
if
statements)