Closed ColinLefter closed 3 months ago
Looks bloody amazing - the only thing that is wrong about this is it is in Lightmode
I want to use dark mode so badly but it just looks so bad 💀
I will refactor the whole UI colour scheme in another pull request so we can fully enjoy dark mode
Summary of Changes
Optimized
query response times by integrating contexts and refactoring code at the application level (RootLayout.tsx
and_app,tsx
Added
an "Add Friend" component (AddFriendModal
) that enables users to add friends that exist on the platformImplemented
client-side validation by handling cases where the user does not enter any username or enters a non-existent user in the "Add Friend" search boxImplemented
real-time asynchronous updates with auseCache
context that wraps the whole application, propagating changes across all components and re-triggering queries to reflect real-time updatesImplemented
a draft ofcaching
across backend API endpoints (temporarily disabled) to keep the results obtained from previous queries readily accessible on component remountImplemented
a "Send DM" component (NewChatModal
) where the current user can choose users to add to a group chat via a dropdown combobox that is synced to their friends listRestructured
backend API endpoints to reflect updated data structures (particularly the use of IDs within thefriendList
component rather than usernames to ensure referential integrity)Implemented
minor UI adjustments: made all primary components black and added our logo gradient to special action buttons like "Add Friend" or "Create chat"Removed
theUserButton
component from the top right of the application shell as it was found to be redundant given its existing presence within theFooterTab
componentAdded
docstrings across all fully-integrated and functional componentsMigrated
all interface declarations to a dedicatedaccordTypes.ts
file that will be used to store all data types moving forwardPatched
non-functional privacy toggle due to a hardcoded value in one of the components part of the chat creation pipeline (accord
-> (FriendsTab
||NewChatModal
)Chat
->MessagingInterface
)User Settings
tab given its redundancy in view of theUserButton
component in theFooterProfile
already handling that responsibilityPatched
non-functional message history after the introduction of group chats due to a malformed key (sender was being included twice due to the outdated system design of the project in relation to the chat creation pipeline)Introduced
SHA-256 encryption for the creation of all messaging channels (both direct messages and group chats) to enforce key uniqueness and to compress long key values to a fixed 256-bit (32-byte) key, ensuring a deterministic length for optimized database storageAdded
account-specific user profiles across text channels by including the profile picture source of the sender as part of the internal message data within text channelsRemoved
hardcodedfriendList
in theregistration
backend API endpoint in favour of an empty array as users can add friends once they join the platformCreated
several backend API endpoints to facilitate the above changes:add-friend
,get-ids-of-friends
,get-usernames-of-friends
Removed
the send message component that was next to the text message bar to reflect a more minimalistic UI as users can send messages via theenter
button on their keyboardTests Performed
Visual Summary of Changes
Group Chat Functionality (3 users tested in real-time)
ngs across all fully-integrated components
Add Friend Modal
Select Friends Modal (create a group chat and add friends to it)
Storage of Chat History in MongoDB (privacy toggle off)
Documentation
Notes
scrum report
AddFriend
modal, both the sender and the receiver of that friend request accept it automatically. That means that the receiving party has no decision on whether they accept the friend request. This needs to be changed in future updates.