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

[breadboard-web] Investigate deletion of entries on the Secrets section of the Settings page #2434

Open
alexandraM98 opened this issue Jul 5, 2024 · 3 comments
Assignees

Comments

@alexandraM98
Copy link
Contributor

In the visual editor, in the Settings modal under the Secrets section, there is something I noticed with the behaviour when deleting an entry which I found a bit counterintuitive.

For example, if I have an existing entry and I click the "trash" icon to delete it, I get asked to confirm the action and then the list is empty with the message "There are currently no entries". This seemed to indicate that the entries were indeed removed. However, it looks like the changes won't apply unless I also click Save before closing the modal, because when I reloaded the page and went back to settings the entry I had "deleted" was still there.

An idea could be to temporarily add deleted entries to a list to indicate that they are "pending deletion" and then when the users click on "Save" at the bottom, they could then get a message from the browser asking if they are sure they want to delete the entries on the "pending" list.

Below is a screenshot of a quick mockup to help with visualising the suggestion above:

Image

@paullewis
Copy link
Contributor

paullewis commented Jul 5, 2024

You're absolutely right, it's counterintuitive. Another approach would be to eagerly emit the change since we already ask you if you're sure you want to do it. So I think we should pick one: either don't ask and have a "pending you hitting save" button or we do it eagerly. I think I prefer the former as you might think "bah, I accidentally deleted the wrong secret" and you still have a chance to back out of the change.

What do you think?

@Mearman
Copy link
Collaborator

Mearman commented Jul 8, 2024

A suggestion for the best UX for the pending mode.

  • Only enable and colour the save button when there are actual changes to be saved.
  • For "super users" have a "delete without prompt" e.g. Shift + Backspace
    • The "Save" still needs to be pressed after.
@alexandraM98
Copy link
Contributor Author

Personally, I would prefer to have a way of backing out of deleting secrets too. I agree with using the former approach that you mentioned @paullewis.
I could start looking into implementing this feature following a similar approach to what I presented in the screenshots above if that's okay. But, additionally, it might also be useful to have some "undo" icon next to each entry pending deletion so that people can add/remove entries from that list without having to hit Cancel and then reopen the Settings modal.

I also agree with the UX suggestion from @Mearman. I think disabling the Save button until there's an actual change to "commit" is a good idea.

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