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

Rjwebb/add sentiment check comments #39

Merged
merged 11 commits into from
Apr 23, 2024

Conversation

rjwebb
Copy link
Contributor

@rjwebb rjwebb commented Apr 22, 2024

This PR adds a feature that allows users to submit comments under the "sentiment check" section of surveys.

Screenshot 2024-04-22 at 3 24 21 PM

Changes:

  • Created a new sentiment_check_comments table to store these comments
  • Created a basic unstyled UI for displaying, creating and deleting (only possible if the user is the creator of the comment) sentiment check comments
  • Created GET/POST/DELETE API routes to enable this
  • Installed swr for fetching sentiment comments from the API

Questions for @raykyri:

  • Other than the user who posted the comment, do we want anyone else to be able to delete comments? Administrators? The conversation owner?

TODO:

  • Styling
  • API tests - we don't have these for other parts of the app but this would be an easy place to start
  • Display "Delete" button based on whether the user can delete comments
  • Deleting comments should set an "is_deleted" value, i.e. this is a "soft delete"
  • Admins should be able to delete comments as well as the comment creator
  • Deleted comments should display a placeholder

@rjwebb rjwebb marked this pull request as ready for review April 23, 2024 14:27
@raykyri raykyri merged commit f1cac43 into main Apr 23, 2024
1 check failed
@rjwebb rjwebb deleted the rjwebb/add_sentiment_check_comments branch August 23, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants