Coder Social home page Coder Social logo

Comments (2)

kirillzyusko avatar kirillzyusko commented on June 9, 2024 1

Thank you @VladyslavMartynov10 and sorry for late response 😅

I think the integration is problematic because bottom-sheet is using own pre-defined keyboard movement interpolations, right? What happens if you disable keyboard handling from BottomSheet? Would it be possible then just to translate a bottom sheet by translateY using useReanimatedKeyboardAnimation, for example?

I think replication of BottomSheet is a pretty complex stuff and definetly I wouldn't like to have such components inside this library 😅 3rd party package sounds more reasonable for me 👍

But in ideal case both libraries should work together well, so first of all I'd like to understand which problems did you have trying to integrate bottom sheet and this library? Would you mind to describe it as precisely as possible?

from react-native-keyboard-controller.

VladyslavMartynov10 avatar VladyslavMartynov10 commented on June 9, 2024

Hey @kirillzyusko ! No worries, I'm almost available at any time.

I agree that replicating a bottom-sheet is a challenging task, especially if we aim for a native implementation.

My interest in exploring potential integration originates from my personal experiments. It's important to note that currently, all third-party libraries are using React Native implementation, and we lack a native implementation alternative. Additionally, I've been particularly impressed with the NativeSheet implementation for iOS. This implementation excels, offering excellent functionality with minimal boilerplate required, especially when using the SwiftUI framework.

In my situation, I attempted to integrate a KeyboardToolBar component (which I presented to you for KeyboardToolbar feature) with gorhom/bottomsheet to achieve smooth transitions between focused inputs. From this starting point, I'm considering three options:

  • Disable the react-native-keyboard-controller module and use a pre-built component from gorhom/bottomsheet. This was my initial solution, but it presents some issues due to unsynchronized keyboard height.

  • Implement my own solution using react-native-reanimated, which is straightforward but doesn't address all potential scenarios. While it's a great option for experimentation, it requires a significant amount of code.

  • Utilize the react-native-keyboard-controller module to monitor the focus/unfocus state of inputs and adjust the translateY of BottomSheet accordingly.

Overall, I believe we should develop a practical example for others who might encounter this issue in the future. Also, thank you for the suggested idea. I need to review it further, as it seems to me that a custom interpolation approach should work.

Perhaps in the near future, we might be able to develop something similar to a native solution, although I'm aware that this would require considerable effort and thorough investigation.

from react-native-keyboard-controller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.