-
Notifications
You must be signed in to change notification settings - Fork 175
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
Feat/header touchables and horizontal scroll #254
base: main
Are you sure you want to change the base?
Feat/header touchables and horizontal scroll #254
Conversation
…le elements on header
Hey @andreialecu @PedroBern, any update on this? If the approach doesn't feel the best taking into consideration the project design or if there's anything else that can be done to improve it, let me know |
This doesn't currently handle gliding when the finger is released, correct? I did think about this implementation in the past, but it felt a bit hacky because of missing gliding and momentum support. I wonder if we can instead provide some extension points that allows users to handle this in their own app instead of in the library. |
@andreialecu Is the discord still up? Maybe we can go trough it there |
any chance this PR would be resolved soon? Would love to have this working as well |
Please can this be merged soon? I'm looking forward to it. |
Please merge this. |
Hello @andreialecu. Issue with touchable will be fixed soon or currently this PR changes is the best what I can do to make it work in my project? |
@andreialecu it almost a year and would love if this PR could be merge |
As the Author mentioned, the feature is currently incomplete and has some issues that need to be addressed before it can be merged. Additionally, I have concerns about adding this feature directly to the library due to the potential complexity it could introduce. However, I am open to exploring alternative solutions, such as implementing an extension point that would allow users to easily add this functionality themselves. If any of you are still interested in pursuing this feature, I would appreciate it if you could help address the issues with the current pull request and explore the possibility of an extension point. |
@andreialecu Hey, I actually made a fork of the project and adapt it to allow scroll on header content on the project I'm working, I did remove things that I didn't need, like for instance snap points, but maybe if it makes sense I can try to take some time to review what I did to see if it can be improved and implemented without directly affecting the existent code base (like an extension as you mentioned). |
Although this is not fully implemented, this feature is quite important and highly requested. I think should accept a working approach first, warn the users of known limitation and then refine it afterwards. |
Also needed this feature and this PR was helpful in unblocking the use of this library. I tried To help others that may stumble on this PR, here's a patch I created using I understand that PanGestureHandler isn't perfect, but it would be helpful to make it easier to add header scroll. Exposing the scroll sync function and the scrollY might be sufficient to get started so this code can live in user land. |
@andreialecu hi. It seems to have been a long time since this PR. The problem still persists. Is there any work on this? |
@ahmetkuslular you can try out this work around https://www.npmjs.com/package/react-native-tab-view-header |
Although this package is successful in header, it does not meet my requests in general. Is it possible to import the properly working header component here into this project? |
@ahmetkuslular did you try the patch above? It should help unblock you |
It's not patch, but I pulled these codes to my locale and tried them together with the current codes. It works seamlessly. I don't know if there are cases that need attention here. |
For anyone who wanted to code snippet without needing patch version for 6.21 @nggonzalez one thing about this is that although we're able to scroll, the scroll with snap stopped working, because it seems like we dont have enough velocity?
|
@andreialecu is this something on the roadmap? 👀 |
The patch didn't work for me unfortunately. |
Hi, does anyone know a current workaround/patch for this? I can manage to get scroll on header working with all elements in the header, except the touchables. Good thing that they're small in my case, but it would be great that header could be scrolled from the header buttons as well. |
The idea of the PR is to allow the header to contain Touchable elements and horizontal views that don't affect the vertical scroll behaviour of the tab view, this means we don't have to manually add pointerEvents to all views that are not target of the touch events, it also means we can have both the behaviours, having the element being target of a touch event as press and still be able to scroll vertically on the same element.
Improvements that need to be made:
Also, as mentioned on the feature request, I'm not sure if I missed any of the project internals that could introduce new bugs.
ScrollOnHeader.mp4