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

feat: Remove folder conversation filter when folder deleted - WPB-13905 #2225

Merged
merged 13 commits into from
Nov 29, 2024

Conversation

samwyndham
Copy link
Contributor

@samwyndham samwyndham commented Nov 29, 2024

StoryWPB-13905 [iOS] Remove `Folder` filter if folder deleted - edge case for improvement

Issue

Currently when the folder filter is applied and the folder is deleted by removing its final conversation (locally or remotely), the folder filter remains leaving an empty conversation list.

This PR ensures the folder filter is removed when the folder is deleted. Specifically it:

  • Introduces ConversationFilterSelector that updates the conversation filter based on system events rather than user selection - for now it only handles folder deletions but could handle the events if needed.
  • Introduces a way of setting the current filter via the main coordinator without causing other navigation
  • Replaces ConversationDirectoryType.allFolders with ConversationDirectoryType.nonDeletedFolders - the users of ConversationDirectoryType only care about folders that are not marked for deletion.
  • Removes a bunch of dead code leftover from when folders we displayed as collapsable sections.

Old

Simulator.Screen.Recording.-.Test.Device.-.2024-11-29.at.12.23.46.mp4

New

Simulator.Screen.Recording.-.Test.Device.-.2024-11-29.at.12.19.35.mp4

Testing

Please test on iPhone & iPad

Locally

  1. Navigate to Conversations tab
  2. Long press on a conversation
  3. Tap "Move to..."
  4. Tap + icon
  5. Enter a folder name and tap "Create"
  6. Tap the filter button
  7. Select the folder from step 5
  8. Verify the conversations list is filtered by the folder
  9. Long press then conversation.
  10. Tap "Remove from "
  11. Verify the conversations list filter is removed an all conversations are shown.

Remotely

  1. On device 1 do steps 1-8 from above
  2. On device 2 remove the conversation from the folder
  3. On device 1 verify the conversations list filter is removed an all conversations are shown.

Checklist

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

@echoes-hq echoes-hq bot added the echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. label Nov 29, 2024
Copy link
Contributor

github-actions bot commented Nov 29, 2024

Test Results

    4 files    564 suites   8m 37s ⏱️
4 277 tests 4 277 ✅ 0 💤 0 ❌
4 285 runs  4 285 ✅ 0 💤 0 ❌

Results for commit 9651296.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@johnxnguyen johnxnguyen left a comment

Choose a reason for hiding this comment

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

Nice work!

@netbe netbe added the release label Nov 29, 2024
@samwyndham samwyndham enabled auto-merge (squash) November 29, 2024 13:32
@samwyndham samwyndham merged commit eaf59ce into release/cycle-3.114 Nov 29, 2024
10 of 11 checks passed
@samwyndham samwyndham deleted the feat/remove-folder-filter-WPB-13905-v2 branch November 29, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants