Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.
This repository was archived by the owner on May 7, 2026. It is now read-only.

Update ChatMessage component to use new components and styles #325

@h1divp

Description

@h1divp

In order to implement sent-message and message-grouping logic for our UI we will first need to make a couple of small graphical changes. Here is our current design:

(current)
Image

Planned design:
Image

I forgot to change the profile picture of the second user here, but you get this idea.

In order to complete this, there are a few objects/styles I think we should refactor to:

  • a general msg object:
    • literally just is an object representing one piece of received or sent message text. Can show line breaks.
    • Holds all extra data currently defined by the Message type.
      • One small update will be needed for this type: author should be changed from a string to a User type in order to neatly include displayName and profilePicture data. Further, the User type should include a userId string. That way both profile pictures and display names will be able to be updated after a message is sent or received.
  • a msg-header object:
    • In a sequence of messages by a user, the first message will have a message header prepended in the chat FlatList. This header will take the displayName and profilePicture data from the first message in this sequence.
  • a msg-sent style:
    • After a user sends a message, and before it has been acknowledged by the server (through the client receiving an ack status) all self-created msg objects should also have this style applied.
    • It can simply just be an opacity: 50% to show that the message hasn't been received by the server yet.

As this will make messages more modular, further changes to profile data, the addition of reactions, etc will become much easier.

Make sure to reference this issue in your PR in order for this to be marked done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Frontend 🖥Issues corresponding to the frontend/client.Good first issueGood for newcomersImprovementImportant changes made that are not described by an optimization or refactor

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Unassigned

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions