-
Notifications
You must be signed in to change notification settings - Fork 2
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
Delete Contribution Flow(frontend) #130
Delete Contribution Flow(frontend) #130
Conversation
Thanks @NKoech123 ! I'll take a look. I think I know what's going on with this, we need to do a background refresh of the Contributions after the delete -- going to see, and then I can show you what's up if this is what's going on with it. |
Thanks @jonathanprozzi !! |
} | ||
aria-label="Delete Contribution" | ||
/> | ||
<DeleteContributionDialog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, not sure why we'd want to split this off from the Table itself
The delete icon button should be able to call the Dialog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. I made some changes based on your comments above (letting the icon button call the Dialog)
apps/protocol-frontend/src/components/DeleteContributionDialog.tsx
Outdated
Show resolved
Hide resolved
<Button | ||
colorScheme='red' | ||
color="brand.primary.600" | ||
backgroundColor="brand.primary.100" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we may want to use red for this -- remove the backgroundColor
@NKoech123 A few comments about the styles (we should stick with white for the dialog since it's a similar UI pattern to our modals -- appreciate that you tried 3 versions!) The state issues are from the button + handlers being moved into the Dialog itself -- let's keep that split and pass the handler from the ContributionTable -> AlertDialog via the delete icon. So we'll want to add that delete icon back to the Table. |
…iately after confirm
…id to row.original.user !== userData?.id
I'm running this locally and I'm not able to edit/delete any of my contributions -- do you have this locally @NKoech123 |
I was able to do all the editing/deleting yesterday and all worked well. Let me jumped on my desk now. Will get back to you in a few minutes |
apps/protocol-frontend/src/components/DeleteContributionDialog.tsx
Outdated
Show resolved
Hide resolved
@NKoech123 some of the Prettier settings seem different too -- I'm seeing a lot of extra lines and spaces in the PR. Is everything formatting on save? |
setDialog({ | ||
...dialog, | ||
isOpen: true, //this opens AlertDialog | ||
title: "Are you sure you want to delete this contribution? You can't undo this action afterwards", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change the title to: `"Are you sure you want to delete this Contribution? You can't undo this action."
We tend to capitalize Contribution thoughout the app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment addressed. I have updated the title.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work overall! Delete works great. Have some questions I left as comments throughout.
@jonathanprozzi Thanks for pointing out the extra spaces in the PR. I just noticed that's not a good practice. That's due to me altering pre-existing code and not checking line by line before pushing. I have taken note of that. |
@jonathanprozzi I also saw your comment above about not being able to edit/delete contribution on your side. Initially I didn't have this issue. Now I am seeing this issue. Let me debug the issue at the moment |
> @jonathanprozzi I also saw your comment above about not being able to edit/delete contribution on your side. Initially I didn't have this issue. Now I am seeing this issue. Let me debug the issue at the moment And finally the actions icons are back and functioning. Let me know if you encounter something interesting on your side. |
Still seeing an odd bug with the Edit and Delete -- it's fine on refresh/initial load and then disabled after navigating back and forth: delete-disabled.mp4 |
HI @jonathanprozzi , |
… ui after merge conflicts
@alexkeating @NKoech123 - resolved merge conflicts and fixed a few small things. Will fix the type issue too before this is ready Also, Keating -- the fix you put up earlier with the commit I added on top resolves the remaining bug with this, so we can merge yours first and then this one |
…Icon-not-deleting-stagedContributions
Linear Ticket
PRO-287: https://linear.app/govrn/issue/PRO-287/delete-icon-not-deleting-staged-contributions
Description
@jonathanprozzi
Updates:
a dialog when the delete icon is clicked. The dialog enables a User to either cancel the deleting process or proceed.
Please refer to the screenshots below.
Later changed the "Delete" Button to "Confirm". I thought "Confirm" makes more sense.
Contribution Successfully deleted!