-
Notifications
You must be signed in to change notification settings - Fork 8
"Add Popover component and support for adding reactions to comments" #60
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
"Add Popover component and support for adding reactions to comments" #60
Conversation
This commit adds a new component, Popover, to the components/ui/popover.tsx file. The Popover component is used to create a UI element with interactive content. It utilizes the @radix-ui/react-popover library for the implementation. This refactor enhances the user experience by providing a versatile and customizable popover functionality for various use cases.
This commit adds the functionality to add reactions to comments in the student dashboard. It introduces a new function, addReactionToComment, which allows users to react to comments with different types of reactions. The function handles updating and deleting reactions based on the user's selection. This enhancement improves the user experience by providing an interactive way for students to engage with comments in the dashboard.
…tionality This commit updates the CommentsSections component in the components/dashboards/Common/CommentsSections.tsx file. The changes include refactoring the component to improve its UI and functionality. It removes unused imports, simplifies the code structure, and adds support for lazy loading of images. These updates enhance the user experience by improving the performance and visual appeal of the comments section in the dashboard.
…tionality, this allow the user to reply and react to comments in a simple UI
…comments This commit updates the CommentEditor component in the components/dashboards/student/course/lessons/CommentEditor.tsx file. The changes include adding support for editing existing comments by passing a comment_id prop to the component. When the comment_id prop is provided, the component updates the comment instead of creating a new one. This enhancement improves the user experience by allowing students to edit their comments without having to delete and recreate them.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…ality This commit updates the CreateCourse component in the components/dashboards/teacher/course/CreateCourse.tsx file. The changes include refactoring the component to improve its UI and functionality. It removes unused imports, simplifies the code structure, and updates the validation schema for the form fields. These updates enhance the user experience by improving the performance, usability, and reliability of the CreateCourse feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very nice, please check the comments
@@ -18,7 +18,7 @@ export async function POST (req: Request) { | |||
const supabase = createClient() | |||
|
|||
const result = await streamText({ | |||
model: google('models/gemini-1.5-flash-latest'), | |||
model: google('models/gemini-1.5-pro-latest'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why using the pro model instead of the flash one?
const reactionTypes: Array<{ | ||
type: Tables<'comment_reactions'>['reaction_type'] | ||
icon: any | ||
color: string | ||
}> = [ | ||
{ type: 'like', icon: ThumbsUp, color: 'text-blue-500' }, | ||
{ type: 'funny', icon: Smile, color: 'text-yellow-500' }, | ||
{ type: 'boring', icon: Meh, color: '' }, | ||
{ type: 'dislike', icon: ThumbsDown, color: 'text-red-500' } | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually is a constant array, move it outside the component
This commit updates the const.ts file in the utils directory. It adds new imports for the Meh, Smile, ThumbsDown, and ThumbsUp icons from the lucide-react library. Additionally, it adds a new array of reaction types with their corresponding icons and colors. These changes enhance the functionality and visual appeal of the code by providing support for comment reactions and improving the user experience.
…add support for comment reactions This commit updates the CommentsCard component in the components/dashboards/Common/comments/CommentsCard.tsx file. The changes include removing unused imports for the Meh, Smile, ThumbsDown, and ThumbsUp icons from the lucide-react library. Additionally, it adds support for comment reactions by importing the necessary constants from the utils/const.ts file. These updates improve the code by removing unnecessary dependencies and enhancing the functionality of the CommentsCard component.
…plying-and-reactions-modernize-ui
This pull request includes several commits that add new features and improvements to the codebase. The main changes are:
Added a new component, Popover, which allows for the creation of UI elements with interactive content. This component utilizes the @radix-ui/react-popover library for implementation.
Added support for adding reactions to comments in the student dashboard. Users can now react to comments with different types of reactions, and the functionality handles updating and deleting reactions based on user selection.
Updated the CommentsSections component with improved UI and functionality. The changes include removing unused imports, simplifying the code structure, and adding support for lazy loading of images. These updates enhance the performance and visual appeal of the comments section in the dashboard.
Updated the CommentEditor component to support editing existing comments. Students can now edit their comments without having to delete and recreate them.
These changes enhance the user experience by providing versatile and customizable popover functionality, interactive comment reactions, and improved UI and functionality for comments in the student dashboard.