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

fix: remove trim of spaces when searching for messages inside a conversation (WPB-5834) #2660

Merged

Conversation

alexandreferris
Copy link
Contributor

@alexandreferris alexandreferris commented Feb 5, 2024

BugWPB-5834 [Android] Searching for a word by keeping space doesn't show proper result.


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

When searching for messages inside a conversation and the search query had spaces, it was being ignored.

Causes (Optional)

Before sending the search query to the DB we were trimming the search query.

Solutions

Remove .trim()

Testing

How to Test

  • Have two messages in a conversation: {"not a normal text"} and {"this message contains a no message"}
  • Open search inside a conversation
  • Search for "no" = should return 2 results
  • Search for "no " (with the space at the end) = should return only one message

@alexandreferris alexandreferris self-assigned this Feb 5, 2024
@alexandreferris alexandreferris requested review from a team, typfel, yamilmedina, borichellow, MohamadJaara and Garzas and removed request for a team February 5, 2024 16:16
@alexandreferris alexandreferris added this pull request to the merge queue Feb 5, 2024
Copy link

codecov bot commented Feb 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b629f32) 41.82% compared to head (89b7ac0) 41.82%.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2660   +/-   ##
==========================================
  Coverage      41.82%   41.82%           
  Complexity      1158     1158           
==========================================
  Files            367      367           
  Lines          13327    13327           
  Branches        1769     1769           
==========================================
  Hits            5574     5574           
  Misses          7213     7213           
  Partials         540      540           
Files Coverage Δ
...ch/messages/SearchConversationMessagesViewModel.kt 78.94% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b629f32...89b7ac0. Read the comment docs.

Copy link
Contributor

github-actions bot commented Feb 5, 2024

Test Results

790 tests  +1   790 ✅ +1   11m 22s ⏱️ - 1m 28s
107 suites ±0     0 💤 ±0 
107 files   ±0     0 ❌ ±0 

Results for commit 89b7ac0. ± Comparison against base commit b629f32.

Copy link
Contributor

github-actions bot commented Feb 5, 2024

APKs built during tests are available here. Scroll down to Artifacts!

Merged via the queue into develop with commit a077325 Feb 5, 2024
14 of 15 checks passed
@alexandreferris alexandreferris deleted the fix/space_when_searching_inside_conversation_dev branch February 5, 2024 17:01
@AndroidBob
Copy link
Collaborator

Build 2871 succeeded.

The build produced the following APK's:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants