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: highlight search messages #884

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

Conversation

dhairyashiil
Copy link
Contributor

@dhairyashiil dhairyashiil commented Jan 12, 2025

Brief Title

Highlight searched message text in rendered messages in Sidebar

Acceptance Criteria fulfillment

  • Highlight all occurrences of the searched word in the sidebar messages, maintaining the original message text formatting.
  • Ensure that the highlighting is removed when the search term is cleared or changed

Fixes #883

Video/Screenshots:

highlight.searched.messages.mp4

PR Test Details

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

@@ -81,6 +81,13 @@ export const EmojiStyles = {
`,
};

export const useHighlightTextStyles = {
highlight: css`
background-color: yellow;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't use hardcoded colors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, sorry about this. I forgot to set the color according to the mode and theme.

@Spiral-Memory
Copy link
Collaborator

This is a great PR.
Thanks for this @dhairyashiil

I think, you can optimize it further, Look into it, if you can reduce the amount of changes for this

Thanks

@dhairyashiil
Copy link
Contributor Author

This is a great PR. Thanks for this @dhairyashiil

I think, you can optimize it further, Look into it, if you can reduce the amount of changes for this

Thanks

Thank you for the appreciation. I'm happy you liked it 😁, and yes, I will look into how I can optimize it further

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.

Feat: Highlight searched message text in rendered messages in Sidebar
2 participants