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

Adopt fuzzy searching through the RoomListService's dynamic filter #1483

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

stefanceriu
Copy link
Member

No description provided.

@stefanceriu stefanceriu requested a review from a team as a code owner August 11, 2023 14:26
@stefanceriu stefanceriu requested review from pixlwave and removed request for a team August 11, 2023 14:26
@stefanceriu stefanceriu force-pushed the stefan/fuzzySearching branch from 340bcab to 1f63e11 Compare August 11, 2023 14:27
@github-actions
Copy link

github-actions bot commented Aug 11, 2023

Warnings
⚠️ Please provide a description for this PR.
⚠️ Some of the commits are missing ticket numbers. Please consider squashing all commits that don't have a tracking number.
⚠️ You seem to have made changes to views. Please consider adding screenshots.
⚠️

ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift#L116 - A doc comment should be attached to a declaration. (orphaned_doc_comment)

Generated by 🚫 Danger Swift against 62cb683

@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Patch coverage: 5.26% and project coverage change: +0.07% 🎉

Comparison is base (25f66d2) 52.92% compared to head (62cb683) 52.99%.
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1483      +/-   ##
===========================================
+ Coverage    52.92%   52.99%   +0.07%     
===========================================
  Files          400      400              
  Lines        26875    26878       +3     
  Branches     13442    13440       -2     
===========================================
+ Hits         14223    14245      +22     
+ Misses       12250    12229      -21     
- Partials       402      404       +2     
Flag Coverage Δ
unittests 23.05% <5.26%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
.../Sources/Screens/HomeScreen/HomeScreenModels.swift 86.00% <0.00%> (+2.66%) ⬆️
...X/Sources/Screens/HomeScreen/View/HomeScreen.swift 52.91% <0.00%> (-0.26%) ⬇️
...ervices/Room/RoomSummary/RoomSummaryProvider.swift 63.02% <0.00%> (-3.76%) ⬇️
...Room/RoomSummary/RoomSummaryProviderProtocol.swift 44.23% <ø> (ø)
...urces/Screens/HomeScreen/HomeScreenViewModel.swift 83.02% <50.00%> (-0.25%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

Oh this is going to be nice! 🔎

return
}

_ = listUpdatesSubscriptionResult?.dynamicFilter.set(kind: .fuzzyMatchRoomName(pattern: pattern.lowercased()))
Copy link
Member

Choose a reason for hiding this comment

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

Not part of this specifically, but it would be nice if the lowercases() happened on the Rust side instead of client side.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Hywan This is a workaround as I noticed the rust side doesn't take care of it. Do you think we can move it?

Copy link
Member

Choose a reason for hiding this comment

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

The fuzzy match uses smart case: if everything is in lower-case, the case is ignored, otherwise if at least one character is in uppercase, the case isn't ignored. So I would suggest to not put the search pattern in lowercase here.

@stefanceriu stefanceriu force-pushed the stefan/fuzzySearching branch from 1f63e11 to 62cb683 Compare August 12, 2023 06:12
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@stefanceriu stefanceriu merged commit e13e974 into develop Aug 12, 2023
@stefanceriu stefanceriu deleted the stefan/fuzzySearching branch August 12, 2023 06:47
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.

3 participants