shivansh-bhatnagar18 / multiplayer-uno

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

Game:Add support for replying to messages in Message box #162

Closed ritwik-69 closed 1 week ago

ritwik-69 commented 1 week ago

fixes #153

Description

Added the ability to reply to someone in chat.

How to Test

cd frontend npm run dev

Checklist

Screenshots (if applicable)

https://github.com/shivansh-bhatnagar18/multiplayer-uno/assets/72665321/d39e3d0e-de58-4983-9d4c-03401a767014

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
multiplayer-uno ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2024 8:00am
kuv2707 commented 1 week ago

In summary, we have to do the following:

We render the replied message at two places - one near the input box, and one along with the message which is replying to that message.

It does sound confusing after writing all this. Please feel free to ask follow-ups

kuv2707 commented 1 week ago

It would take pretty minor refactors to achieve that.

And the reason we aren't storing the message content in the ref field is just to avoid duplication of data, which keeps the message objects' sizes in check.

ritwik-69 commented 1 week ago

@kuv2707 i am done with changes as told in the summary.I tested these changes locally and they work but i don't understand how they work 😂

kuv2707 commented 1 week ago

@ritwik-69 I ended up making modifications to the commit and pushing it to master. The functionality was on point, but had to change the implementation a bit. You can have a look and take time to understand the structure.

Closing as completed, Thanks @ritwik-69