EmbeddedChat icon indicating copy to clipboard operation
EmbeddedChat copied to clipboard

feat: Add a Preview Feature to check the text after formatting it.

Open thepiyush-303 opened this issue 11 months ago • 8 comments

Brief Title

I need to provide users with a preview option for formatted messages before sending them, So that they can review and ensure the message appears as intended. Fixes #890

Video/Screenshots

Screencast from 2025-01-13 20-59-12.webm

PR Test Details

Hey @Spiral-Memory,

I'm not sure if this is necessary, but as a user, I wanted this feature in RC, so I started working on it without considering the requirement. If it turns out that it's not needed, please leave feedback on my changes.

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-889 after approval. Contributors are requested to replace <pr_number> with the actual PR number.

thepiyush-303 avatar Jan 13 '25 14:01 thepiyush-303

@Spiral-Memory I will improve it further, if we are including it.

thepiyush-303 avatar Jan 13 '25 20:01 thepiyush-303

Hey @thepiyush-303, this is good feature to get implemented, LGTM ! 🎉

devanshkansagra avatar Jan 14 '25 16:01 devanshkansagra

Thankyou, @devanshkansagra

thepiyush-303 avatar Jan 14 '25 16:01 thepiyush-303

Hi @thepiyush-303 , this seems like a nice addition 🚀 ! I noticed that you're adding the marked package as a dependency. You might have observed that EC already has a markups package for handling markdowns. Could we have utilized that? 🤔 Let @Spiral-Memory confirm it once.

abirc8010 avatar Jan 14 '25 20:01 abirc8010

Hi @thepiyush-303 , this seems like a nice addition 🚀 ! I noticed that you're adding the marked package as a dependency. You might have observed that EC already has a markups package for handling markdowns. Could we have utilized that? 🤔 Let @Spiral-Memory confirm it once.

the markup you are talking about needs message body (md) to format the text, however we do not have acces to it initially.

thepiyush-303 avatar Jan 15 '25 04:01 thepiyush-303

Hi @thepiyush-303 This is a good addition, but I'm not entirely sure if it's fine to merge yet. This feature is needed, as we do want to see a preview before posting, and it would be great to have it.

However, the way it's implemented, I'm not fully convinced. Maybe you can check how other social media sites implement this, in case anyone has already done it in a similar way.

Thanks!

Spiral-Memory avatar Jan 27 '25 16:01 Spiral-Memory

@Spiral-Memory feature in zulip is like this:

https://github.com/user-attachments/assets/7c72ce92-3e6e-4e62-9847-439c137a18d3

thepiyush-303 avatar Jan 28 '25 04:01 thepiyush-303

@Spiral-Memory can you please look into this also? and let me know if any changes required?

thepiyush-303 avatar Feb 09 '25 08:02 thepiyush-303

@Spiral-Memory can you please look into this also? and let me know if any changes required?

This is something that needs discussion with the team, I will let you know once i discuss and see if we can merge this

Spiral-Memory avatar May 24 '25 11:05 Spiral-Memory

Sorry @thepiyush-303 By mistake I merged it, I have reverted this PR, please raise this again - So will still need discussion to merge this. Thanks

Spiral-Memory avatar May 24 '25 11:05 Spiral-Memory

Alright @Spiral-Memory

thepiyush-303 avatar May 24 '25 11:05 thepiyush-303