Skip to content

Update admin user delete modal to use eventHub

What does this MR do and why?

This MR updates the admin user delete modal to use eventHub and migrates the modal content from HAML to Vue to resolve #344555 (closed).

The following changes are made with individual commits:

  1. Remove delete user modal HAML code. !83111 (6e962958)
  2. Update delete user modal to use eventHub. !83111 (b57864b4)
  3. Update delete actions to use eventHub. !83111 (03becc60)

Why use eventHub?

Basically it's a lot simpler, but here are some key reasons why:

  • Follows the existing pattern in the non-delete user actions.
  • Enables us to send the modal data as a JS object as opposed to serialized data attributes.
  • Avoids adding DOM event listeners on all elements that match the querySelector.

Next up

Move the messageHtml inside user actions to Vue components that slot into the confirm modal. #320922

Screenshots or screen recordings

https://www.loom.com/share/b56c235fa2a44ac5846c02827e8d522a

No visual changes.

How to set up and validate locally

  1. View the admin/users page at [GDK_HOST]/admin/users
  2. Click on three dots on a user in the admin table and confirm that it opens the correct modal.
  3. Click on a user to open the admin user view.
  4. On each tab, click on a delete action to confirm it opens the correct model.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #344555 (closed)

Edited by Jiaan Louw

Merge request reports

Loading