-
Notifications
You must be signed in to change notification settings - Fork 42
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
Frontend: Added a chat box in the game page #135
Conversation
@sksmagr23 is attempting to deploy a commit to the Shivansh Bhatanagar's projects Team on Vercel. A member of the Team first needs to authorize it. |
So i should clarify the message sending structure. When the Chatbox mounts, it registers a handler in channel.ts for chat events. (similar to how we subscribe to game events, see GameContext) When the user sends a message, we don't immediately append the message to the message array, rather we update the array when the server sends the Finally we should store messages in a JS object (or better, the Map class) instead of array, so that we can find them in constant time. |
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 phenomenal in manual testing!
We'd need to change the structure of sending messages and reactions.
Event triggering is done via channel.triggerEvent
0d152e8
to
6bb625c
Compare
@kuv2707 done the review changes, you can have a look if any other change required |
@sksmagr23 It is a good practice to respond to the feedback (even with a reaction) instead of resolving the conversation yourself |
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.
Suggested some changes and unresolved conversations which were not properly addressed.
It can be merged once these changes are addressed
You can add some drop shadow to the chat box |
Added the drop shadow to chatbox |
Added a collapsible chat box in the gamepage, the necessary files are added in a folder Chatbox in src/library fixes shivansh-bhatnagar18#125
@kuv2707 done all the reviewed changes and resolved the previous unresolved reviews The lint errors are coming because I have removed api call in messageinput and event listeners in chatbox.tsx as function created are not used, |
We can merge it at this point, and address the regressions as a follow-up |
Description
Added a collapsible chat box in the gamepage, which contains messagelist, input box, reactions to messages. The necessary files are added in a folder Chatbox in src/library. The folder include files namely
1.types.ts
2.chatbox.tsx
3.Message.tsx
4.MessageInput.tsx
5.MessageList.tsx
The packages emoji picker react and react icons are also installed.
fixes #125
How to Test
Related Issues
Checklist
Screenshots