Skip to content

List migration from UITableView to UICollectionView#1240

Merged
dfsm merged 7 commits intomainfrom
list-migration
May 1, 2026
Merged

List migration from UITableView to UICollectionView#1240
dfsm merged 7 commits intomainfrom
list-migration

Conversation

@dfsm
Copy link
Copy Markdown
Contributor

@dfsm dfsm commented Apr 25, 2026

  • Migrated from UITableView to UICollectionView and fixed list views so that cells are full width on all platforms (fixes indentation issue on MacOS Designed for iPad that could not be resolved with the TableViews).
  • Theme picker view changed to SwiftUI to fix opaque tabbar background issue.
  • Fixed Forum title, Back button and Compose button layout on iPad in ThreadList views.

The UICollectionView change needed other changes for the bookmarks filter, etc. Looks much better on all platforms now.

Tested on simulators for iPhone 17 Pro 26.4, iPad Pro M5 11" 26.4, iPad mini 18.5 and Designed for iPad MacOS 26.4

dfsm added 5 commits April 25, 2026 20:31
… that cells are full width on all platforms (fixes indentation issue on MacOS Designed for iPad).

Theme picker view changed to SwiftUI to fix opaque tabbar background issue.
- Remove dead `lastKnownContentViewWidth` cache and the table-view-era width-change invalidation on the forum and thread list controllers; cell sizing is now driven by `preferredLayoutAttributesFitting`.
- Remove unused `estimatedHeight` and `heightForViewModel` static helpers from forum, thread, and message list cells (kept `ThreadListCell.heightForViewModel`, still used by `ThreadPreviewViewController`).
- Replace `assert(scrollView === collectionView)` with a `guard` in `LoadMoreCollectionFooter` so the check holds in Release builds.
- Reuse the existing `selectedBackgroundView` in `UICollectionViewCell.selectedBackgroundColor` instead of allocating a fresh `UIView` on every set.
- Drop the orphaned `"%@ %@"` localization stub.
- Delete the unused `LoadMoreFooter` (UITableView version); every caller is now on `LoadMoreCollectionFooter`.
- Drop orphaned `"%@ %@"` and `"Done"` localization stubs from AwfulSettingsUI.
- `ThreadListDataSource.setBookmarkFilter`: remove the unused `animated` parameter and tighten the doc comment — the supplementary-view focus rationale is stale now that the bookmarks search bar is hosted outside the collection view.
- `ForumListDataSource.scheduleSnapshotApply`: nil out the stored work item once it runs so we don't hold a dangling reference.
- `NavigationController.replaceSidebarBarButtonItems`: skip the custom back-button injection when the pushed VC is a `UIHostingController`. SwiftUI manages its own back button on views pushed via `NavigationLink` (theme picker, app icon picker, etc.), so the injection produced two visible back chevrons.
- Remove the `Done` toolbar item from `AppIconGridView` — leftover from when the picker was a presented sheet; back button suffices now that it's pushed via `NavigationLink`.
Copy link
Copy Markdown
Member

@nolanw nolanw left a comment

Choose a reason for hiding this comment

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

long overdue, ty! ok to merge after resolving the conflict

@dfsm dfsm merged commit 535beea into main May 1, 2026
1 check was pending
@dfsm dfsm deleted the list-migration branch May 1, 2026 23:17
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