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 #2228

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 29, 2024

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

This PR was automatically cherry-picked based on the following PR:

Original PR description:


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.

@github-actions github-actions bot added cherry-pick echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. release labels Nov 29, 2024
@samwyndham samwyndham changed the title feat: Remove folder conversation filter when folder deleted - WPB-13905 feat: Remove folder conversation filter when folder deleted - WPB-13905 Dec 2, 2024
Copy link
Contributor Author

github-actions bot commented Dec 2, 2024

Test Results

    4 files    564 suites   8m 59s ⏱️
4 279 tests 4 279 ✅ 0 💤 0 ❌
4 287 runs  4 287 ✅ 0 💤 0 ❌

Results for commit 9eba2a3.

@samwyndham samwyndham added this pull request to the merge queue Dec 2, 2024
Merged via the queue into develop with commit f6c00e9 Dec 2, 2024
12 checks passed
@samwyndham samwyndham deleted the feat/remove-folder-filter-WPB-13905-v2-cherry-pick branch December 2, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick 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.

2 participants