Image Occlusion: Add an error message if no masks are set
- 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
- 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
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
i can solve this issue please assign me!
Hi! Just checking in — is this issue still in progress? If not, could you assign it to me?
@tarone-saloni
@david-allison Hi, I won’t be able to work on this issue. Since he is interested, please assign it to him. Thank you!