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

Removing yourself from owner of a gem should confirm first #5058

Open
martinemde opened this issue Sep 21, 2024 · 3 comments
Open

Removing yourself from owner of a gem should confirm first #5058

martinemde opened this issue Sep 21, 2024 · 3 comments

Comments

@martinemde
Copy link
Member

When you're editing ownerships, it's possible to remove yourself. This is fine.

However, it's really easy to misclick and delete yourself, which could be an especially painful thing to correct depending on the gem and its owners.

Steps to Reproduce

  1. Be an owner of a gem with at least 1 other person
  2. Remove yourself as owner when you meant to remove someone else
  3. Wonder why you lost access to the ownership view of the gem.

Expected Behavior

I am presented with a more explicit confirmation about the irreversible thing I'm doing.

Another improvement would be to set the current user apart from the other owners, maybe always at the top and always with a separate border.

Current Behavior

With more than a couple owners, making sure you're clicking the right one is not foolproof.

Possible Solution

Since this is so painful to reverse and so unique compared to removing anyone else, maybe we should add a specific page for the "remove myself" action that says "this is irreversible. you will need to ask another owner to re-add to regain ownership" and offers a confirm.

@colby-swandale
Copy link
Member

We have a dialog option for the delete action, is this not showing up?

<%= button_to "Remove",
rubygem_owner_path(@rubygem.slug, ownership.user.display_id),
method: "delete",
data: { confirm: t("owners.index.confirm_remove") },
class: "form__submit form__submit--small" %>

@colby-swandale
Copy link
Member

A typical UI for dangerous actions is showing a popup that requires inputting the name of the thing (username) as confirmation would serve well?

@martinemde
Copy link
Member Author

It does put the dialog but I already knew I was removing an ownership so the dialog was expected. Either entering the name or making a unique screen for removing yourself is probably what I'm expecting. Entering a name is more difficult but also, how often does anyone remove an owner? It's probably ok to do it that way.

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

No branches or pull requests

2 participants