backdrop-issues icon indicating copy to clipboard operation
backdrop-issues copied to clipboard

[META][D8][UX] Convert all confirmation pages to confirmation dialogs instead.

Open klonos opened this issue 6 years ago • 7 comments

I had filed a couple of separate issues for this back in 2015, about specific pages. Let's make this issue here a meta to list all such issues.

First step would be:

  • [ ] #3771 | [UX] Introduce a confirm_dialog() function (and use that one instead of confirm_form())

Specific confirmation pages to be converted to dialogs:

  • [ ] #769 | [UX] Move the confirmation dialog for deletion of nodes to a modal.
  • [ ] #770 | [UX] Move the confirmation dialog for deletion of menu links to a modal.
  • [ ] #3770 | [UX] Move the confirmation dialog for enabling/uninstalling modules to a modal.

Related D8 issues:

Related D7 issues:

(Triaged as possible accessibility issue on 08/17/2921. This one may or many not qualify, please add the [A11Y] tag if you think it qualifies.)

klonos avatar May 13 '19 07:05 klonos

@BWPanda in https://github.com/backdrop/backdrop-issues/issues/1032#issuecomment-593799155 mentioned https://mdbootstrap.com/docs/jquery/modals/forms ...seems neat.

klonos avatar Mar 03 '20 16:03 klonos

Just a note that a confirm_dialog function wouldn't help. The confirm_form() function actually renders the confirm form itself so if youre using that function, youre already on the confirm form page, too late for a modal.

We'd need to go through all the links and buttons which lead to a confirm form page, and add the data-dialog / use-ajax attributes to them.

This would be a manual one by one thing for the 47 calls in core though.

docwilmot avatar Nov 18 '24 01:11 docwilmot

Indeed, we wouldn't need a confirm_dialog form to convert all confirmation pages to dialogs instead. I just made a few changes to some links as @docwilmot said, and it's working fine. I'm willing to make this manual change if you find it useful. I definitely think it's an improvement.

robertgarrigos avatar Dec 27 '24 17:12 robertgarrigos

And then the need to manually update all contrib?

izmeez avatar Dec 27 '24 20:12 izmeez

It will not be a need, though. confirm_form will still work as usual.

robertgarrigos avatar Dec 28 '24 21:12 robertgarrigos

This would be a manual one by one thing for the 47 calls in core though.

@docwilmot, what search do you do to find those 47 calls? Looking for $links['delete']gives me 22 results. Searching for return confirm_formgives me 41 results. How did you get with those 47 calls?

robertgarrigos avatar Jan 09 '25 08:01 robertgarrigos

I would like to give this other approach a try. Should I open a new issue for it?

robertgarrigos avatar Jan 09 '25 10:01 robertgarrigos