Skip to content

Comments

[DEV-552] Implement CommentBox#80

Open
davidweizhongliu wants to merge 4 commits intoimplement-question-view-pagefrom
david_comment_box
Open

[DEV-552] Implement CommentBox#80
davidweizhongliu wants to merge 4 commits intoimplement-question-view-pagefrom
david_comment_box

Conversation

@davidweizhongliu
Copy link

References

Proposed Changes

  • Added CommentBox.tsx

@linear
Copy link

linear bot commented Feb 17, 2026

@vercel
Copy link

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
help Error Error Feb 21, 2026 5:34pm

Request Review

Copy link
Contributor

@issacli-0821 issacli-0821 left a comment

Choose a reason for hiding this comment

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

Can you fix the linting errors? And can you use the Evergreen components instead of native html ones?

Copy link
Contributor

@issacli-0821 issacli-0821 left a comment

Choose a reason for hiding this comment

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

Left some comments!

comment,
username,
isLikedByCurrentUser = false,
onHeartClick,
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need onHeartClick and onMoreClick to be props. They can be defined in this component as an alert for now

isExpanded || !shouldTruncate ? comment.text : comment.text.slice(0, maxLength) + '...';

return (
<div className='flex items-start gap-3 pb-4'>
Copy link
Contributor

Choose a reason for hiding this comment

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

All the divs should become Evergreen Pane elements

isLikedByCurrentUser = false,
onHeartClick,
onMoreClick,
showThreadLine = false,
Copy link
Contributor

Choose a reason for hiding this comment

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

These also do not need to be props. The thread line should always be shown.

onHeartClick,
onMoreClick,
showThreadLine = false,
maxLength = DEFAULT_MAX_LENGTH,
Copy link
Contributor

Choose a reason for hiding this comment

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

maxLength can be defined as a constant in this file instead of a prop

import { FaHeart, FaEllipsisH } from 'react-icons/fa';
import { FaUser } from 'react-icons/fa6';

import type { Comment } from '../api/commentService';
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make this comment a type in frontend/types.ts. Include the fields that are in the models.py

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