-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Animate image height on open #8
Comments
Hi, |
I do have a solution to this and have already implemented features like aligning to top/bottom etc, but for reasons I cannot release it just yet. Try to be patient :-) |
Thanks a lot, I'm looking forward to this ! |
Allright, found some time today to work on my more or less rewrite of this module. I've leaked some stuff to @JonathanWi earlier, but now I've kinked out some issues and also added an example of it in motion. Some changes
Todo
Check out the navigator-refactor branch and this demo (FPS in gif is not great, actual performance on device is very good IMHO): |
Interesting! @oblador would you use |
@adbl: yes exactly. Lightbox.Navigator is just a composition of Navigator and you should be able to do everything else just as before. If you can't then that should be regarded as a bug! I have some known bugs (or rather waiting to be implemented) which are the jump and replace functions. |
I would be a bit anxious replaced the main Navigator in an app. but looking at the code, it seems as it will play along with another parent navigator, if the lightbox needs are limited to certain "primary" routes which could have their own Lightbox.Navigator? |
@adbl: Basically it enables you to define completely custom transitions via a React component (I'm using this for more stuff than just Lightbox animations). It will only touch routes having the |
I see, but would the idea I described work? (given as the regular Navigator seems to support such use with a parent |
Aha, yes it would work to nest navigators a bit depending on how your navigation bar is configured. |
I realize the child |
It's been about a year with no updates on this / 6 months since any branch activity for the refactor. I'm curious if this is still in progress, or in the meantime if we can start merging some of the longstanding PRs that have been waiting? I'd be happy to try to help out if there are specific things blocking the release! I'm really excited to have these new features. |
@cooperka: Yeah I know, there's been very little public progress. I'm myself using a private fork that I don't want to release publicly as it only solves my needs and I don't want to maintain it long term. Overall the basic problem is the bad state of navigation in react native. There's no use in me putting so much effort into this if I have to scrap it and rewrite it every few months. I'm awaiting the upcoming release of the new official navigator, but AFAIK it's already behind schedule. If it looks good and is accepted by the community I'll try to make yet another refactor for that solution. |
Out of curiosity, how hard would this be to do without relying on a navigator? I'm using this repo in its current state with |
Depends on what parts you want I guess, if you cut the scope to only be an image viewer then it's doable without navigation. Although navigation integration is desirable IMHO as it gives other benefits such as (potential) deep linking, automatic back button handling etc. |
@oblador I'm getting some error on refactor. It throws |
Add `React` to lightbox overlay
Hey, it's me again!
I'm tweaking this component quite a bit to fit one of my need, but I can't find a way to animate the image height on open/close:
Using onOpen & onClose cause a "glitch" (which is - in fact - the expected behavior) : resizing height with this.state.height onOpen and onClose does not animate the element but instead cause an abrubt resizing (which, in the case of onClose happen after the element closed, and not while closing).
Is there a clean way to achieve this? If you need more info, I can put up a gist you can look at!
(Also, there is a couple a feature that could be easily added and would be pretty cool, like a position property to define if the element should be centered or at the top/bottom of the overlay. Should I open other issues to display them?)
Cheers!
The text was updated successfully, but these errors were encountered: