leofuturer / eDrops3

The 3rd generation of the eDrops web application.
MIT License
0 stars 0 forks source link

Added edit/delete features to forum posts #128

Closed cdevadhar closed 3 months ago

cdevadhar commented 7 months ago

Added a dropdown menu to edit/delete posts on the forum. Added PATCH AND DELETE to the /users/{id}/posts/{postId} endpoint that handle editing/deleting a post with the given id.

Kenny477 commented 7 months ago

Looks good functionality wise. I think you are using a new package here react-modal. Traditionally we've implemented modals ourselves, but it's fine as long as you can make the modal look and function consistently. Not too worried about looks for now, but some feedback:

If you want some reference to modals we've made in the past check out the client/main site. If you upload a file on the client site, a modal will appear. Note that you can only upload dxf files (you can check out the Google Drive for some sample ones for testing or just rename a file "a.dxf" and it should work). I think on the community site, there is a modal for adding image attachments when creating a post/project.

Kenny477 commented 7 months ago

I'll approve this PR, but if you want to work more on it, just ping me again for review later.

Also I think you mentioned you need to implement it for projects as well, so we can wait for that too.

cdevadhar commented 7 months ago

Thanks for the review and suggestions! I think I will add the same features for the projects and make the changes you suggested before we merge this. I'll probably ask you for review again in the next couple of days.

Kenny477 commented 3 months ago

Sorry I got to this so late (for a review feel free to drop me an email if I don't see the PR).

Editing looks and works fine, however deleting doesn't seem to work. The button doesn't seem to issue a network request to the backend.

Also, less important but when you have the time please adjust the modal size (currently I have to scroll to see the delete button).