Repository navigation
Releases: euwars/CompatReorderable
Releases · euwars/CompatReorderable
Release list
1.1.4
Fixed
- iOS 27: choosing "Ask Siri" in a reorderable item's context menu crashed the app. iOS 27 adds Ask Siri to the menu of any view that also has a drag interaction, and runs the drag sequence on a session that is never dragged. The item was taken out of the layout as that session began, so the open menu was rebuilt and UIKit threw. The item now leaves the layout only once the drag reaches the container.
Since 1.0.8
- Supports iOS 16, and links on iOS 15 (reordering from iOS 16).
- Builds for tvOS and visionOS.
- Each cell redraws when a drag lifts and drops.
1.0.8
1.0.7
Fixed
- Drag preview corners now match the cell exactly: the corner radius is auto-detected from the rendered cell's own shape (±0.2pt), and the preview sets an explicit
visiblePathso UIKit's default preview rounding can't override it.
Changed
.compatReorderPreviewCornerRadius(_:)now defaults to automatic detection; set it only for shapes the rounded-rect approximation can't fit.
1.0.6
Fixed
- Releasing a lifted item without dragging left its hover shadow at full strength through the whole settle-back: the shadow is now the system's own layer, faded immediately on lift-cancel.
Added
.compatReorderPreviewCornerRadius(_:)— the hover shadow's corner radius (default 12); match it to your cells' shape.
1.0.5
Changed
- The drop now lands native-style: a freshly rendered copy carrying the committed content glides into the slot (no stale values — ImageRenderer draws from current model state), the hover shadow fades during the glide, and the final swap with the live cell is pixel-identical. The previous fade-out/fade-in handoff is gone, along with the now-obsolete
CompatReorderAnimations.dropReveal(source-breaking if you set it; remove the assignment). - Dragged items shrink to the system's carrying size while moving and grow back into the slot on drop, matching the native reorder feel.
1.0.4
Fixed
- Items with a context menu showed an empty drag preview: lift previews are now rendered synchronously with ImageRenderer (no window dependence), dark mode respected.
- The drop animation no longer shows a stale copy seated over the committed cell: the in-flight preview crossfades to nothing during the glide while the committed cell fades in underneath — one continuous handoff.
- The drop morph no longer scales the card (lift and drop canvases match).
Added
- Hover shadow that follows the cell's actual rendered shape (any corner radius) instead of the rectangular system plate.
CompatReorderAnimations+.compatReorderAnimations(_:): every animation the library performs (gap reflow, drop reveal, fallback lift/settle) is now configurable, with platform-tuned defaults.
1.0.3
Fixed
- Drop animation showed stale content: lift and drop previews are now live SwiftUI copies of the cell — committed changes (index badges, timestamps) render immediately on release, and preview corners/shadows always match the cell's own design (no more system chrome mismatch).
- Foreign drop targets or a second container could strand a drag forever (hidden cell, blocked drags): drag tokens are now coordinator-tagged, with a watchdog for sessions that end without a local drop/cancel.
- watchOS/macOS: a drag cancelled by the cell leaving the hierarchy (lazy container scrolling) left a frozen preview; now cleaned up.
- Ghost frames of deleted items no longer hijack retargeting.
- The move closure is refreshed every render (was captured once at onAppear).
- iOS containers without an enclosing ScrollView now reorder (auto-scroll disabled there).
Hardening
- Duplicate IDs degrade gracefully instead of trapping mid-drag; items inserted mid-drag stay visible; self-targeted moves are no-ops; successors deleted mid-drag commit to the correct slot.
Docs
- Fixed the install snippet URL; documented the one-container-per-scroll-view limitation.
1.0.2
CompatReorderable 1.0.2
Drag-to-reorder for any SwiftUI container, mirroring the native reorderable() / reorderContainer(for:move:) API from the 2027 OS releases.
Highlights
- System drag-and-drop backend on iOS 17+ / visionOS: native lift, drop and cancel animations, context-menu coexistence, second-finger scroll, edge auto-scroll
- SwiftUI gesture backend on watchOS 10+ and macOS 14+ (immediate click-drag on Mac, long-press on watch), with the dragged item rendered in a container-level overlay
- Data is never mutated during the drag; one
movecallback on drop,difference.apply(to:)included - Generic over your item's ID — validated with 500-item containers
Changes since 1.0.1
- Fixed the fallback-backend preview rendering under other cells in lazy containers
isEnablednow gates the fallback backend- Slower, calmer fallback animations (0.3s lift, 0.5s gap/settle)
1.0.0
CompatReorderable: OS 27 reorderable API backport Drag-to-reorder for any SwiftUI container, mirroring reorderable()/ reorderContainer(for:move:)/ReorderDifference. System drag-and-drop backend on iOS/visionOS (native lift/drop animations, context-menu coexistence, second-finger scroll, edge auto-scroll), SwiftUI gesture backend on watchOS. Generic over Item.ID for large collections; logic covered by a Swift Testing suite.