Skip to content

Commit e451a1b

Browse files
Bumping versions to 16.6.0 (#606)
## What's Changed * Add layout-aware drop targeting for custom layouts by @gabreho in #605 ### Checklist Please do the following before merging: - [x] Ensure any public-facing changes are reflected in the [changelog](https://github.com/square/Listable/blob/main/CHANGELOG.md). Include them in the `Main` section.
2 parents be21499 + 3958624 commit e451a1b

16 files changed

Lines changed: 1083 additions & 622 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
### Added
66

7-
- Added `targetIndexPath(forInteractivelyMovingItem:withPosition:)` protocol method to `ListLayout`, allowing custom layouts to override drop target determination during interactive reordering.
8-
- Added `isReorderable` property on `ListLayoutContent.ItemInfo` to check if an item has reordering enabled.
9-
107
### Removed
118

129
### Changed
@@ -17,6 +14,13 @@
1714

1815
# Past Releases
1916

17+
# 16.6.0 - 2026-02-10
18+
19+
### Added
20+
21+
- Added `targetIndexPath(forInteractivelyMovingItem:withPosition:)` protocol method to `ListLayout`, allowing custom layouts to override drop target determination during interactive reordering.
22+
- Added `isReorderable` property on `ListLayoutContent.ItemInfo` to check if an item has reordering enabled.
23+
2024
# 16.5.0 - 2025-11-05
2125

2226
### Added
-4.18 KB
Binary file not shown.

docs/JSON/ListableUI.json

Lines changed: 815 additions & 614 deletions
Large diffs are not rendered by default.

docs/Listable/Classes/ListLayoutContent/ItemInfo.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,33 @@ <h4>Declaration</h4>
949949
</section>
950950
</div>
951951
</li>
952+
<li class="item">
953+
<div>
954+
<code>
955+
<a name="/s:10ListableUI17ListLayoutContentC8ItemInfoC13isReorderableSbvp"></a>
956+
<a name="//apple_ref/swift/Property/isReorderable" class="dashAnchor"></a>
957+
<a class="token" href="#/s:10ListableUI17ListLayoutContentC8ItemInfoC13isReorderableSbvp">isReorderable</a>
958+
</code>
959+
</div>
960+
<div class="height-container">
961+
<div class="pointer-container"></div>
962+
<section class="section">
963+
<div class="pointer"></div>
964+
<div class="abstract">
965+
<p>Whether this item can be reordered (has reordering configuration).</p>
966+
967+
</div>
968+
<div class="declaration">
969+
<h4>Declaration</h4>
970+
<div class="language">
971+
<p class="aside-title">Swift</p>
972+
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isReorderable</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
973+
974+
</div>
975+
</div>
976+
</section>
977+
</div>
978+
</li>
952979
<li class="item">
953980
<div>
954981
<code>

docs/Listable/Extensions/UIRectEdge.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<img class="carat" src="../img/carat.png" alt=""/>
4747
<a class="breadcrumb" href="../Extensions.html">Extensions</a>
4848
<img class="carat" src="../img/carat.png" alt=""/>
49-
UIKit.UIRectEdge Extension Reference
49+
UIUtilities.UIRectEdge Extension Reference
5050
</p>
5151

5252
<div class="content-wrapper">

docs/Listable/Protocols/AnyListLayout.html

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,75 @@ <h4>Declaration</h4>
12381238
</section>
12391239
</div>
12401240
</li>
1241+
<li class="item">
1242+
<div>
1243+
<code>
1244+
<a name="/s:10ListableUI13AnyListLayoutP15targetIndexPath26forInteractivelyMovingItem12withPosition10Foundation0gH0VSgAI_So7CGPointVtF"></a>
1245+
<a name="//apple_ref/swift/Method/targetIndexPath(forInteractivelyMovingItem:withPosition:)" class="dashAnchor"></a>
1246+
<a class="token" href="#/s:10ListableUI13AnyListLayoutP15targetIndexPath26forInteractivelyMovingItem12withPosition10Foundation0gH0VSgAI_So7CGPointVtF">targetIndexPath(forInteractivelyMovingItem:<wbr>withPosition:<wbr>)</a>
1247+
</code>
1248+
</div>
1249+
<div class="height-container">
1250+
<div class="pointer-container"></div>
1251+
<section class="section">
1252+
<div class="pointer"></div>
1253+
<div class="abstract">
1254+
<p>Returns the target index path for an item being interactively moved.</p>
1255+
1256+
<p>Custom layouts can override this to provide layout-aware drop target
1257+
determination. The default implementation returns <code>nil</code>, which causes
1258+
<code>CollectionViewLayout</code> to fall back to UICollectionView&rsquo;s default behavior.</p>
1259+
1260+
</div>
1261+
<div class="declaration">
1262+
<h4>Declaration</h4>
1263+
<div class="language">
1264+
<p class="aside-title">Swift</p>
1265+
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">targetIndexPath</span><span class="p">(</span>
1266+
<span class="n">forInteractivelyMovingItem</span> <span class="nv">previousIndexPath</span><span class="p">:</span> <span class="kt">IndexPath</span><span class="p">,</span>
1267+
<span class="n">withPosition</span> <span class="nv">position</span><span class="p">:</span> <span class="kt">CGPoint</span>
1268+
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">IndexPath</span><span class="p">?</span></code></pre>
1269+
1270+
</div>
1271+
</div>
1272+
<div>
1273+
<h4>Parameters</h4>
1274+
<table class="graybox">
1275+
<tbody>
1276+
<tr>
1277+
<td>
1278+
<code>
1279+
<em>previousIndexPath</em>
1280+
</code>
1281+
</td>
1282+
<td>
1283+
<div>
1284+
<p>The current index path of the item being moved.</p>
1285+
</div>
1286+
</td>
1287+
</tr>
1288+
<tr>
1289+
<td>
1290+
<code>
1291+
<em>position</em>
1292+
</code>
1293+
</td>
1294+
<td>
1295+
<div>
1296+
<p>The current position of the item in the collection view&rsquo;s coordinate space.</p>
1297+
</div>
1298+
</td>
1299+
</tr>
1300+
</tbody>
1301+
</table>
1302+
</div>
1303+
<div>
1304+
<h4>Return Value</h4>
1305+
<p>The target index path if the layout can determine it, or <code>nil</code> to use default behavior.</p>
1306+
</div>
1307+
</section>
1308+
</div>
1309+
</li>
12411310
<li class="item">
12421311
<div>
12431312
<code>

docs/Listable/Protocols/ListLayout.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,38 @@ <h4>Declaration</h4>
13061306
<span class="n">withTargetPosition</span> <span class="nv">position</span><span class="p">:</span> <span class="kt">CGPoint</span>
13071307
<span class="p">)</span></code></pre>
13081308

