Skip to content

"Add chat functionality for students" #68

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

Merged

Conversation

guillermoscript
Copy link
Owner

This pull request adds chat functionality for students. It includes new functions studentCreateNewChat and studentSubmitMessage to handle chat functionality. The studentCreateNewChat function creates a new chat entry in the database with the provided chat type and title. The studentSubmitMessage function allows students to submit messages to existing chats. Additionally, it adds components such as HoverCard, StudentChatSidebar, FreeChat, SuggestionsContainer, Error, ChatPage, and CoursesLayout to enhance the user experience and improve the organization and structure of the chat feature.

"Refactor and add UI enhancements for chat feature"

This commit adds new functions `studentCreateNewChat` and `studentSubmitMessage` to handle chat functionality for students. The `studentCreateNewChat` function creates a new chat entry in the database with the provided chat type and title. The `studentSubmitMessage` function allows students to submit messages to existing chats. These new functions enhance the communication capabilities of the application for students.
This commit adds the SuggestionsContainer component to handle chat suggestions in the chat feature. The component renders a list of suggestion buttons with titles and descriptions, allowing users to click on a suggestion to perform an action. This enhancement improves the user experience by providing helpful suggestions for chat interactions.
This commit adds the Error component to handle and display errors that occur while loading the chat. The Error component logs the error to an error reporting service and renders a GenericError component with a retry button. This enhancement improves the error handling and user experience when encountering loading errors in the chat feature.
This commit adds the ChatPage component, which displays a selection of chat options for students. It includes badges for different chat types and a HoverCard component for additional information. This enhancement improves the user experience by providing a user-friendly interface for students to interact with the chat feature.
This commit adds a background color to the BigSidebar component in order to improve the visual appearance and provide better contrast with the content. The background color is set to "bg-gray-100/40" and the component is also rounded using the "rounded-lg" class. This enhancement enhances the overall design of the sidebar in the application.
This commit modifies the chat message structure in the Supabase database to include support for chat type and title. It adds the "chat_type" and "title" fields to the "chats" and "messages" tables, allowing for better organization and categorization of chat conversations. This enhancement improves the functionality and user experience of the chat feature.
This commit adds the CoursesLayout component, which provides the layout for the student chat page. It fetches chat data from the Supabase database based on the chat ID and renders the chat title along with the children components. This enhancement improves the organization and structure of the chat page, enhancing the user experience.
This commit updates the styles of the ChatInput component in the Common/chat/chat.tsx file. The border radius of the component is changed from "rounded-l-lg" to "rounded" to ensure consistent styling. This refactor improves the visual appearance and maintains a cohesive design across the application.
This commit updates the styles of the StudentChatSidebar component in the components/dashboards/student/chat/StudentChatSidebar.tsx file. The "ul" element now has the "overflow-auto" class, allowing for scrollable content when there are many chat items. This refactor improves the visual appearance and usability of the chat sidebar.
This commit modifies the CreateCoursePage component in the app/dashboard/teacher/courses/page.tsx file. It updates the query to fetch courses from the Supabase database and orders them by the "created_at" field in descending order. This refactor improves the ordering of courses and ensures that the most recently created courses are displayed first.
@guillermoscript guillermoscript linked an issue Jun 23, 2024 that may be closed by this pull request
@guillermoscript guillermoscript added enhancement New feature or request Sub-task labels Jun 23, 2024
Copy link

vercel bot commented Jun 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lms-front ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2024 8:17pm

Copy link
Collaborator

@HectorZR HectorZR left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 🚀 🚀 🚀

@HectorZR HectorZR merged commit b021345 into master Jun 23, 2024
2 of 3 checks passed
@guillermoscript guillermoscript deleted the 64-free-chat-implement-ai-powered-conversational-interface branch June 23, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Sub-task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Free Chat] Implement AI- Powered Conversational Interface
2 participants