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

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

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

thepiyush-303
Copy link
Contributor

@thepiyush-303 thepiyush-303 commented Jan 13, 2025

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 thepiyush-303 marked this pull request as ready for review January 13, 2025 14:56
@thepiyush-303 thepiyush-303 marked this pull request as draft January 13, 2025 14:56
@thepiyush-303 thepiyush-303 marked this pull request as ready for review January 13, 2025 15:35
@thepiyush-303
Copy link
Contributor Author

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

@devanshkansagra
Copy link
Contributor

devanshkansagra commented Jan 14, 2025

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

@thepiyush-303
Copy link
Contributor Author

Thankyou, @devanshkansagra

@abirc8010
Copy link
Contributor

abirc8010 commented Jan 14, 2025

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.

@thepiyush-303
Copy link
Contributor Author

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.

@@ -25,6 +25,7 @@
"typescript": "^5.1.3"
},
"dependencies": {
"dompurify": "^3.1.6"
"dompurify": "^3.1.6",
"marked": "latest"
Copy link
Contributor

Choose a reason for hiding this comment

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

He might be talking about this thing i.e marked

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.

Add Preview text feature
3 participants