1309+
</div>
1310+
</div>
1311+
</section>
1312+
</div>
1313+
</li>
1314+
<li class="item">
1315+
<div>
1316+
<code>
1317+
<a name="/s:10ListableUI13AnyListLayoutP15targetIndexPath26forInteractivelyMovingItem12withPosition10Foundation0gH0VSgAI_So7CGPointVtF"></a>
1318+
<a name="//apple_ref/swift/Method/targetIndexPath(forInteractivelyMovingItem:withPosition:)" class="dashAnchor"></a>
1319+
<a class="token" href="#/s:10ListableUI13AnyListLayoutP15targetIndexPath26forInteractivelyMovingItem12withPosition10Foundation0gH0VSgAI_So7CGPointVtF">targetIndexPath(forInteractivelyMovingItem:<wbr>withPosition:<wbr>)</a>
1320+
</code>
1321+
<span class="declaration-note">
1322+
Extension method
1323+
</span>
1324+
</div>
1325+
<div class="height-container">
1326+
<div class="pointer-container"></div>
1327+
<section class="section">
1328+
<div class="pointer"></div>
1329+
<div class="abstract">
1330+
1331+
</div>
1332+
<div class="declaration">
1333+
<h4>Declaration</h4>
1334+
<div class="language">
1335+
<p class="aside-title">Swift</p>
1336+
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">targetIndexPath</span><span class="p">(</span>
1337+
<span class="n">forInteractivelyMovingItem</span> <span class="nv">previousIndexPath</span><span class="p">:</span> <span class="kt">IndexPath</span><span class="p">,</span>
1338+
<span class="n">withPosition</span> <span class="nv">position</span><span class="p">:</span> <span class="kt">CGPoint</span>
1339+
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">IndexPath</span><span class="p">?</span></code></pre>
1340+
13091341
</div>
13101342
</div>
13111343
</section>

