-
Notifications
You must be signed in to change notification settings - Fork 8
Refactor Notifications feature and add support for comment reactions #62
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
guillermoscript
merged 17 commits into
master
from
17-specific-view-for-reading-all-the-new-notifications
Jun 22, 2024
Merged
Refactor Notifications feature and add support for comment reactions #62
guillermoscript
merged 17 commits into
master
from
17-specific-view-for-reading-all-the-new-notifications
Jun 22, 2024
Conversation
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
…ions and notification types This commit updates the database schema in the utils/supabase/supabase.ts file. The changes include adding new fields for comment reactions and notification types to the notifications table. It also updates the Insert and Update types to include optional fields for link and short_message. These updates enhance the functionality of the application by providing support for comment reactions and different types of notifications.
…g and read button This commit updates the Notifications component in the components/dashboards/notifications/Notifications.tsx file. The changes include importing the ViewMarkdown component from '@/components/ui/markdown/ViewMarkdown' to enable markdown rendering for the notification messages. It also adds a NotificationsReadButton component to handle marking notifications as read. These updates enhance the functionality and user experience of the Notifications feature.
…tions This commit adds the notificationUpdate function to the notificationsActions.ts file in the actions/dashboard directory. The function allows for updating notifications in the database by using the Supabase client. It also includes error handling and revalidation of the dashboard page. This addition enhances the functionality of the application by providing a way to update notifications and improve the user experience.
This commit refactors the studentSubmitLessonComment function in studentActions.ts to improve error handling and add comment reply notifications. It updates the error messages returned when there is no user found or when creating a comment fails. Additionally, it adds a new notification for the parent comment owner when a comment is a reply. This enhancement improves the functionality and user experience of the application.
… in CommentsCard component
refactor: Update DashboardHeader component to import Notifications from local file This commit updates the DashboardHeader component in the components/dashboards/DashboardHeader.tsx file. The change involves importing the Notifications component from the local file './notifications/Notifications' instead of the global import '@/components/dashboards/Common/Notifications'. This refactor improves code organization and reduces unnecessary dependencies.
…ions The commit adds a new component, NotificationSidebarFilter, to the components/dashboards/notifications/NotificationSidebarFilter.tsx file. This component provides a form with checkboxes for filtering notifications based on different types. It improves the user experience by allowing users to easily filter and view specific types of notifications.
…e bar The commit updates the LessonPage component in the components/dashboards/student/course/lessons/LessonPage.tsx file. It changes the className of the ResizablePanel component to include the 'rounded-lg' class, improving the visual appearance of the side bar. This refactor enhances the user experience by providing a more polished and consistent design.
…ltering The commit updates the NotificationsPage component in the app/dashboard/notifications/page.tsx file. It introduces several UI improvements, including a new header with a settings button, a sidebar for filtering notifications by type, and a more visually appealing layout for individual notifications. It also adds support for filtering notifications based on the selected type. These changes enhance the user experience by providing better organization, readability, and control over notifications.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
The commit refactors the Notifications component in the components/dashboards/notifications/Notifications.tsx file. It introduces UI improvements, including a rounded border for the button and a red badge displaying the count of unread notifications. This enhancement improves the visual appeal and usability of the Notifications feature.
…eated date The commit updates the Notifications component in the components/dashboards/notifications/Notifications.tsx file. It modifies the query to order the notifications by the created date in descending order. This change ensures that the most recent notifications are displayed first, improving the user experience and keeping the notifications up-to-date.
…m session data The commit adds a new function, getClientUserRole, to the utils/supabase/getClientUserRole.ts file. This function retrieves the user role from the session data by decoding the access token. It improves the codebase by providing a reusable and efficient way to fetch the user role, enhancing the functionality and maintainability of the application.
…rom utils/supabase/getUserRole.ts This commit removes the unused import of createClient and the getClientUserRole function from the utils/supabase/getUserRole.ts file. These changes improve code cleanliness and remove unnecessary dependencies, enhancing the maintainability of the application.
…ication link This commit updates the studentSubmitLessonComment function in the studentActions.ts file. It adds the course_id parameter to the notification link, ensuring that the link directs to the correct course when a user receives a notification for a comment reply. This enhancement improves the accuracy and usability of the notification feature.
This commit adds the course_id prop to the CommentsSections component in multiple files. The course_id is used to ensure that comments are associated with the correct course when rendering and submitting comments. This enhancement improves the accuracy and functionality of the CommentsSections component.
…r role This commit refactors the CommandDialogComponent in the components/dashboards/Common/CommandDialogComponent.tsx file. It adds functionality to fetch courses based on the user's role, ensuring that the displayed courses are relevant to the user. This enhancement improves the user experience by providing personalized course suggestions and improving the overall usability of the CommandDialogComponent.
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.
This pull request includes several commits that refactor and enhance the Notifications feature in the application. It also adds support for comment reactions. The changes include updating the database schema, updating components, adding new functions, fixing error handling, and improving the user interface. These updates improve the functionality, user experience, and code organization of the Notifications feature.