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

[UI] Confirmation dialog when deleting a hook #957

Closed
helfi92 opened this issue Jul 2, 2019 · 10 comments · Fixed by #1068

Comments

@helfi92
Copy link
Member

@helfi92 helfi92 commented Jul 2, 2019

Destructive actions (e.g., a delete operation) should have a confirmation step.
It’s an added click but will prevent accidental data loss frustration.

STR:

  1. Navigate to http://localhost:5080/hooks/garbage/abc456
  2. Hover/Click on the triple vertical dots icon then click on "Delete Hook"

Screen Shot 2019-07-02 at 3 59 57 PM

Actual: The client will try to delete right away

Expected: A confirmation dialog shows up using the custom DialogAction component.

@rbrishabh

This comment has been minimized.

Copy link
Collaborator

@rbrishabh rbrishabh commented Jul 3, 2019

Can I take up this issue? Thanks!

@helfi92

This comment has been minimized.

Copy link
Member Author

@helfi92 helfi92 commented Jul 3, 2019

Go for it.

@rbrishabh

This comment has been minimized.

Copy link
Collaborator

@rbrishabh rbrishabh commented Jul 17, 2019

Hi @helfi92 ! I am sorry for the delay!

I am not able to configure the user-config.yml file needed to start the taskcluster web-server service. Can you please help me with the same?

This is the error I am getting.

taskcluster-error

This is my user-config.yml file, it is situated in web-server directory.

Untitled

Where am I going wrong?

@helfi92

This comment has been minimized.

Copy link
Member Author

@helfi92 helfi92 commented Jul 17, 2019

Remove everything under pulse and login. That should hopefully fix the issue.

defaults:
  taskcluster:
    rootUrl: https://taskcluster.net
@rbrishabh

This comment has been minimized.

Copy link
Collaborator

@rbrishabh rbrishabh commented Jul 17, 2019

Thanks! That fixed the issue!
Right now, when I hover over the three dots, it says (Auth Required) along with Delete Hook.

Do I need to set up taskcluster credentials as it is mentioned here?
https://github.com/taskcluster/taskcluster/tree/master/services/web-server

@helfi92

This comment has been minimized.

Copy link
Member Author

@helfi92 helfi92 commented Jul 17, 2019

You should be able to login with any credentials (e.g., clientId: "foo", access token: "bar").

@rbrishabh

This comment has been minimized.

Copy link
Collaborator

@rbrishabh rbrishabh commented Jul 17, 2019

Thanks a lot once again!

I did create a confirmation dialog and was able to implement it successfully.

Does it look okay? Or do I need to make any UI changes?

how-is-it

Also I got a lot of prettier errors. How do I go about solving them? Thanks again!

@helfi92

This comment has been minimized.

Copy link
Member Author

@helfi92 helfi92 commented Jul 17, 2019

My pleasure :-) Good questions!

Does it look okay? Or do I need to make any UI changes?

Add a title prop with value Delete?. Next, modify the body to say This will delete <hook-group-id><hook-id>.

Also I got a lot of prettier errors. How do I go about solving them?

You can fix most linting errors by running yarn lint --fix inside the ui directory.

@rbrishabh

This comment has been minimized.

Copy link
Collaborator

@rbrishabh rbrishabh commented Jul 18, 2019

Hey! Thanks yarn lint --fix fixed them all!

Does this look okay?

is this ok

Let me know if I need to make any other changes!

Also, I created user-config.yml. Before making a pull request, do I need to delete it?

@helfi92

This comment has been minimized.

Copy link
Member Author

@helfi92 helfi92 commented Jul 18, 2019

Does this look okay?

Yep.

Also, I created user-config.yml. Before making a pull request, do I need to delete it?

No need to delete it. It is actually in .gitignore so git will not ask you to add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.