Summary
Now that we have displayed hCaptcha in the VisualEditor interface where possible during the first time the user opens the window, we should look to programmatically cause execution of hCaptcha when a user presses "Save changes" to complete the edit
Background
- In T407196: hCaptcha VisualEditor: Render hCaptcha in save changes dialog as soon as this is possible, we updated the VisualEditor captcha handling to make it possible to display the hCaptcha widget earlier in the editing workflow process (in specific circumstances)
- When both in those specific circumstances are met and hCaptcha is in invisible mode, we should execute hCaptcha on behalf of the user if they press "Save changes"
- This emulates the behaviour of the existing hCaptcha secure enclave handling in the wikitext editor, as execution is triggered when the user submits their edit
- When both in those specific circumstances are met and hCaptcha is in invisible mode, we should execute hCaptcha on behalf of the user if they press "Save changes"
- We should not programmatically execute hCaptcha when any of the following apply:
- The hCaptcha widget was shown only after the user first attempted to save their edit - This will be handled in T406364: hCaptcha VisualEditor: Fix execution for captcha error handler when in invisible mode / secure enclave mode and needs Design input
- hCaptcha is not in invisible mode (though arguably we could do this to save the user a click)
Technical notes
TBD
Acceptance criteria
- When a user opens the VisualEditor "Publish changes" dialog and presses "Publish changes", any invisible hCaptcha widget displayed is executed as long as it was rendered before the first attempt to press "Publish changes" was made