{"action":"created","issue":{"url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/4868","repository_url":"https://api.github.com/repos/ankidroid/Anki-Android","labels_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/4868/labels{/name}","comments_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/4868/comments","events_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/4868/events","html_url":"https://github.com/ankidroid/Anki-Android/issues/4868","id":331137125,"node_id":"MDU6SXNzdWUzMzExMzcxMjU=","number":4868,"title":"[RFC] Embeddable Whiteboard","user":{"login":"pigoz","id":24681,"node_id":"MDQ6VXNlcjI0Njgx","avatar_url":"https://avatars1.githubusercontent.com/u/24681?v=4","gravatar_id":"","url":"https://api.github.com/users/pigoz","html_url":"https://github.com/pigoz","followers_url":"https://api.github.com/users/pigoz/followers","following_url":"https://api.github.com/users/pigoz/following{/other_user}","gists_url":"https://api.github.com/users/pigoz/gists{/gist_id}","starred_url":"https://api.github.com/users/pigoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pigoz/subscriptions","organizations_url":"https://api.github.com/users/pigoz/orgs","repos_url":"https://api.github.com/users/pigoz/repos","events_url":"https://api.github.com/users/pigoz/events{/privacy}","received_events_url":"https://api.github.com/users/pigoz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-11T10:46:00Z","updated_at":"2018-06-11T14:29:21Z","closed_at":"2018-06-11T12:55:37Z","author_association":"NONE","body":"Hello, this is a request for feedback on a feature I want to implement for myself, I would like to implement it in a way that can be merged on master, for other people to use, so I am seeking out some feedback on my idea.\r\n\r\nWhat I have in mind is a way to limit a whiteboard to a particular screen area in the card. This is a mockup I made in Anki (see the front side)\r\n\r\n![mockup](https://0x0.st/s_Uq.png)\r\n\r\nThe whiteboard would be inserted in the card template with a special field `{AnkiDroidWhiteboard}`, and draw events would be limited to that area. This area would share it's state between Front and Back layout, so that the user can draw in it in the front of the card, and check if the sketch is similar to something in the back side (i.e. a kanji stroke order diagram).\r\n\r\nMoreover making it's area limited, allows the user to scroll the card content, which I believe would be a great user experience.\r\n\r\nTo control the whiteboard size, the special field would try to fill it's container, so the user can limit it's size like so:\r\n\r\n```\r\n.whiteboard {\r\n  height: 200px;\r\n  width: 200px;\r\n}\r\n\r\n<div class=whiteboard>{AnkiDroidWhiteboard}</whiteboard>\r\n```\r\n\r\nThis opens the possibility to make the whiteboard (and it's content) smaller on the back side.\r\n\r\nAny feedback is welcome."},"comment":{"url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/comments/396263552","html_url":"https://github.com/ankidroid/Anki-Android/issues/4868#issuecomment-396263552","issue_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/4868","id":396263552,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjI2MzU1Mg==","user":{"login":"mikehardy","id":782704,"node_id":"MDQ6VXNlcjc4MjcwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/782704?v=4","gravatar_id":"","url":"https://api.github.com/users/mikehardy","html_url":"https://github.com/mikehardy","followers_url":"https://api.github.com/users/mikehardy/followers","following_url":"https://api.github.com/users/mikehardy/following{/other_user}","gists_url":"https://api.github.com/users/mikehardy/gists{/gist_id}","starred_url":"https://api.github.com/users/mikehardy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikehardy/subscriptions","organizations_url":"https://api.github.com/users/mikehardy/orgs","repos_url":"https://api.github.com/users/mikehardy/repos","events_url":"https://api.github.com/users/mikehardy/events{/privacy}","received_events_url":"https://api.github.com/users/mikehardy/received_events","type":"User","site_admin":false},"created_at":"2018-06-11T14:29:21Z","updated_at":"2018-06-11T14:29:21Z","author_association":"CONTRIBUTOR","body":"Hi @pigoz - unfortunately it seems that the WebView is reloaded from front to back but if I have understood correctly, that is not a requirement, it is just the way things are done now.  It might be possible to author a PR that maintains state front to back and have that merged in?\r\n\r\nThere is actually a separate issue that may be solvable if the WebView state was maintained during the card flip, which is where I got this information: https://github.com/ankidroid/Anki-Android/issues/4828\r\n\r\nSee also discussion here: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/anki-android/BGXfuhixpRw/TYoWbbwoAwAJ"}}
{"actor":{"display_login":"mikehardy"}}