shivansh-bhatnagar18 / multiplayer-uno

https://multiplayer-uno.vercel.app
21 stars 43 forks source link

Make a chat box #125

Closed kuv2707 closed 1 week ago

kuv2707 commented 2 weeks ago

Description

We wish to include a collapsible chat box in the game page.

Exact structure to be decided, but we can work on the designs for the message list, input box, reactions to messages.

A folder Chatbox can be created inside the library directory, containing all the files relevant to it.

The chatbox will render an array of messages, each of which will roughly have the schema:

type Message{
  content: string;
  ref: string; // If this message quotes another message, we store the quoted message's id
  atMentions: string[]; // List of users mentioned (like @kuv2707 etc)
  reactions: [string,string][] ; an array of tuples (of size 2) of reaction emoji and the user id who reacted.
}

When rendering the message, we make use of all this content to "hydrate" the message.

As mentioned somewhere else, when the server first sends the entire game data, we extract all the user ids and corresponding user info, which we later use in messages etc

issue-assigner[bot] commented 2 weeks ago

Comment '@csoc-bot claim' to get this issue assigned or '@csoc-bot abandon' to get this issue unassigned.

sksmagr23 commented 2 weeks ago

@csoc-bot claim

issue-assigner[bot] commented 2 weeks ago

@sksmagr23 This issue has been successfully assigned to you! 🚀

kuv2707 commented 2 weeks ago

Updated the issue description.

The updated specs can be worked on once we have the entire game event system in place.

shiviiish commented 2 weeks ago

@csoc-bot claim

issue-assigner[bot] commented 2 weeks ago

@shiviiish Sorry, maximum limit for assignees in this issue has reached. Please check other issues or contact a maintainer.