Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UX] Update Help text on the account cancellation screen #5283

Open
klonos opened this issue Oct 2, 2021 · 6 comments · May be fixed by backdrop/backdrop#3783
Open

[UX] Update Help text on the account cancellation screen #5283

klonos opened this issue Oct 2, 2021 · 6 comments · May be fixed by backdrop/backdrop#3783

Comments

@klonos
Copy link
Member

klonos commented Oct 2, 2021

Related to: #5121

Problem/Motivation

When a user visits the account cancellation form, We have four options:

  • Disable the account and keep its content.
  • Disable the account and unpublish its content.
  • Delete the account and make its content belong to the Anonymous user.
  • Delete the account and its content.

And the description below states:

Select the method to cancel the account above. This action cannot be undone.

The "This action cannot be undone" statement does not apply to the first two options though.

Our Drupal brethren in https://www.drupal.org/project/drupal/issues/3199972 have decided the following:

We discussed this issue at #3200598: Drupal Usability Meeting 2021-02-26

The suggestion was to update the text of last two options to include word "Permanently".
The last two options will be:

  • Permanently delete the account and make its content belong to the "anonymous user name" user.
  • Permanently delete the account and its content.

And the other suggestion is to remove the following text from the description available below the options:

This action cannot be undone.

In our case, the "Cancel account" button is also a red danger button, which shouldn't be the case if one of the two first options are selected.

@klonos
Copy link
Member Author

klonos commented Oct 2, 2021

This issue is both a bug (fix text inaccuracies) and a task (text tweaks/clarifications).

@klonos
Copy link
Member Author

klonos commented Oct 4, 2021

As @jlfranklin said in #5121 (comment)

...we can relabel the Cancel Account button as "Suspend / Delete" or split it into two buttons, and use #states to show one of them. (Can #states relabel a button?)

Well no, #states cannot relabel a button, but having two buttons and showing/hiding them selectively can be done via #states. That's what I've done with my PR here: backdrop/backdrop#3783

Before/after screenshots to follow...

@klonos
Copy link
Member Author

klonos commented Oct 4, 2021

  • user1 selects a "safe" cancelation method for their own account (before/after):
    image
  • user1 selects an "unsafe" method for their own account (before/after):
    image
  • user1 selects a "safe" cancelation method for someone else's account (before/after):
    image
  • user1 selects an "unsafe" method for someone else's account (before/after):
    image

Changes:

  • Removed the "Select the method to cancel the account above." text, as it provides no value. Moreover, this help text was previously shown after the "Require email..." checkbox, which made it "disconnected" from the radios with the account cancelation options).
  • Removed the "When cancelling the account" text, which was previously a separate '#type' => 'item' Form API element. Replaced it with "Cancellation method", which is a proper '#title' property defined in the radios form element.
  • Prepended the "Permanently" word in the labels of the 2 last "dangerous" methods (radio labels).
  • The "This action cannot be undone" text is now styled as a warning, and also only shown if the action actually cannot be reversed.
  • The "Cancel account" button is a red "danger" button only if the action actually cannot be reversed.

@klonos
Copy link
Member Author

klonos commented Oct 4, 2021

Logged in as the non-admin user with the "Editor" role, and attempting to delete own account (after granting the "Cancel own user account" permission)...

  • With a "safe" method specified as the default under admin/config/people/settings (before/after):
    image
  • With a "dangerous" method specified as the default under admin/config/people/settings (before/after):
    image

Changes:

  • Help text broken down to distinct consequences/results, styled in a bullet point list.
  • Red "danger" button only when a dangerous action is to be confirmed.
  • "This action cannot be undone" is a proper warning message.

@klonos
Copy link
Member Author

klonos commented Oct 4, 2021

Still logged in as the non-admin user with the "Editor" role, and attempting to delete own account, but this time with the "Select method for cancelling own account" permission as well...

  • With a "safe" method specified as the default under admin/config/people/settings (before/after):
    image
  • With a "dangerous" method specified as the default under admin/config/people/settings (before/after):
    image

@klonos
Copy link
Member Author

klonos commented Oct 4, 2021

Bonus: #5286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant