Skip to content

feat(chat-search): basic chat history search in web#17025

Open
bandhan-majumder wants to merge 1 commit intojitsi:masterfrom
bandhan-majumder:feat-chat-search
Open

feat(chat-search): basic chat history search in web#17025
bandhan-majumder wants to merge 1 commit intojitsi:masterfrom
bandhan-majumder:feat-chat-search

Conversation

@bandhan-majumder
Copy link
Contributor

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

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@bandhan-majumder
Copy link
Contributor Author

signed already

}
}, [ isSearchVisible ]);

const onSearchChange = useCallback((value: string) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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'];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

@bandhan-majumder
Copy link
Contributor Author

@saghul @mihhu can you please review this? 🙏

@bandhan-majumder
Copy link
Contributor Author

@damencho can you please review this

@damencho
Copy link
Member

I need to introduce it first to Product team for approval for this new feature.

@bandhan-majumder
Copy link
Contributor Author

@damencho Thank you. I will wait until then

@damencho
Copy link
Member

We will discuss this with the Design team and will come back to you. Thank you.

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: basic chat search in web

3 participants