-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE ios] Add Collapse implementation #135
Conversation
Deploy preview for artsy-palette ready! Built with commit b01b004 |
This might be one of those cases where we can explore the idea of how we can share an interface across components. This is a really minimal case where Thoughts? |
This would be a good simple case to test out sharing an interface. My concern though is that we don't currently have a way to test it from the perspective of Emission, as we're still consuming only web types as noted here. I might open an issue for this along with a note about figuring out shared and disjoint component props interfaces. |
257c2ea
to
ca48a39
Compare
ca48a39
to
b01b004
Compare
Right, even before we get type safety on the emission side with respect to not exposing web types on RN components. |
🎉 This PR is included in version 2.23.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
As part of ongoing Local Discovery work, we needed an animated
Collapse
implementation and wanted to extend the existing implementation in Palette. We ran into a couple issues while building this out:react-spring
has apeerDependency
onreact
at>=16.4.0
. It looks like it depends onReact.forwardRef
, a feature added in React 16.3. Emission is on16.3.0-alpha.1
and appears to not have this feature, causingreact-spring
to throw an error. I'm opting to pinreact-spring
viaresolutions
in emission at 5.5 (the latest working version) rather than downgrade the version used in palette as we are in the process of upgrading React Native and could upgrade seamlessly in the future and there are some fixes to theheight: auto
animation used in the web implementation that we'd lose if we downgraded.react-spring
'sheight: auto
animation target support doesn't work on RN, so we have to manually measure the view to derive a static height prior to animating. I cribbed much of this logic fromreact-collapsible
. It looks like we could upstream this toreact-spring
based on the same logic used for web support: https://github.com/drcmda/react-spring/blob/master/src/targets/web/fix-auto.js