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

Support for macOS? #4

Open
5 tasks
jessesquires opened this issue Nov 3, 2019 · 1 comment
Open
5 tasks

Support for macOS? #4

jessesquires opened this issue Nov 3, 2019 · 1 comment

Comments

@jessesquires
Copy link
Owner

jessesquires commented Nov 3, 2019

⚠️ This is a very large task. Please coordinate here before doing any work.

ℹ️ I don't have a need for this yet, but might in the future.

ToDo

Here's a rough, high-level outline of what needs to be done.

  • Figure out the main differences between the NSCollectionView infra and UICollectionView infra
  • What can we reuse? What cannot be reused?
  • Should macOS just get its own library? Does it make sense to include it here?
  • Tests for everything
  • Add macOS example app to demonstrate, write UI Tests

Resources

@jessesquires
Copy link
Owner Author

jessesquires commented Jun 21, 2021

Actually, macOS might need all of its own infra to make this work... I'm not sure how much we can reuse.

Especially with the new design here that uses associatedTypes for CellViewModel, etc.

But, "cells" on macOS are actually NSViewControllers, which is... weird.
https://developer.apple.com/documentation/appkit/nscollectionviewitem

Maybe something like this:

public protocol CellViewModel: DiffableViewModel, ViewRegistrationProvider {

    #if os(iOS)
        associatedtype CellType: UICollectionViewCell
    #elseif os(macOS)
        associatedtype CellType: NSCollectionViewItem
    #endif

    // ....

}

However... I think this could get ugly very quickly.

In any case, this is a significant undertaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant