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: Live preview message composer #30414

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

Conversation

imf-ali
Copy link

@imf-ali imf-ali commented Sep 16, 2023

Proposed changes (including videos or screenshots)

Make the message composer live preview feature instead of just adding markdown tokens that styles/parse the message in the Message List.

Here is my proposal

Steps to test or reproduce

The following markdown preview should be enabled -

  • Bold
  • Italic
  • Strike
  • Plain Context
  • Line Break
  • Paragraph
  • Link
  • Tasks
  • Code line
  • Color
  • Big Emoji
  • Emoji
  • Inline Code
  • Heading
  • Quote
  • Blockquote
  • Ordered list
  • Unordered list

Current Working

screen-capture.online-video-cutter.com.1.mp4

@imf-ali imf-ali requested a review from a team as a code owner September 16, 2023 15:28
@changeset-bot
Copy link

changeset-bot bot commented Sep 16, 2023

⚠️ No Changeset found

Latest commit: 92edba0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant
Copy link

CLAassistant commented Sep 16, 2023

CLA assistant check
All committers have signed the CLA.

@imf-ali imf-ali changed the title Live preview message composer feat: Live preview message composer Sep 16, 2023
@imf-ali imf-ali force-pushed the live-preview-message-composer branch from 63a749c to 8435f90 Compare November 29, 2023 13:56
@imf-ali
Copy link
Author

imf-ali commented Dec 2, 2023

Code line added
image

Output:
image

@imf-ali
Copy link
Author

imf-ali commented Dec 2, 2023

Inline code
image

Output
image

Copy link
Contributor

@tassoevan tassoevan left a comment

Choose a reason for hiding this comment

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

Rocket.Chat uses it's own parser (@rocket.chat/message-parser) instead of Markdown because we do not follow the CommonMark specification. Also, this parser outputs a structure that is not HTML, therefore it's not the format I'd personally pass to Quill to render. Maybe doing a translation between the message parser AST output and Quill's Deltas is the way to go.

@imf-ali
Copy link
Author

imf-ali commented Feb 11, 2024

#31731
Attaching this PR for reference, as came up with new implementation suggested by @tassoevan and @hugocostadev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants