mattermost/mattermost

Queue sending message after file upload finishes

Open

#21,264 opened on Oct 6, 2022

View on GitHub
 (10 comments) (0 reactions) (1 assignee)TypeScript (32,880 stars) (7,823 forks)batch import
HacktoberfestHelp Wanted

Description

The Problem to Solve

Observed: When a user pastes an image and hits ENTER immediately, then ENTER is ignored because the file has to upload and process first.

User story: https://community-daily.mattermost.com/core/pl/4xswkr8zbpdabesft54c3i7m5h

Below is an example of trying to hit enter before a file is uploaded: Hitting ENTER while a file is still uploading removes focus from the input box until the user types any other character (to refocus the text box), then hits enter again to send the message (after the upload is complete).

![](2021-08-04 14-53-02.mp4|width=1920,height=1080)

Proposed Solution

If a file is still uploading while a use tries to send their message, the message posts to the channel in a ‘pending’ state (greyed out) with the file attachments showing their upload progress. The pending message should maintain it’s position in the post list if other messages are received or sent before the attachment finishes uploading and the message.

![](https://user-images.githubusercontent.com/2040554/135007664-d94993da-572a-49d0-bd25-b8df95ff11be.gif|width=50%,alt="2021-09-27 21 30 56")

Figma design reference: https://www.figma.com/file/38xVvr0g1FU9jbbSuBAsdX/?node-id=0%3A1

Related draft PR: https://github.com/mattermost/mattermost-webapp/pull/8856


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-37606

Contributor guide