cooperka / react-native-snackbar

:candy: Material Design "Snackbar" component for Android and iOS.
Other
823 stars 152 forks source link

Added feature to position snackbar on the screen (Android) #91

Closed imMayankRaj closed 5 years ago

imMayankRaj commented 6 years ago

Plus working on #70

cooperka commented 6 years ago

Hi @imMayankRaj, thanks for this. Does the animation look good when it's at the top? In other words, does the snackbar slide down instead of up when you position it at the top? If so I'd be happy merging on 2 conditions:

  1. Please update README to document new props
  2. File a ticket to add this prop to iOS as well. You don't have to do it yourself, this is more of a note to myself.
imMayankRaj commented 5 years ago

Hey @cooperka, changing the gravity of the Snackbar has no effect on the animation. It's still the same.

cooperka commented 5 years ago

Hmm, doesn't that look quite strange? I think we'll need to find a different solution in that case. Thoughts?

imMayankRaj commented 5 years ago

Sorry, my bad, it's working as expected i.e it's sliding down when at the bottom and sliding up when at the top. And also the view gets dismissed as a whole i.e without any sliding animation, when at the center.

cooperka commented 5 years ago

I tried to push updated code to your branch and GitHub seems to have reacted by closing this PR automatically. I'm unable to re-open. Can you please do this on your machine:

cd react-native-snackbar/
git push origin 9428680:master -f

That will restore your latest commit back to your branch. Apologies for the inconvenience; hopefully that allows me to re-open the PR.

cooperka commented 5 years ago

I also tested it on my emulator and the animation isn't behaving as expected. Can you post a screen recording and some info about your device version? I'm expecting the Snackbar to slide in and out from the top as you described.

Here's what I see, no change in animation when positioned at the top:

animation of snackbar with gravity

imMayankRaj commented 5 years ago

ezgif com-video-to-gif

It's working fine on my device. I am using a physical device. MOTO g5 plus Android 8.1

imMayankRaj commented 5 years ago

I tried to push updated code to your branch and GitHub seems to have reacted by closing this PR automatically. I'm unable to re-open. Can you please do this on your machine:

cd react-native-snackbar/
git push origin 9428680:master -f

That will restore your latest commit back to your branch. Apologies for the inconvenience; hopefully that allows me to re-open the PR.

Done. Try again

cooperka commented 5 years ago

Try again

No luck :crying_cat_face: I've never encountered this before. No worries, I can merge manually later on.

It's working fine on my device

The animations don't seem to be coming through from your screen recorder. I just see it flash onto the screen with no animation.

imMayankRaj commented 5 years ago

No, it's working as taken by recorder. That was the reason I was confused. The animation doesn't come up, on my device, as you are expecting.

cooperka commented 5 years ago

Strange! I wonder if your animations are disabled somehow. Unfortunately I won't be able to merge this PR until the animation happens properly... I'm not sure if Snackbar would support that easily or not.