Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Image Occlusion: Add an error message if no masks are set

Open david-allison opened this issue 2 months ago • 6 comments

  • Share an image to AnkiDroid as 'Image Occlusion'
  • Click 'save'

Expected

  • A user is informed that masks must be added before an IO note is saved

Actual

  • No error occurs, screen stays open

Code:

https://github.com/ankitects/anki/blob/dac26ce67147b261d79a56092320cc2f5af0d990/ts/routes/image-occlusion/%5B...imagePathOrNoteId%5D/%2Bpage.ts#L11-L13

david-allison avatar Nov 08 '25 18:11 david-allison

  • There appears to be no way to listen to the state changes of the screen
    • (whether there are any valid masks)
  • The JS does not inform us that the method failed

Therefore it's best to wait for upstream to determine how to provide us with this information

david-allison avatar Nov 08 '25 21:11 david-allison

https://github.com/ankidroid/Anki-Android/labels/Good%20First%20Issue%21

  • View the upstream code, and confirm my findings in https://github.com/ankidroid/Anki-Android/issues/19443#issuecomment-3506928424 are correct
  • Summarize the issue, and our requirements from a code change in https://github.com/ankitects/anki/blob/dac26ce67147b261d79a56092320cc2f5af0d990/ts/routes/image-occlusion/%5B...imagePathOrNoteId%5D/%2Bpage.ts#L25-L28

We will then be able to post an issue upstream, and block this issue until upstream Anki provides functionality to cleanly solve this

david-allison avatar Nov 08 '25 21:11 david-allison

i can solve this issue please assign me!

tarone-saloni avatar Nov 12 '25 08:11 tarone-saloni

Hi! Just checking in — is this issue still in progress? If not, could you assign it to me?

mariamikv avatar Dec 03 '25 18:12 mariamikv

@tarone-saloni

david-allison avatar Dec 03 '25 21:12 david-allison

@david-allison Hi, I won’t be able to work on this issue. Since he is interested, please assign it to him. Thank you!

tarone-saloni avatar Dec 06 '25 15:12 tarone-saloni