Skip to content

Conversation

@MatiPl01
Copy link
Owner

@MatiPl01 MatiPl01 commented Dec 10, 2024

Description

This PR fixes sortable flex component items ordering. It removes issue with multiple unnecessary swaps and bugs when the active item could not be the first item in the group.

@MatiPl01 MatiPl01 self-assigned this Dec 10, 2024
@MatiPl01 MatiPl01 force-pushed the feat/flex-order-updater-reimagined branch from b53689c to 1c760d1 Compare December 15, 2024 18:43
@MatiPl01 MatiPl01 added enhancement New feature or request fix labels Dec 16, 2024
@MatiPl01 MatiPl01 force-pushed the feat/flex-order-updater-reimagined branch 4 times, most recently from e65caa8 to 13b8b66 Compare January 1, 2025 17:34
@MatiPl01 MatiPl01 force-pushed the feat/flex-order-updater-reimagined branch from 68d2bf8 to 3da0e31 Compare January 18, 2025 21:54
@vercel
Copy link

vercel bot commented Jan 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-sortable-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 27, 2025 0:27am

@MatiPl01 MatiPl01 merged commit 02ee7e0 into main Jan 27, 2025
3 of 4 checks passed
@MatiPl01 MatiPl01 deleted the feat/flex-order-updater-reimagined branch January 27, 2025 00:27
MatiPl01 pushed a commit that referenced this pull request Jan 28, 2025
# 1.0.0 (2025-01-28)

### Bug Fixes

