Form icon indicating copy to clipboard operation
Form copied to clipboard

Drop table & collection view APIs and create 5.0.0 release

Open nataliq-pp opened this issue 3 years ago • 0 comments

What has been done?

We are dropping support for some table & collection view APIs that the framework doesn't support well today. For TableKit we're also changing how item updates are applied.

API changes & update info (to be included in the release notes)

  • Reusable protocol
    • makeAndReconfigure required function is removed - use makeAndConfigure instead (*).
    • The default implementation of makeAndConfigure is removed (since it assumed makeAndReconfigure is implemented) - if your reusable implements makeAndReconfigure migrate it to makeAndConfigure (see above); if it didn't implement both functions then it was not working (due to infinite loop) so consider removing it if it wasn't used at all or fixing the crash.
  • Convince methods for working with UICollectionView
    • Cell and supplementary view dequeue APIs taking reconfigure blocks are removed - use the APIs taking configure blocks instead (*).
    • UICollectionReusableView's reconfigure is replaced by configure getter.

(*) Note: the configure blocks don't provide the old item so if you used that you will need to find a different way to determine what changed.

Why was it done?

The reconfigure functionality haven’t proven to be useful in our experience and supporting it is causing us issues at the same time.

  • For TableKit we see issues like #182 because we're using custom logic to determine which cells to update (relying on visible index paths but not taking into account visible index path changes).
  • Our CollectionKit implementation doesn't use the reconfigure blocks passed to its dequeue functions, it just stores them, which could be confusing.

Checklist

  • [x] I have updated the change log
  • [x] I have bumped the marketing version
  • [x] I have bumped the CocoaPods spec version
  • [x] I have tested my changes on both iPhone and iPad
  • [ ] My changes are unit tested
    • TODO: add a test that makes sure not visible table view cells are not reconfigured

nataliq-pp avatar Jul 01 '22 08:07 nataliq-pp