Skip to content

Conversation

@MatiPl01
Copy link
Owner

@MatiPl01 MatiPl01 commented Sep 1, 2025

Description

I added this example to docs as I cannot add a correct support for shadows on Android. Android doesn't support any of the shadow properties (except the new boxShadow) and provides its own elevation prop instead, which doesn't work in our case as the elevation is printed on the non-transparent background of the parent view. In our case, all grid items are absolutely positioned with transparent background, so the elevation is not visible.

I tried implementing the shadow effect with the new boxShadow RN style prop but it didn't work right for grid items which have rounded corners. The problem is that applying the box shadow to the rectangular view that I use internally in the library creates a gap between the item and the shadow and doesn't respect the rounded corners. The boxShadow must be applied on the view that has rounded corners, so I decided to add an example to docs showing how to do this as I cannot implement such behavior on my end.

Example images of the boxShadow issue

The following images show how the boxShadow would look like if I implemented it in my library when grid items are rendered with rounded corners.

iOS Android
Screenshot 2025-09-01 at 02 29 07 Screenshot 2025-09-01 at 02 29 26

Added labels near the activeItemShadowOpacity prop

Screenshot 2025-09-01 at 02 31 59

@MatiPl01 MatiPl01 self-assigned this Sep 1, 2025
@MatiPl01 MatiPl01 added documentation Improvements or additions to documentation example cleanup labels Sep 1, 2025
@vercel
Copy link

vercel bot commented Sep 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
react-native-sortables-docs Ready Ready Preview Comment Sep 1, 2025 0:30am

@MatiPl01 MatiPl01 merged commit 1169928 into main Sep 1, 2025
7 checks passed
@MatiPl01 MatiPl01 deleted the feat/custom-shadow-example branch September 1, 2025 00:38
MatiPl01 pushed a commit that referenced this pull request Sep 13, 2025
# [1.9.0](v1.8.0...v1.9.0) (2025-09-13)

### Bug Fixes

* A bunch of issues, like shaky scroll, invalid grid layout, added items flickering ([#463](#463)) ([3b160b6](3b160b6))
* Active item touch start position on Android ([#462](#462)) ([7704729](7704729))
* Autoscroll exceeding bounds ([#473](#473)) ([eddd21b](eddd21b))
* Collapsible items implementation on the web ([#485](#485)) ([4d261db](4d261db))
* Collapsible items shift when size changes ([#451](#451)) ([e816b6a](e816b6a))
* Incorrect drag start position, no item size animation when teleported ([#456](#456)) ([1730fb8](1730fb8))
* Invalid builder bob config ([#475](#475)) ([11cf84a](11cf84a))
* Invalid grid layout on mount ([#461](#461)) ([a47ed72](a47ed72))
* onActiveItemDropped not being fired when item is touched quickly ([#449](#449)) ([f66d980](f66d980))
* Pre-release fixes and improvements ([#476](#476)) ([736fb7b](736fb7b))
* Prevent auto scroll from over scrolling content container ([#484](#484)) ([db586d7](db586d7)), closes [#473](#473)

### Features

* Add custom shadow example to docs, clean up decoration style ([#466](#466)) ([1169928](1169928))
* Add example app build check CIs ([#480](#480)) ([5ad420c](5ad420c))
* Add style property to the handle component ([#477](#477)) ([28c9099](28c9099))
* Better collapsible auto-scroll behavior ([#457](#457)) ([2d24b14](2d24b14)), closes [#444](#444)
* Collapsible items support ([#444](#444)) ([66c03b6](66c03b6))
* Data provider ([#472](#472)) ([5dc34b6](5dc34b6))
* Improved teleported items behavior ([#452](#452)) ([72dadef](72dadef))
* Make layout update in sync with positions change on grid columns change ([#441](#441)) ([ef37d8c](ef37d8c))
* New auto scroll implementation ([#454](#454)) ([c4facec](c4facec)), closes [#285](#285) [#453](#453) [#285](#285)

### Performance Improvements

* Optimize rerenders caused by inlined callbacks, clean up drag state management ([#474](#474)) ([f5e3c89](f5e3c89))
* Reduce the number of layout calculations ([#442](#442)) ([f9c9875](f9c9875))
@MatiPl01
Copy link
Owner Author

🎉 This issue has been resolved in version 1.9.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

cleanup documentation Improvements or additions to documentation example released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants