Skip to content

Conversation

emil-wire
Copy link
Contributor

@emil-wire emil-wire commented Jul 9, 2025

TaskWPB-18707 [iOS] add filter for unread messages, mentions and replies

Issue

This is my attempt at adding some additional filters to the app. I've tried to stick to the general implementation of the other filter items that already exist. The filters cover unread, mentions and replies. They're hidden behind a feature flag because the design isn't finalized yet. Since this is my first contribution, I'd appreciate all the feedback I can get, especially what tests I should write.

Testing

Open the app, tap the conversation filters and give it a spin


Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

@emil-wire emil-wire changed the title add new conversation filters WPB-18707 feat: add new conversation filters WPB-18707 Jul 9, 2025
@emil-wire emil-wire changed the title feat: add new conversation filters WPB-18707 feat: add new conversation filters - WPB-18707 Jul 9, 2025
Copy link
Contributor

github-actions bot commented Jul 9, 2025

Test Results

4 647 tests   4 619 ✅  7m 29s ⏱️
  629 suites     28 💤
    4 files        0 ❌

Results for commit a39f00c.

♻️ This comment has been updated with latest results.

@emil-wire emil-wire marked this pull request as draft July 9, 2025 22:21
@emil-wire emil-wire marked this pull request as ready for review July 10, 2025 04:39
@datadog-wireapp
Copy link

datadog-wireapp bot commented Jul 10, 2025

Datadog Report

Branch report: feat/add-filter-for-unread-messages-WPB-18707
Commit report: 5ad3b5f
Test service: wire-ios-mono

✅ 0 Failed, 4664 Passed, 28 Skipped, 3m 50.48s Total Time

@netbe netbe self-requested a review July 10, 2025 07:42
Copy link
Collaborator

@netbe netbe 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 the contribution @emil-wire, it will be definitely useful!

2 things:

  • I have to kill the app for the flag to take effect
  • I am surprised the filter is not applied at the SyncEngine level. We usually add the predicates in ZMConversationListDirectory.
  • would be cool to add the draft as well

@emil-wire
Copy link
Contributor Author

@netbe I added drafts, moved the predicates to the right place and hopefully fixed the flag.
Regarding the tests, could you give me some guidance? Really not sure what to test, how to test. I'm using this as an exercise to learn more about our app and try to understand how it works - so please teach me master :)

@samwyndham samwyndham self-requested a review July 15, 2025 08:23
Copy link
Contributor

@samwyndham samwyndham left a comment

Choose a reason for hiding this comment

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

Great work! Thank you for contributing! Before merging I think we should either:

  • remove the observation of the developer flag
  • find a way to make it more granular (I expect KVO) on the UserDefaults object

Copy link
Collaborator

@netbe netbe left a comment

Choose a reason for hiding this comment

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

looks good, just fix the remained comments tests fixed.

The UI snapshots need to be recorded too with:
IOS_VERSION='18.0'
IPHONE_MODEL='iPhone 14'

@emil-wire
Copy link
Contributor Author

@netbe @samwyndham I've used KVO instead as suggested and fixed up the tests. Added some snapshots using the correct device/os combo too

@emil-wire emil-wire requested a review from samwyndham July 18, 2025 06:16
@emil-wire emil-wire dismissed samwyndham’s stale review July 21, 2025 11:53

Removed the performance test

Copy link
Contributor

@samwyndham samwyndham left a comment

Choose a reason for hiding this comment

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

Great work! I'm excited to use this!

@emil-wire emil-wire enabled auto-merge July 22, 2025 09:10
@emil-wire emil-wire added this pull request to the merge queue Jul 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 22, 2025
@emil-wire emil-wire enabled auto-merge July 31, 2025 08:31
@emil-wire emil-wire added this pull request to the merge queue Jul 31, 2025
Merged via the queue into develop with commit 7f15954 Jul 31, 2025
11 checks passed
@emil-wire emil-wire deleted the feat/add-filter-for-unread-messages-WPB-18707 branch July 31, 2025 09:37
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