[DEV-552] Implement CommentBox#80
Open
davidweizhongliu wants to merge 4 commits intoimplement-question-view-pagefrom
Open
[DEV-552] Implement CommentBox#80davidweizhongliu wants to merge 4 commits intoimplement-question-view-pagefrom
davidweizhongliu wants to merge 4 commits intoimplement-question-view-pagefrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
issacli-0821
requested changes
Feb 17, 2026
issacli-0821
requested changes
Feb 20, 2026
Contributor
issacli-0821
left a comment
There was a problem hiding this comment.
Left some comments!
frontend/components/CommentBox.tsx
Outdated
| comment, | ||
| username, | ||
| isLikedByCurrentUser = false, | ||
| onHeartClick, |
Contributor
There was a problem hiding this comment.
We don't need onHeartClick and onMoreClick to be props. They can be defined in this component as an alert for now
frontend/components/CommentBox.tsx
Outdated
| isExpanded || !shouldTruncate ? comment.text : comment.text.slice(0, maxLength) + '...'; | ||
|
|
||
| return ( | ||
| <div className='flex items-start gap-3 pb-4'> |
Contributor
There was a problem hiding this comment.
All the divs should become Evergreen Pane elements
frontend/components/CommentBox.tsx
Outdated
| isLikedByCurrentUser = false, | ||
| onHeartClick, | ||
| onMoreClick, | ||
| showThreadLine = false, |
Contributor
There was a problem hiding this comment.
These also do not need to be props. The thread line should always be shown.
frontend/components/CommentBox.tsx
Outdated
| onHeartClick, | ||
| onMoreClick, | ||
| showThreadLine = false, | ||
| maxLength = DEFAULT_MAX_LENGTH, |
Contributor
There was a problem hiding this comment.
maxLength can be defined as a constant in this file instead of a prop
frontend/components/CommentBox.tsx
Outdated
| import { FaHeart, FaEllipsisH } from 'react-icons/fa'; | ||
| import { FaUser } from 'react-icons/fa6'; | ||
|
|
||
| import type { Comment } from '../api/commentService'; |
Contributor
There was a problem hiding this comment.
Let's make this comment a type in frontend/types.ts. Include the fields that are in the models.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Proposed Changes