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

Comments fully implemented #186

Merged
merged 8 commits into from
Jan 29, 2024
Merged

Comments fully implemented #186

merged 8 commits into from
Jan 29, 2024

Conversation

willi-li-am
Copy link
Contributor

@willi-li-am willi-li-am commented Jan 26, 2024

Used slate-react to input and show comments
Added new route called '/comments'

  • post, creates new comment (no form validation on backend)
  • get, gets all comments + replies with ticket id
    • Aggregates replies in an array in the response
  • No edits and deletion yet

Every comment is stored in comments (replies too)

  • Reference code is either _id of parent comment or ticket_id

No error toasts yet

Had a few issues with getting the comments to update with slate and emptying the input, so whenever function getComments in frontend is called, it forcefully rerenders the whole comment section

Also had issues with placeholder text, since it wouldn't follow the padding I gave to the text area

  • decided to remove placeholder altogether

resolves #65

Copy link
Collaborator

@victorzheng02 victorzheng02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fire, just had a few small comments

backend/models/comment.model.js Outdated Show resolved Hide resolved
backend/routes/comments.routes.js Outdated Show resolved Hide resolved
backend/service/comments.service.js Show resolved Hide resolved
frontend/public/index.html Outdated Show resolved Hide resolved
frontend/src/components/CommentInput.js Show resolved Hide resolved
frontend/src/components/CommentInput.js Outdated Show resolved Hide resolved
frontend/src/components/CommentView.js Outdated Show resolved Hide resolved
@willi-li-am willi-li-am merged commit 3aed4f8 into master Jan 29, 2024
1 of 2 checks passed
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.

Create comment section attached to each main content view
3 participants