(Jose's 7th PR/Chris' 4th PR): Inbox Backend Frontend Link #147
(Jose's 7th PR/Chris' 4th PR): Inbox Backend Frontend Link #147cj-ballesteros merged 12 commits intomainfrom
Conversation
…te/time ISO format to readable date/time.
…end with frontend. It assumes we store JWT tokens in local storage. May need to update later to properly handle JWT tokens?
…utton (3) mark read all button. - Jose will have to pretty up frontend. My implementations were not the prettiest - Added new field to notifications/models.py to display sender's name in frontend.
…sed variables in the .jsx file. made some changes to the css file. removed the search bar. removed an unnecessary "delete notifications" button.
Inbox Notification System: Frontend-Backend IntegrationFrontend Integration of Inbox Notification System Overview
This PR was a collaborative effort between myself (frontend) and backend ( @ChrisCRL ).
Special thanks to Chris for building the This PR implements the frontend integration of the Inbox Notification System, replacing mock data with real backend API calls using Axios, and refining UI styling and component behavior. This allows the inbox to fully interact with the backend notification system, marking and deleting messages in real-time. Key Features & Changes
Why This Is NeededThis PR is essential for completing the full-stack integration of the Inbox Notification System. It enables users to read, filter, and manage notifications in real time, aligning frontend views with the data structure provided by our Django backend. Related IssueIssue #146 - Connect Frontend Inbox to Notification API Implementation Details
How to Test This PR
Files Added/Modified
AI Code UsageYes 2 Minimal. Checklist for Reviewers
Next Steps & Future Enhancements
Screenshots: Author: Jose Alarcon |
|
Hello @SameerIssa! Please, when you have a moment, could you please review the frontend portion of this PR? I've completed the integration of the inbox component with the backend notification API. Would appreciate your feedback on the UI logic, interaction flow, and any improvements you think we can make. Thanks! |
SameerIssa
left a comment
There was a problem hiding this comment.
Frontend-Backend Inbox Notification Integration — Review
Great job on this PR! This is a strong step forward in connecting the frontend inbox UI to the backend notification system, and it’s clear a lot of thought went into both the implementation and the user flow.
What I Liked:
UI Logic & Interaction Flow
- The integration feels intuitive, marking notifications as read and bulk actions like "Mark All Read" and "Delete All" are smooth and well-placed.
- Removing deprecated UI elements (like the unused search bar and redundant delete button) cleaned up the interface nicely. The page feels much more focused now.
Code Quality
- The separation of logic via the
NotificationServices.jsutility and Axios setup is clean and reusable. - State updates are handled efficiently, the UI updates immediately in sync with backend responses, which is a good UX practice.
- Scoped CSS in
Inbox.csskeeps the styling modular and conflict-free — nice touch!
Collaboration
- Great to see the team synergy between frontend and backend. Shoutout to Chris for handling the utility service — it clearly streamlined the frontend logic.
Suggestions for Improvement:
- UX Feedback on Actions: Adding quick visual feedback (e.g., a brief toast or highlight) when bulk actions like "Mark All Read" or "Delete All" complete would reassure the user that the action succeeded.
- Loading States: Consider adding a loading indicator when the notifications are being fetched initially or when batch actions are in progress.
- Pagination or Lazy Loading: If the number of notifications grows large, we may want to consider pagination or lazy loading in future iterations for performance reasons.
- Search Bar Reintroduction: Once the backend supports it, bringing back the search functionality with sorting filters (by type, date, etc.) will make managing notifications much easier.
Reviewed Items:
- Buttons trigger the correct API actions
- Axios properly configured with token headers
- State updates reflect real-time UI behavior
- Code is modular and cleanly structured
Overall, this is a great full-stack feature enhancement. It lays the foundation for scalable, real-time communication in the platform, and I’m excited to see future upgrades like polling or WebSocket integration.
Thanks for your hard work on this — well done!
|
Thanks so much for the detailed review and approval @SameerIssa, I really appreciate you taking the time to walk through the integration and the frontend logic. I’m glad to hear the flow and cleanup came through clearly! I totally agree with your suggestions, especially around adding visual feedback for actions and implementing loading states. These improvements (along with search and pagination) are definitely on my radar and will likely be introduced in a future PR. Right now, I’m focused on pushing out an MVP that gets the core functionality working reliably and efficiently. |
There was a problem hiding this comment.
Hey Chris and Jose! — just finished reviewing your PR titled "# Inbox Backend Frontend Link". Here’s my feedback:
💡 Suggestions for Improvement
- Notifications set to "system update" can't be found when sorting by any of the available options (Success, Warning, Error, General, Update), only by sorting by "All Types". The sorting works though!
- "No Notifications Found" which appears isn't properly positioned and is touching the margin.
- The buttons look too base css'y for my liking but it's just a nitpick.
- Meta PR change, but the /inbox link is changed, and one needs to use /tutor/inbox instead.
🧪 Tested This Feature
I followed the test instructions:
-
✅ Ran frontend and backend to verify the connection works.
-
✅ Created, updated, deleted, and marked notifications as read and verified they worked.
🚀 Final Thoughts
Everything else looks great, and I'll be looking at this PR for further reference for my own PR's! :D


Added Frontend Notification Service for API Integration
Overview
What does this PR do?
This PR introduces a JavaScript service that handles all notification-related API calls to our backend. The service provides a clean, reusable interface for getting, marking, and deleting notifications. Also tweaked a few things in backend regarding the Notification model, views, and serializer.
Key Features & Changes
What has been added or changed?
Core Feature Implementation: Complete notification service with methods for all notification API endpoints
Authentication Integration: Automatic token handling for all requests
Error Handling: Consistent error catching and reporting
API Abstraction: Clean interface that hides implementation details from components
getNotifications()method to fetch all user notificationsmarkAsRead()for single notification status updatesmarkAllAsRead()for bulk notification managementdeleteNotification()for removing individual notificationsdeleteAllNotifications()for clearing notification historysenderin our Notification ModelWhy This Is Needed
What problem does this solve?
This service centralizes all notification API calls, preventing code duplication across components and ensuring consistent authentication handling. With this service, components can easily interact with notification data without needing to understand the underlying API structure or authentication requirements.
Related Issue
🔗 This PR addresses Issue #146
Implementation Details
How was this feature developed?
How to Test This PR
Step-by-step testing guide
Files Added/Modified
📂 List of important files changed in this PR
services/NotificationServices.jsnotification/model.pynotification/views.pynotification/serializer.pyAI Code Usage
🤖 Was AI-generated code used in this PR?
Checklist for Reviewers
Things to check before approving this PR:
Next Steps & Future Enhancements
What improvements can be made after merging?
Final Notes
This service is designed to work hand-in-hand with the WebSocket notification system. While WebSockets handle real-time notification delivery, this service provides methods for managing the notification history and state.