the-engine-room / alidade

Tool Selection Assistant
Creative Commons Zero v1.0 Universal
16 stars 6 forks source link

"Save before leaving this page" modal alert #31

Open IronRunes opened 7 years ago

IronRunes commented 7 years ago

As defined by @OzrenMuic , implement a solution to limit user data loss in case a user leaves a slide without hitting the "Next" button

IronRunes commented 7 years ago

So now it just saves stuff when you click on links on the sidebar. we might want to extend functionality to other links/buttons, as (maybe) something in the footer or the homepage link.

thomwithoutanh commented 7 years ago

Currently, I can start a project as a disposable user, enter text, and then just close the page without anything happening.

Can we ensure that an alert prompting people to save appears before they leave the page?

image

IronRunes commented 7 years ago

I added the controls, it now alerts you when:

  1. you click on links or buttons OUTSIDE of the scope of the tool while WITHIN the tool's process
  2. You shut down the browser

I haven't yet found a way of intercepting the browser tab close event that is consistent and compatible with our desired UX.

thomwithoutanh commented 7 years ago

@IronRunes Is there any way to alter the alert messages so that the user knows they can save their content by registering?

Right now, as a user it wouldn't be clear to me how to do that - I would just think 'oh, maybe I have to complete it in one go, then'.

Chrome:

image

Firefox: image

IronRunes commented 7 years ago

@thomwithoutanh unfortunately no, we cannot change that text. It is browser-defined and I cannot meddle with it. :(