Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Improve message sending states to match new designs #5699

Merged
merged 10 commits into from
Mar 8, 2021

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Feb 28, 2021

@turt2live turt2live changed the title [WIP] Improve message sending states to match new designs Improve message sending states to match new designs Mar 1, 2021
@turt2live turt2live marked this pull request as ready for review March 1, 2021 23:26
@turt2live turt2live requested a review from a team March 1, 2021 23:30
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this side seems reasonable enough, and is trying hard to avoid extra work where possible. However, I am curious if the JS side can be more efficient, and that may change this side, so only a general comment for now.

src/components/views/messages/EditHistoryMessage.js Outdated Show resolved Hide resolved
src/components/views/rooms/EventTile.js Show resolved Hide resolved
src/components/views/rooms/EventTile.js Outdated Show resolved Hide resolved
@turt2live
Copy link
Member Author

Making this more efficient does indeed become difficult, and I'm not sure it would be a maintainable solution (would feel too much like magic/react abuse).

The extra loops here should be hitting highly cached data and be extremely quick, and aren't even triggered in most cases. In testing with a medium-sized account, it seemed to perform reasonably well.

@turt2live turt2live requested a review from jryans March 2, 2021 18:04
@jryans jryans requested a review from a team March 3, 2021 14:10
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, let's proceed with approach and watch out for perf impact.

Since this would go live immediately, it also needs Design review. (Perhaps faster to nudge the designer you are working with directly.)

Copy link

@gaelledel gaelledel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might have been some miscommunication with the behaviour of the sent tick. Basically, in your implementation, you see a tick when your message is sent. if you write a new message you see another tick. For each message you sent there's a tick next to it. What we actually want is: Display a tick once a message is sent. Once a new message is sent, the tick from the message above should disappear. So essentially you only really see one tick at a time.

Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, thanks! 😄

src/components/structures/MessagePanel.js Show resolved Hide resolved
@turt2live turt2live merged commit d35afe6 into develop Mar 8, 2021
@turt2live turt2live deleted the travis/message-states branch March 8, 2021 15:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants