Skip to content

Highlight all the message search matches #13960

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

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

Conversation

abdullahemad12
Copy link

It is expected that when a user search for a message, that all the matches within the same messages are highlighted (if there are more than one match) not just the first match. This is also consistent with how the search in the desktop app is implemented

First time contributor checklist

Contributor checklist

  • Pixel 2, API 35
  • Pixel tablet
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

This commit changes the highlight strategy for message search from STRICT to MATCH_ALL. As a user, it is expected that if a message contains more than one occurrence of the key I am searching for, that all the found keys be highlighted not only the first one (which is indeed the behavior of the signal desktop app)

It is expected that when a user search for a message, that all the
matches within the same messages are highlighted (if there are more than
one match) not just the first match. This is also consistent with how
the search in the desktop app is implemented
@abdullahemad12
Copy link
Author

Hey @greyson-signal :) is there any thing I could do to move the merging of this PR forward?

@gabefair
Copy link

I am curious about the value add of this feature for mobile.
The search feature is to surface a text message. Once the search finds the first result search has fulfilled its job.
By adding the Match all option, would it increase search result's memory footprint? Cell phones have an average of less than 4gb of RAM, and a foreground app has an expectation (As of May 2025) to use 200-500mb of RAM.

@abdullahemad12
Copy link
Author

I forgot that I opened this one line PR 😅

@gabefair I am not sure that highlighting multiple words in a single message as opposed to highlighting one word in a single message puts that much pressure on memory. Even for mobile devices. Why do you think this additional highlights will consume that much memory?

The reason I added this change is that this is how other Apps like whatsapp and telegram do it (and I would assume if this produces memory problems and was insignificant UX change they wouldn't have done it 🤔

But aside from the other Apps, this is also how signal on the desktop does it and this change will make it consistent with how it is on the desktop app

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.

4 participants