Skip to content

[NEW] Reply preview#10086

Merged
rodrigok merged 8 commits intoRocketChat:developfrom
ubarsaiyan:reply-preview
Mar 26, 2018
Merged

[NEW] Reply preview#10086
rodrigok merged 8 commits intoRocketChat:developfrom
ubarsaiyan:reply-preview

Conversation

@ubarsaiyan
Copy link
Copy Markdown
Contributor

@ubarsaiyan ubarsaiyan commented Mar 9, 2018

@RocketChat/core

Closes #9912
This adds a Whatsapp like preview feature to replies, ie. the user can see the mssg he/she is replying to. I tried to do this in the minimal amount of code, hence I reused the messageAttachment Template which is used for displaying replies or attachments to a message. When replying to a reply, the preview only shows the outermost mssg (only one level of reply) as it would take a lot of space to display all the levels. The preview can also show formatted mssgs. Deleting the whole message removes the reply preview. Sending the mssg also removes the reply preview. Many many optimisations and new features can be incorporated further such as:

  • adding a 'x' button to hide the preview Done
  • removing the url of the message being replied to from the input box Done
  • beautifying the reply preview Done

screenshot from 2018-03-11 03-06-30
screenshot from 2018-03-11 03-06-30

image

Copy link
Copy Markdown
Member

@MartinSchoeler MartinSchoeler left a comment

Choose a reason for hiding this comment

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

Please remove the package-lock json files from this pull request, files such as this should be ignored when committing changes.

@ubarsaiyan
Copy link
Copy Markdown
Contributor Author

@MartinSchoeler I'm sorry to have included the unnecessary files. I have removed them now and also combined the commits into one.

@rodrigok
Copy link
Copy Markdown
Member

rodrigok commented Mar 9, 2018

That is really amazing @ubarsaiyan thank you.

I have a suggestion, what if you remove the Markdown that includes the mention (that link to the message) from the input field and add before send the message? That way we hide that ugly part.

Other good addition would be a X button to close/remove the mention, if you implement my suggestion above that would be the only way users could do that.

@ubarsaiyan
Copy link
Copy Markdown
Contributor Author

@rodrigok Yes, I will implement that too :) and improve the ui too.

@ubarsaiyan
Copy link
Copy Markdown
Contributor Author

@rodrigok @MartinSchoeler I have made the necessary changes: Implemented the ui of @ mention popup, adding a cancel reply button, removing the URL of the mssg being replied to from the input box. I have taken care that the code is bug-free and does the work minimal amount of code. The message in the input box is retained upon closing the reply and replying after writing the mssg.

@RocketChat RocketChat deleted a comment Mar 15, 2018
@RocketChat RocketChat deleted a comment Mar 15, 2018
@RocketChat RocketChat deleted a comment Mar 15, 2018
@RocketChat RocketChat deleted a comment Mar 15, 2018
@rodrigok rodrigok added this to the 0.63.0 milestone Mar 26, 2018
@rodrigok rodrigok merged commit 5cafdc0 into RocketChat:develop Mar 26, 2018
@rodrigok rodrigok mentioned this pull request Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preview the message that the user is replying to

4 participants