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

fixed the disability issue while selecting emojis #609

Closed
wants to merge 0 commits into from

Conversation

smritidoneria
Copy link
Contributor

@smritidoneria smritidoneria commented Jul 23, 2024

Brief Title

When selecting only emojis from the picker in the user input, the Send button now allows sending the emojis only.

Acceptance Criteria fulfillment

  • fixed the disabled functionality of send button

Fixes #608

Video/Screenshots

Screen.Recording.2024-07-23.at.10.06.38.AM.mov

@CLAassistant
Copy link

CLAassistant commented Jul 23, 2024

CLA assistant check
All committers have signed the CLA.

@@ -42,7 +43,9 @@ const ChatInputFormattingToolbar = ({

const handleEmojiClick = (emojiEvent) => {
const [emoji] = emojiEvent.names;
messageRef.current.value += ` :${emoji.replace(/[\s-]+/g, '_')}: `;
const newValue = messageRef.current.value + ` :${emoji.replace(/[\s-]+/g, '_')}: `;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for your contribution, @smritidoneria.
LGTM! Can you please give a meaningful name to this variable instead of newValue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes,sure

@smritidoneria
Copy link
Contributor Author

I have the updated the name

@smritidoneria
Copy link
Contributor Author

Hey, do I have to make improvements in the pr or is it ready to get merge?

@Spiral-Memory
Copy link
Collaborator

It will be merged soon !

@Spiral-Memory
Copy link
Collaborator

Hey @smritidoneria

Please format your code using prettier

@smritidoneria
Copy link
Contributor Author

done

@smritidoneria
Copy link
Contributor Author

Any more changes required?

Copy link
Collaborator

@sidmohanty11 sidmohanty11 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @smritidoneria !

@@ -42,7 +43,10 @@ const ChatInputFormattingToolbar = ({

const handleEmojiClick = (emojiEvent) => {
const [emoji] = emojiEvent.names;
messageRef.current.value += ` :${emoji.replace(/[\s-]+/g, '_')}: `;
const updatedMessageWithEmoji =
messageRef.current.value + ` :${emoji.replace(/[\s-]+/g, '_')}: `;
Copy link
Collaborator

@sidmohanty11 sidmohanty11 Jul 25, 2024

Choose a reason for hiding this comment

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

i think it's complaining because of this

messageRef.current.value + ` :${emoji.replace(/[\s-]+/g, '_')}: `;

can we instead do

`${messageRef.current.value} :${emoji.replace(/[\s-]+/g, '_')}: `

also, can you check if messageRef.current.value can be other than a string? maybe we can add ?? '' if it's not present

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed it!

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.

Emoji selection disables the send message button
5 participants