KarrotListKit icon indicating copy to clipboard operation
KarrotListKit copied to clipboard

[Breaking] Remove Layout Mode and Size Storage

Open ppth0608 opened this issue 5 months ago • 1 comments

Summary

This PR removes the deprecated layout mode system and component size storage functionality from KarrotListKit. These features were no longer being used and added unnecessary complexity to the codebase.

Changes

  • Removed layoutMode property from Component protocol and AnyComponent
    • Deleted ContentLayoutMode enum entirely
    • Cleaned up related test code
  • Removed sizeStorage functionality
    • Deleted ComponentSizeStorage class
    • Removed size storage integration from CollectionViewAdapter and CollectionViewLayoutAdaptable
    • Cleaned up size storage usage in collection view cells and reusable views
  • Removed unused section layout implementations
    • Deleted DefaultCompositionalLayoutSectionFactory, HorizontalLayout, VerticalGridLayout, and VerticalLayout classes
    • Simplified CompositionalLayoutSectionFactory by removing layout-specific logic
    • Updated Section to remove layout-related properties
  • Updated documentation and sample app
    • Updated README to reflect the removal of layout mode
    • Simplified sample app code that was using the removed features

Impact

This is a breaking change that removes previously deprecated APIs. Projects using layoutMode, sizeStorage, or the removed layout classes will need to migrate to alternative approaches.

Testing

  • All existing tests have been updated
  • Removed tests specific to the deleted functionality
  • Sample app has been tested and works correctly without these features

ppth0608 avatar Jul 22 '25 01:07 ppth0608