docs/Listable/docsets/Listable.docset/Contents/Resources/Documents/Classes/ListLayoutContent/ItemInfo.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,33 @@ <h4>Declaration</h4>
949949
</section>
950950
</div>
951951
</li>
952+
<li class="item">
953+
<div>
954+
<code>
955+
<a name="/s:10ListableUI17ListLayoutContentC8ItemInfoC13isReorderableSbvp"></a>
956+
<a name="//apple_ref/swift/Property/isReorderable" class="dashAnchor"></a>
957+
<a class="token" href="#/s:10ListableUI17ListLayoutContentC8ItemInfoC13isReorderableSbvp">isReorderable</a>
958+
</code>
959+
</div>
960+
<div class="height-container">
961+
<div class="pointer-container"></div>
962+
<section class="section">
963+
<div class="pointer"></div>
964+
<div class="abstract">
965+
<p>Whether this item can be reordered (has reordering configuration).</p>
966+
967+
</div>
968+
<div class="declaration">
969+
<h4>Declaration</h4>
970+
<div class="language">
971+
<p class="aside-title">Swift</p>
972+
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isReorderable</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
973+
974+
</div>
975+
</div>
976+
</section>
977+
</div>
978+
</li>
952979
<li class="item">
953980
<div>
954981
<code>

docs/Listable/docsets/Listable.docset/Contents/Resources/Documents/Extensions/UIRectEdge.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<img class="carat" src="../img/carat.png" alt=""/>
4747
<a class="breadcrumb" href="../Extensions.html">Extensions</a>
4848
<img class="carat" src="../img/carat.png" alt=""/>
49-
UIKit.UIRectEdge Extension Reference
49+
UIUtilities.UIRectEdge Extension Reference
5050
</p>
5151

5252
<div class="content-wrapper">

docs/Listable/docsets/Listable.docset/Contents/Resources/Documents/Protocols/AnyListLayout.html

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,75 @@ <h4>Declaration</h4>
12381238
</section>
12391239
</div>
12401240
</li>
1241+
<li class="item">
1242+
<div>
1243+
<code>
1244+
<a name="/s:10ListableUI13AnyListLayoutP15targetIndexPath26forInteractivelyMovingItem12withPosition10Foundation0gH0VSgAI_So7CGPointVtF"></a>
1245+
<a name="//apple_ref/swift/Method/targetIndexPath(forInteractivelyMovingItem:withPosition:)" class="dashAnchor"></a>
1246+
<a class="token" href="#/s:10ListableUI13AnyListLayoutP15targetIndexPath26forInteractivelyMovingItem12withPosition10Foundation0gH0VSgAI_So7CGPointVtF">targetIndexPath(forInteractivelyMovingItem:<wbr>withPosition:<wbr>)</a>
1247+
</code>
1248+
</div>
1249+
<div class="height-container">
1250+
<div class="pointer-container"></div>
1251+
<section class="section">
1252+
<div class="pointer"></div>
1253+
<div class="abstract">
1254+
<p>Returns the target index path for an item being interactively moved.</p>
1255+
1256+
<p>Custom layouts can override this to provide layout-aware drop target
1257+
determination. The default implementation returns <code>nil</code>, which causes
1258+
<code>CollectionViewLayout</code> to fall back to UICollectionView&rsquo;s default behavior.</p>
1259+
1260+
</div>
1261+
<div class="declaration">
1262+
<h4>Declaration</h4>
1263+
<div class="language">
1264+
<p class="aside-title">Swift</p>
1265+
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">targetIndexPath</span><span class="p">(</span>
1266+
<span class="n">forInteractivelyMovingItem</span> <span class="nv">previousIndexPath</span><span class="p">:</span> <span class="kt">IndexPath</span><span class="p">,</span>
1267+
<span class="n">withPosition</span> <span class="nv">position</span><span class="p">:</span> <span class="kt">CGPoint</span>
1268+
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">IndexPath</span><span class="p">?</span></code></pre>
1269+
1270+
</div>
1271+
</div>
1272+
<div>
1273+
<h4>Parameters</h4>
1274+
<table class="graybox">
1275+
<tbody>
1276+
<tr>
1277+
<td>
1278+
<code>
1279+
<em>previousIndexPath</em>
1280+
</code>
1281+
</td>
1282+
<td>
1283+
<div>
1284+
<p>The current index path of the item being moved.</p>
1285+
</div>
1286+
</td>
1287+
</tr>
1288+
<tr>
1289+
<td>
1290+
<code>
1291+
<em>position</em>
1292+
</code>
1293+
</td>
1294+
<td>
1295+
<div>
1296+
<p>The current position of the item in the collection view&rsquo;s coordinate space.</p>
1297+
</div>
1298+
</td>
1299+
</tr>
1300+
</tbody>
1301+
</table>
1302+
</div>
1303+
<div>
1304+
<h4>Return Value</h4>
1305+
<p>The target index path if the layout can determine it, or <code>nil</code> to use default behavior.</p>
1306+
</div>
1307+
</section>
1308+
</div>
1309+
</li>
12411310
<li class="item">
12421311
<div>
12431312
<code>

0 commit comments

Comments
 (0)