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

room-list: exclude non-joined rooms when filtering by rooms, people, unreads and favourites #3347

Closed
wants to merge 1 commit into from

Conversation

stefanceriu
Copy link
Member

With the addition of experimental-room-list-with-unified-invites we now need to be more strict with what types of rooms we allow in the room list when applying filters.

@stefanceriu stefanceriu requested a review from Hywan April 22, 2024 09:50
@stefanceriu stefanceriu requested a review from a team as a code owner April 22, 2024 09:50
Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 83.61%. Comparing base (4398052) to head (e8427c4).

Files Patch % Lines
...x-sdk-ui/src/room_list_service/filters/category.rs 80.00% 1 Missing ⚠️
...-sdk-ui/src/room_list_service/filters/favourite.rs 75.00% 1 Missing ⚠️
...rix-sdk-ui/src/room_list_service/filters/unread.rs 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3347   +/-   ##
=======================================
  Coverage   83.60%   83.61%           
=======================================
  Files         241      241           
  Lines       24863    24866    +3     
=======================================
+ Hits        20787    20791    +4     
+ Misses       4076     4075    -1     

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

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Thanks for you work! I am however wondering if it's not better to add a join filter, just like the invite filter, and then use logic combinators like all(join, unread), it's seem more modular this way, thoughts?

Why am I proposing this? Because with this PR, we cannot use the unread, category and the favorite filter with invite (or later left maybe) anymore. It doesn't make a lot of sense for unread and favorite, but it makes sense for category.

Comment on lines 42 to 43
/// _Direct targets_ mean the number of users in a direct room, except us.
/// So if it returns 1, it means there are 2 users in the direct room.
Copy link
Member

Choose a reason for hiding this comment

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

Can you update the comment please? Or better, let's have two fields? Actually I would prefer if we can split the logic in two different fields please 🙂.

@stefanceriu
Copy link
Member Author

it's seem more modular this way, thoughts?

Yeah, that sounds like a great idea, don't know why I didn't think about it myself 🤦

@stefanceriu stefanceriu closed this May 7, 2024
@stefanceriu stefanceriu deleted the stefan/onlyJoinedRoomsInFilters branch May 7, 2024 14:50
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.

2 participants