Skip to content

[PTECH-34068] Respect shouldAnimateItems in diffing section controllers#138

Open
gmarm wants to merge 1 commit intodevelopfrom
fix/respect-should-animate-in-diffing-controllers
Open

[PTECH-34068] Respect shouldAnimateItems in diffing section controllers#138
gmarm wants to merge 1 commit intodevelopfrom
fix/respect-should-animate-in-diffing-controllers

Conversation

@gmarm
Copy link

@gmarm gmarm commented Mar 12, 2026

Ticket: PTECH-34068

Summary

Fixes section controller base classes to respect shouldAnimateItems(from:to:) overrides.

DiffingListSectionController, ManualDiffingListSectionController, and FoundationDiffingListSectionController all override calculateUpdate(from:to:) but never pass shouldAnimateItems(from:to:) to the CollectionViewSectionUpdate initializer, causing it to always default to true.

This means subclasses that override shouldAnimateItems to return false have no effect — updates are always animated

Fix by threading the shouldAnimateItems result through to the shouldAnimate parameter in all three controllers, matching the behavior of the base ListSectionController.calculateUpdate.

`DiffingListSectionController`, `ManualDiffingListSectionController`,
and `FoundationDiffingListSectionController` all override
`calculateUpdate(from:to:)` but do not pass
`shouldAnimateItems(from:to:)` to the `CollectionViewSectionUpdate`
initializer, causing it to always default to `true`.

This means subclasses that override `shouldAnimateItems` to return
`false` have no effect — updates are always animated.

Fix by threading the `shouldAnimateItems` result through to the
`shouldAnimate` parameter in all three controllers, matching the
behavior of the base `ListSectionController.calculateUpdate`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gmarm gmarm requested a review from a team as a code owner March 12, 2026 13:13
@gmarm gmarm changed the title Respect shouldAnimateItems in diffing section controllers [PTECH-34068] Respect shouldAnimateItems in diffing section controllers Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants