Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] Reply preview #10086

Merged
merged 8 commits into from
Mar 26, 2018
Merged

[NEW] Reply preview #10086

merged 8 commits into from
Mar 26, 2018

Conversation

ubarsaiyan
Copy link
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
Contributor

@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
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
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
Contributor Author

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

@ubarsaiyan
Copy link
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 added this to Desireable in 0.63.0 via automation Mar 26, 2018
@rodrigok rodrigok merged commit 5cafdc0 into RocketChat:develop Mar 26, 2018
0.63.0 automation moved this from Desireable to Done 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
No open projects
0.63.0
  
Done
Development

Successfully merging this pull request may close these issues.

Preview the message that the user is replying to
4 participants