user-story icon indicating copy to clipboard operation
user-story copied to clipboard

Fix #97: Added delete feature in a story

Open kailash360 opened this issue 3 years ago • 6 comments

Issue Number

fixes #97

Describe the changes you've made

I have added the service to make a request of DELETE method, and also modified the apiCall function such that it can accommodate any request method. I have also added a Delete button in the page of a story tha the user can sue to delete a story.

Describe if there is any unusual behavior (Any Warning) of your code(Write NA if there isn't)

NA

Additional context (OPTIONAL)

NA

Test plan (OPTIONAL)

A good test plan should give instructions that someone else can easily follow.

Checklist

  • [x] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] All new and existing tests passed.
  • [x] The title of my pull request is a short description of the requested changes.

Provide a Deployed link of route/page that needs to review

Preview: Deploy preview link here with the appropriate route

https://user-images.githubusercontent.com/75155230/154649772-559d4a67-972e-41c6-b2e8-daeccf81e386.mp4

kailash360 avatar Feb 18 '22 08:02 kailash360

@mharshita I have created this PR for resolving the editing of a story, as discussed here .

kailash360 avatar Feb 18 '22 09:02 kailash360

This is a great work, the only thing is that we don't want to allow users to delete a story. We made this decision in the past to consider that stories may have information from other users supporting a request (screenshots, votes, additional information, etc), so only an admin should be able to delete a story either because it is inappropriate or invalid. But a user shouldn't have this option.

What we could do, is that a user reports a story to be deleted and that it triggers on the admin to be reviewed.

What do you think @kailash360 ? Could you change the implementation to go in this direction instead?

cyntss avatar Feb 18 '22 11:02 cyntss

@cyntss

Sure, we can replace the Delete feature, with a Report feature. The user who created that story will get an option - Request to Unpublish it, while other users will see a Report option. The functionality of both of them will remain the same.

I have thought of the following approach to this:

  • We can add a separate User-Story-Report model which will contain the username of the person who reported a story, the reason it was reported for, and the link to the story. The admin can visit this User-Story Report collection to see all the reports and take action accordingly by clicking on the link to that story. If the report was not strong enough, the admin can delete the report itself as well.

Kindly suggest if there is any other approach, or if I should start implementing this approach.

kailash360 avatar Feb 18 '22 17:02 kailash360

Report feature sounds good to me.

mharshita avatar Feb 23 '22 04:02 mharshita

@kailash360 after the implementation of the Reporting model on Strapi, have you followed up to create a Report feature on the front-end?

cyntss avatar Aug 31 '22 11:08 cyntss

@kailash360 after the implementation of the Reporting model on Strapi, have you followed up to create a Report feature on the front-end?

@cyntss As of now, I have developed the design of the frontend. Link to the design

We can close this PR, and I'll open another one that will add the Report modal displayed above.

kailash360 avatar Sep 03 '22 18:09 kailash360