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

Added Emoji Support in Inline and Side Menu in Collaborative Text Editor #5825

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

namanvats
Copy link

@namanvats namanvats commented Jun 14, 2024

What Does this PR Do?
It adds support in Collaborative Text Editor to add Emjois using inline command / or side menu

Earlier only 4 options were there in the menu :

  • Image
  • Table
  • Code block
  • Separator Line

Added a new option : Emoji , later can be extended easily to support Emoji popup

Screenshot
Inline Command
Screenshot 2024-06-14 at 6 13 08 PM

Side Menu
Screenshot 2024-06-14 at 6 13 19 PM

Huly®: UBERF-7281

@haiodo haiodo requested a review from lexiv0re June 18, 2024 05:20
@@ -202,6 +203,9 @@
insertSeparatorLine: () => {
editor?.commands.setHorizontalRule()
},
insertEmoji: () => {
editor?.commands.setHorizontalRule()
Copy link
Member

Choose a reason for hiding this comment

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

Why do you call setHorizontalRule here?

Copy link
Author

@namanvats namanvats Jun 19, 2024

Choose a reason for hiding this comment

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

Basically, it was built to showcase that the functionality can be extended to add emoji support so adding it as place holder for review purposes if required, it can be easily extended to support emoji popups. The screenshot shows that emoji command can be added to this document and popups too can be called in place of setHorizontalRule which is a placeholder command for now

Copy link
Member

Choose a reason for hiding this comment

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

Even though we implemented it in this way, I don't think that's the right way of extending this menu.

  1. Currently this menu is supposed to insert only block elements. An emoji is an inline element and I don't see much value in inserting an emoji in the beginning of the line.
  2. The way we use to extend the menu requires a lot of boilerplate. I believe we need to have a single list of commands that will be used in both bubble menu, inline menu and this side menu.

Copy link
Author

Choose a reason for hiding this comment

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

On # 1 : Agree with you but many users are using it to start tech docs or quick start guides that's why added it in inline commands as well.

On # 2 : I followed the existing implementation flow as it was done and tried to extend this support but based upon your comment looks like there might be a need to implement it differently let me know if I can try that way.

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.

2 participants