* Absolute flex layout (also reverse) calculation issues, restore paddings support ([#185](#185)) ([8b120b3](8b120b3))
* Animation of items added to the sortable component ([#200](#200)) ([aa8e21c](aa8e21c)), closes [#196](#196)
* Auto scroll infinite updates issue ([#111](#111)) ([91b90c2](91b90c2))
* Auto scroll not working when item is not dragged ([#56](#56)) ([6375847](6375847))
* Circular dependencies ([#178](#178)) ([767ddb0](767ddb0))
* Column flex layout, add layout example screen ([#180](#180)) ([dd321c6](dd321c6))
* Don't trigger press animation when sorting is disabled ([#168](#168)) ([b6737d0](b6737d0))
* Drop indicator dimensions and position ([#97](#97)) ([d86b4e1](d86b4e1)), closes [#82](#82)
* Example app screen flickering caused by safe area ([#25](#25)) ([371aef5](371aef5))
* **eslint:** Fix eslint config by downgrading to v8 ([#3](#3)) ([ad1f2ac](ad1f2ac))
* Fix flex ordering for flex with alignment, prepare for release ([#206](#206)) ([e83e53a](e83e53a))
* Incorrect auto scroll bounds when container measurements were outdated ([#173](#173)) ([2e4edca](2e4edca))
* Initial render flickering and content overflow ([#89](#89)) ([b6f0e1f](b6f0e1f))
* Item overlapping issue ([#76](#76)) ([9483b79](9483b79))
* Item removal and grid layout calculation ([#161](#161)) ([a1cbcd9](a1cbcd9))
* Package path in the release workflow ([#207](#207)) ([6cf7e0c](6cf7e0c))
* Pan gesture being beginning but not being activated on iOS ([#114](#114)) ([a932cc8](a932cc8))
* Reanimated iOS and Android crashes by bumping version ([#99](#99)) ([5b4b2bd](5b4b2bd))
* Release workflow working directory ([#208](#208)) ([09660d3](09660d3))
* Require cycle ([#75](#75)) ([388bfc3](388bfc3))
* Reverse flex ordering and flex debug box ([#203](#203)) ([e2012ac](e2012ac))
* Semantic release setup ([#67](#67)) ([3eb70df](3eb70df))
* Smaller and bigger issues ([#176](#176)) ([85c01f4](85c01f4))
* SortableFlex items overflowing parent container ([#123](#123)) ([d37092b](d37092b))
* Transition from relative to absolute flex layout ([#150](#150)) ([3740542](3740542))
* Unmounted view measurements on the UI thread showing warnings ([#110](#110)) ([d21dabc](d21dabc))

### Features

* Absolute flex layout items positioning ([#8](#8)) ([c8affc6](c8affc6))
* Active item decoration ([#13](#13)) ([6b1f325](6b1f325))
* Active item drop indicator ([#48](#48)) ([6da6295](6da6295))
* Active item snapping to finger ([#79](#79)) ([2fa839d](2fa839d))
* Add callback functions called on drag state or order changes ([#70](#70)) ([4605697](4605697))
* Add drag context provider ([#10](#10)) ([134e727](134e727))
* Add drop indicator examples in the example app ([#96](#96)) ([a260acc](a260acc))
* Add grid items spacing via `rowGap` and `columnGap` ([#82](#82)) ([120e66b](120e66b))
* Add item context, add working touchable ([#121](#121)) ([cf35be0](cf35be0))
* Add optional haptic feedback via react-native-haptic-feedback ([#69](#69)) ([072283d](072283d))
* Allow animated props to be passed to components ([#42](#42)) ([a8b6e7e](a8b6e7e))
* Animated container height ([#162](#162)) ([42eff3c](42eff3c))
* Animated container height changes and column dimensions change ([#83](#83)) ([88190c4](88190c4))
* Auto scroll provider ([#45](#45)) ([c6ff65d](c6ff65d))
* Basic SortableView and MeasurementsProvider implementation ([#2](#2)) ([af06231](af06231))
* Clean up draggable view implementation, add decoration component ([#60](#60)) ([edc04f8](edc04f8))
* Data change examples  ([#115](#115)) ([b55622d](b55622d))
* Debug helper components for layout debugging ([#127](#127)) ([f829fa4](f829fa4))
* Debug provider ([#132](#132)) ([9f91a6a](9f91a6a))
* FlatList auto scroll example ([#46](#46)) ([20e6b4b](20e6b4b))
* Flex items reordering ([#15](#15)) ([7421d03](7421d03))
* Flex layout provider ([#6](#6)) ([16be3f8](16be3f8))
* Flex order updater reimplementation ([#165](#165)) ([02ee7e0](02ee7e0))
* Grid items reordering ([#14](#14)) ([f8b8ea8](f8b8ea8))
* Grid layout provider ([#5](#5)) ([8890c7c](8890c7c))
* Implement debug examples ([#135](#135)) ([c8354fb](c8354fb))
* Item layout animations ([#151](#151)) ([347abfe](347abfe))
* Migrate example to the new architecture, add flash-list example ([#55](#55)) ([92238e3](92238e3))
* Navigation state persistence and example styles enhancements ([#107](#107)) ([c2984b0](c2984b0))
* Refine grid swap ordering strategy ([#167](#167)) ([7552470](7552470))
* Sortable flex auto scroll examples ([#100](#100)) ([118b359](118b359))
* Sortable grid base component that displays items in a grid ([#4](#4)) ([b058cc7](b058cc7))
* SortableGrid auto scroll examples ([#106](#106)) ([26707a5](26707a5))
* Start working on customizable sort strategy ([#166](#166)) ([726a87c](726a87c))
* Support item count change in state in reaction to order change ([#116](#116)) ([3aeffd7](3aeffd7))
* Use layout animations for sortable items position updates ([#172](#172)) ([fce8e15](fce8e15))
MatiPl01 pushed a commit that referenced this pull request Jan 29, 2025
# 1.0.0 (2025-01-29)

### Bug Fixes

* Absolute flex layout (also reverse) calculation issues, restore paddings support ([#185](#185)) ([8b120b3](8b120b3))
* Animation of items added to the sortable component ([#200](#200)) ([aa8e21c](aa8e21c)), closes [#196](#196)
* Auto scroll infinite updates issue ([#111](#111)) ([91b90c2](91b90c2))
* Auto scroll not working when item is not dragged ([#56](#56)) ([6375847](6375847))
* Circular dependencies ([#178](#178)) ([767ddb0](767ddb0))
* Column flex layout, add layout example screen ([#180](#180)) ([dd321c6](dd321c6))
* Don't trigger press animation when sorting is disabled ([#168](#168)) ([b6737d0](b6737d0))
* Drop indicator dimensions and position ([#97](#97)) ([d86b4e1](d86b4e1)), closes [#82](#82)
* Example app screen flickering caused by safe area ([#25](#25)) ([371aef5](371aef5))
* **eslint:** Fix eslint config by downgrading to v8 ([#3](#3)) ([ad1f2ac](ad1f2ac))
* Fix flex ordering for flex with alignment, prepare for release ([#206](#206)) ([e83e53a](e83e53a))
* Incorrect auto scroll bounds when container measurements were outdated ([#173](#173)) ([2e4edca](2e4edca))
* Initial render flickering and content overflow ([#89](#89)) ([b6f0e1f](b6f0e1f))
* Item overlapping issue ([#76](#76)) ([9483b79](9483b79))
* Item removal and grid layout calculation ([#161](#161)) ([a1cbcd9](a1cbcd9))
* Package path in the release workflow ([#207](#207)) ([6cf7e0c](6cf7e0c))
* Pan gesture being beginning but not being activated on iOS ([#114](#114)) ([a932cc8](a932cc8))
* Reanimated iOS and Android crashes by bumping version ([#99](#99)) ([5b4b2bd](5b4b2bd))
* Release workflow working directory ([#208](#208)) ([09660d3](09660d3))
* Require cycle ([#75](#75)) ([388bfc3](388bfc3))
* Reverse flex ordering and flex debug box ([#203](#203)) ([e2012ac](e2012ac))
* Semantic release setup ([#67](#67)) ([3eb70df](3eb70df))
* Set npm registry in publishConfig ([#210](#210)) ([5f77a6a](5f77a6a))
* Smaller and bigger issues ([#176](#176)) ([85c01f4](85c01f4))
* SortableFlex items overflowing parent container ([#123](#123)) ([d37092b](d37092b))
* Transition from relative to absolute flex layout ([#150](#150)) ([3740542](3740542))
* Unmounted view measurements on the UI thread showing warnings ([#110](#110)) ([d21dabc](d21dabc))

### Features

* Absolute flex layout items positioning ([#8](#8)) ([c8affc6](c8affc6))
* Active item decoration ([#13](#13)) ([6b1f325](6b1f325))
* Active item drop indicator ([#48](#48)) ([6da6295](6da6295))
* Active item snapping to finger ([#79](#79)) ([2fa839d](2fa839d))
* Add callback functions called on drag state or order changes ([#70](#70)) ([4605697](4605697))
* Add drag context provider ([#10](#10)) ([134e727](134e727))
* Add drop indicator examples in the example app ([#96](#96)) ([a260acc](a260acc))
* Add grid items spacing via `rowGap` and `columnGap` ([#82](#82)) ([120e66b](120e66b))
* Add item context, add working touchable ([#121](#121)) ([cf35be0](cf35be0))
* Add optional haptic feedback via react-native-haptic-feedback ([#69](#69)) ([072283d](072283d))
* Allow animated props to be passed to components ([#42](#42)) ([a8b6e7e](a8b6e7e))
* Animated container height ([#162](#162)) ([42eff3c](42eff3c))
* Animated container height changes and column dimensions change ([#83](#83)) ([88190c4](88190c4))
* Auto scroll provider ([#45](#45)) ([c6ff65d](c6ff65d))
* Basic SortableView and MeasurementsProvider implementation ([#2](#2)) ([af06231](af06231))
* Clean up draggable view implementation, add decoration component ([#60](#60)) ([edc04f8](edc04f8))
* Data change examples  ([#115](#115)) ([b55622d](b55622d))
* Debug helper components for layout debugging ([#127](#127)) ([f829fa4](f829fa4))
* Debug provider ([#132](#132)) ([9f91a6a](9f91a6a))
* FlatList auto scroll example ([#46](#46)) ([20e6b4b](20e6b4b))
* Flex items reordering ([#15](#15)) ([7421d03](7421d03))
* Flex layout provider ([#6](#6)) ([16be3f8](16be3f8))
* Flex order updater reimplementation ([#165](#165)) ([02ee7e0](02ee7e0))
* Grid items reordering ([#14](#14)) ([f8b8ea8](f8b8ea8))
* Grid layout provider ([#5](#5)) ([8890c7c](8890c7c))
* Implement debug examples ([#135](#135)) ([c8354fb](c8354fb))
* Item layout animations ([#151](#151)) ([347abfe](347abfe))
* Migrate example to the new architecture, add flash-list example ([#55](#55)) ([92238e3](92238e3))
* Navigation state persistence and example styles enhancements ([#107](#107)) ([c2984b0](c2984b0))
* Refine grid swap ordering strategy ([#167](#167)) ([7552470](7552470))
* Sortable flex auto scroll examples ([#100](#100)) ([118b359](118b359))
* Sortable grid base component that displays items in a grid ([#4](#4)) ([b058cc7](b058cc7))
* SortableGrid auto scroll examples ([#106](#106)) ([26707a5](26707a5))
* Start working on customizable sort strategy ([#166](#166)) ([726a87c](726a87c))
* Support item count change in state in reaction to order change ([#116](#116)) ([3aeffd7](3aeffd7))
* Use layout animations for sortable items position updates ([#172](#172)) ([fce8e15](fce8e15))
MatiPl01 pushed a commit that referenced this pull request Jan 29, 2025
# 1.0.0 (2025-01-29)

### Bug Fixes

* Absolute flex layout (also reverse) calculation issues, restore paddings support ([#185](#185)) ([8b120b3](8b120b3))
* Animation of items added to the sortable component ([#200](#200)) ([aa8e21c](aa8e21c)), closes [#196](#196)
* Auto scroll infinite updates issue ([#111](#111)) ([91b90c2](91b90c2))
* Auto scroll not working when item is not dragged ([#56](#56)) ([6375847](6375847))
* Circular dependencies ([#178](#178)) ([767ddb0](767ddb0))
* Column flex layout, add layout example screen ([#180](#180)) ([dd321c6](dd321c6))
* Don't trigger press animation when sorting is disabled ([#168](#168)) ([b6737d0](b6737d0))
* Drop indicator dimensions and position ([#97](#97)) ([d86b4e1](d86b4e1)), closes [#82](#82)
* Example app screen flickering caused by safe area ([#25](#25)) ([371aef5](371aef5))
* **eslint:** Fix eslint config by downgrading to v8 ([#3](#3)) ([ad1f2ac](ad1f2ac))
* Fix flex ordering for flex with alignment, prepare for release ([#206](#206)) ([e83e53a](e83e53a))
* Incorrect auto scroll bounds when container measurements were outdated ([#173](#173)) ([2e4edca](2e4edca))
* Initial render flickering and content overflow ([#89](#89)) ([b6f0e1f](b6f0e1f))
* Item overlapping issue ([#76](#76)) ([9483b79](9483b79))
* Item removal and grid layout calculation ([#161](#161)) ([a1cbcd9](a1cbcd9))
* Package path in the release workflow ([#207](#207)) ([6cf7e0c](6cf7e0c))
* Pan gesture being beginning but not being activated on iOS ([#114](#114)) ([a932cc8](a932cc8))
* Reanimated iOS and Android crashes by bumping version ([#99](#99)) ([5b4b2bd](5b4b2bd))
* Release workflow working directory ([#208](#208)) ([09660d3](09660d3))
* Require cycle ([#75](#75)) ([388bfc3](388bfc3))
* Reverse flex ordering and flex debug box ([#203](#203)) ([e2012ac](e2012ac))
* Semantic release setup ([#67](#67)) ([3eb70df](3eb70df))
* Set npm registry in publishConfig ([#210](#210)) ([5f77a6a](5f77a6a))
* Smaller and bigger issues ([#176](#176)) ([85c01f4](85c01f4))
* SortableFlex items overflowing parent container ([#123](#123)) ([d37092b](d37092b))
* Transition from relative to absolute flex layout ([#150](#150)) ([3740542](3740542))
* Unmounted view measurements on the UI thread showing warnings ([#110](#110)) ([d21dabc](d21dabc))

### Features

* Absolute flex layout items positioning ([#8](#8)) ([c8affc6](c8affc6))
* Active item decoration ([#13](#13)) ([6b1f325](6b1f325))
* Active item drop indicator ([#48](#48)) ([6da6295](6da6295))
* Active item snapping to finger ([#79](#79)) ([2fa839d](2fa839d))
* Add callback functions called on drag state or order changes ([#70](#70)) ([4605697](4605697))
* Add drag context provider ([#10](#10)) ([134e727](134e727))
* Add drop indicator examples in the example app ([#96](#96)) ([a260acc](a260acc))
* Add grid items spacing via `rowGap` and `columnGap` ([#82](#82)) ([120e66b](120e66b))
* Add item context, add working touchable ([#121](#121)) ([cf35be0](cf35be0))
* Add optional haptic feedback via react-native-haptic-feedback ([#69](#69)) ([072283d](072283d))
* Allow animated props to be passed to components ([#42](#42)) ([a8b6e7e](a8b6e7e))
* Animated container height ([#162](#162)) ([42eff3c](42eff3c))
* Animated container height changes and column dimensions change ([#83](#83)) ([88190c4](88190c4))
* Auto scroll provider ([#45](#45)) ([c6ff65d](c6ff65d))
* Basic SortableView and MeasurementsProvider implementation ([#2](#2)) ([af06231](af06231))
* Clean up draggable view implementation, add decoration component ([#60](#60)) ([edc04f8](edc04f8))
* Data change examples  ([#115](#115)) ([b55622d](b55622d))
* Debug helper components for layout debugging ([#127](#127)) ([f829fa4](f829fa4))
* Debug provider ([#132](#132)) ([9f91a6a](9f91a6a))
* FlatList auto scroll example ([#46](#46)) ([20e6b4b](20e6b4b))
* Flex items reordering ([#15](#15)) ([7421d03](7421d03))
* Flex layout provider ([#6](#6)) ([16be3f8](16be3f8))
* Flex order updater reimplementation ([#165](#165)) ([02ee7e0](02ee7e0))
* Grid items reordering ([#14](#14)) ([f8b8ea8](f8b8ea8))
* Grid layout provider ([#5](#5)) ([8890c7c](8890c7c))
* Implement debug examples ([#135](#135)) ([c8354fb](c8354fb))
* Item layout animations ([#151](#151)) ([347abfe](347abfe))
* Migrate example to the new architecture, add flash-list example ([#55](#55)) ([92238e3](92238e3))
* Navigation state persistence and example styles enhancements ([#107](#107)) ([c2984b0](c2984b0))
* Refine grid swap ordering strategy ([#167](#167)) ([7552470](7552470))
* Sortable flex auto scroll examples ([#100](#100)) ([118b359](118b359))
* Sortable grid base component that displays items in a grid ([#4](#4)) ([b058cc7](b058cc7))
* SortableGrid auto scroll examples ([#106](#106)) ([26707a5](26707a5))
* Start working on customizable sort strategy ([#166](#166)) ([726a87c](726a87c))
* Support item count change in state in reaction to order change ([#116](#116)) ([3aeffd7](3aeffd7))
* Use layout animations for sortable items position updates ([#172](#172)) ([fce8e15](fce8e15))
@MatiPl01
Copy link
Owner Author

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request fix released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SortableFlex should swap items when dragging outside of the container Improve swapping performance in the flex layout

2 participants