ufosc / OSC-Proximity-Chat-App

Talk to the people closest to you. An open source React Native app that combines location and communication into one.
https://osc-proximity-documentation.vercel.app/
GNU General Public License v3.0
44 stars 101 forks source link

Create message sent status #282

Open h1divp opened 1 month ago

h1divp commented 1 month ago

This feature is written in our MVP.

Description

When a message is sent to the server, there is a delay between the time when the send button is pressed, and when the nearby users receive the sent message. To show a quick status to let the client-user know weather or not the sent message has been received, apps implement this in different ways.

Architectural decisions

Before an implementation can be made, we need to know how we want our users to see this status. Potential solutions can be

So in essence, do we want read receipts? Do we want to show the user the message has been received after its been acknowledged by the server, or stored in Firebase?

Potential implementation

  1. (UI) Create a design for what the message sent status will look like.
  2. (Front-end) Create the components/styles/state needed to render this.
  3. (Back-end) Create a way to send message-sent status back to the client. Probably using websockets.
  4. (Front-end) Create a way to receive message-sent status from the server
  5. (Front-end) Change message-sent state in the chat message. Make sure affected components are rendered properly.

Issue list will be in the comments below.

dyland88 commented 1 month ago

I like the implementation of graying out the message before it is acknowledged, like on discord.

Nqnt41 commented 12 hours ago

Are the changes in this issue in a concrete enough stage to work on, or does more planning need to be done before they can be implemented? I would be interested in working on some of these issues when they are ready.

dyland88 commented 6 hours ago

If you want to work on the frontend aspects, you could definitely just get started since this just requires graying out messages depending on a useState or useEffect. Maybe this could be a new prop that is put into the message component. As for the backend stuff, if you want to do some research into how the message-sent status can be implemented you can totally start working that too.