Skip to content
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

Navigation animation issue #74

Closed
PeterKottas opened this issue Feb 23, 2018 · 11 comments
Closed

Navigation animation issue #74

PeterKottas opened this issue Feb 23, 2018 · 11 comments

Comments

@PeterKottas
Copy link
Contributor

What kind of Issue is this?

  • (x) Bug Report
  • () Question / Problem
  • () Discussion / Feature Request

How are you using the Bottom Navigation?

  • () I use the Bottom Navigation together with react-navigation; the Issue is not appearing when I'm using react-navigation's TabBar instead.
  • (x) I use the standalone version.

Example description

I am using a standard setup (pretty much copy paste from docs) with 4 tabs.

Expected behavior

We start with first tab active. Label visible. Then we click second tab. Animation happens properly. We click first tab again and the animation should again play smoothly.

Actual behavior

Animation for the icon just jumps up instantly. There's basically no animation present. Basically second time you click a tab, the animation is ruined. It only works the first time.

Additional description and resources

{Write down everything else you want to say.}

What did you do to find a solution?

Checked you code and did a little research but I figured I'll be better off talking to you as you wrote it :)

Environment

  • React Native versions: 0.53.3
  • react-native-material-bottom-navigation version: v0.8.2
  • react-navigation version: {Insert here.}
  • I tested this with: {Please choose one or more: Android on windows
@PeterKottas
Copy link
Contributor Author

@PeterKottas
Copy link
Contributor Author

You apparently had you reasons to do this but it might have backfired slightly with the animation. Can you give me some more info so that I don't have to waste time figuring this thing out?

@timomeh
Copy link
Owner

timomeh commented Feb 23, 2018

I noticed that sometimes, too. I opened #4 for this and thought it may be because of the hack you mentioned, but the animation worked for me most of the time. Not all the time after the first press. The animation was buggy just a few times in my case, seemingly randomly, not everytime you press a tab.

If the animation is completely broken for you after the second time you press, then that's something new.

I left a comment about the Hack here:

// HACK: In shifting mode, after the first animation from active to
// inactive, the icon jumps down before animating to the active state
// again. In order to fix this, we need to store, if it already was
// active. Then we can catch that case and manually move it up before
// animating. This only happens in Android, not iOS.
// Is this a bug in react-native or somewhere here?

Without this hack, the animation was completely wrong in Android. I don't know if that's still the case. react-native changed quite a lot since then – maybe the reason for my hack was a bug which is resolved by now.

I will test if it works without the hack right now.

@PeterKottas
Copy link
Contributor Author

Cool have a look pls. I think you might be right. Maybe it will work now no probs. I've read the comment there. It sort of makes sense but now it's definitely broken after the first click every time. Hoping it will be as easy as just removing it. Keep me posted if you need any help with that ;)

@timomeh
Copy link
Owner

timomeh commented Feb 23, 2018

Yup. Works fine without the hack. Classic legacy.

Thank you for pointing this out!

@PeterKottas
Copy link
Contributor Author

Awesome! Let me know when you release this and that other stuff I PRed pls, for now I am pointing straight to my repo for npm package

@timomeh
Copy link
Owner

timomeh commented Feb 23, 2018

I'll keep you informed. First I need to try it out myself to make sure everything works (would be bad if I don't do this as an Owner) and then I want to write a few tests, lint everything and add a CI-Pipeline. Together with the latest bugfixes/PRs, I finally want to release it as v1.0.0

@timomeh
Copy link
Owner

timomeh commented Feb 23, 2018

Ah, sorry, I thought this was a response to #73 :D

Nonetheless, I'll post if it's released here.

@PeterKottas
Copy link
Contributor Author

PeterKottas commented Feb 23, 2018

Haha, np I totally understand. I am ok to point to git directly for now, just want to clean it up to stay up to date with your future releases. Thanks and thanks for the cool lib! take care

@timomeh
Copy link
Owner

timomeh commented Feb 27, 2018

Fix was shipped in v0.9.0 🚀

@PeterKottas
Copy link
Contributor Author

Awesome, thanks for letting me know man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants