feat(chat-search): basic chat history search in web#17025
feat(chat-search): basic chat history search in web#17025bandhan-majumder wants to merge 1 commit intojitsi:masterfrom
Conversation
|
Hi, thanks for your contribution! |
|
signed already |
| } | ||
| }, [ isSearchVisible ]); | ||
|
|
||
| const onSearchChange = useCallback((value: string) => { |
There was a problem hiding this comment.
we may want to add a debouncing logic here later on
| onGoToFirstUnreadMessage = { this._onGoToFirstUnreadMessage } /> } | ||
| {showNoResults ? ( | ||
| <div className = 'chat-no-search-results'> | ||
| <span>{i18next.t('chat.noSearchResults', { searchString })}</span> |
There was a problem hiding this comment.
using i18next instead of useTranslations to avoid invalid hook calls here
|
|
||
| const searchTerm = searchString.toLowerCase().trim(); | ||
|
|
||
| return messages.filter(message => message.message.toLowerCase().includes(searchTerm)); |
There was a problem hiding this comment.
only filters based on the message (displayName and other params can also be added here)
| * @returns {IMessage[]} The filtered messages based on search string. | ||
| */ | ||
| export function getFilteredMessages(state: IReduxState): IMessage[] { | ||
| const { messages, searchString } = state['features/chat']; |
There was a problem hiding this comment.
I think this already covers the private messages searching part as we have the store based on that already, so there is no way we can filter out other's private messages. Tested locally already.
|
@damencho can you please review this |
|
I need to introduce it first to Product team for approval for this new feature. |
|
@damencho Thank you. I will wait until then |
|
We will discuss this with the Design team and will come back to you. Thank you. |
fixes: #17024
what does it do?
Introduces chat search functionality in web browsers. Users can easily search messages and if user searches for a match that does nto exist, it will show a not found text with the word.
video:
Screencast.From.2026-02-26.12-47-12.mp4