-
Notifications
You must be signed in to change notification settings - Fork 734
fix hint animation #1363
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
fix hint animation #1363
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mendyEdri
Android throws an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mendyEdri
Android doesn't throw an error now, but also doesn't work.
See video
Also, check my comment, I don't think that's the right fix (:
Screen.Recording.2021-06-21.at.8.09.46.mov
src/components/hint/index.tsx
Outdated
if (!visible) { | ||
const {onBackgroundPress, testID} = this.props; | ||
if (!this.props.visible && this.state.animationEnded) { | ||
console.log('removed'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot a console.log (:
src/components/hint/index.tsx
Outdated
this.setState({animationEnded: true}, () => { | ||
setTimeout(() => { | ||
this.setState({animationEnded: false}); | ||
}, this.animationDuration); | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This forces us to trigger two setState calls every time we trigger the animation. twice on enter twice on exit.
Maybe we can reduce that..
If you think about it, while the Hint is visible it doesn't matter really what's the value of animationEnded
state.
What if instead of keeping animationEnded
you'll keep something else, like actuallyVisible
, hasUnmounted
(or anything with a better name (: )
Then you'll update it once on enter and once on exit...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, fixed
* master: Upgrade eslint-plugin-uilib to version 2.0.09 Typescript/wizard move to typescript (#1390) Feat/hint add props (#1399) Separate radioGroup and radioButton to fix their packages (#1388) Typescript/connection status bar (#1384) Fix typescript migration bug, code should enter here to calcylate tip position also when width is undefined (casting to 0) (#1396) Fix an exception with hard coded color rule (#1394) Add onChange to dependency array (#1391) fix colorPicker ts error Update stale.yml Typescript/general missing typings (#1389) fix hint animation (#1363) using renderInput instead renderExpandableInput was left out (#1386) DateTimePicker - Implement theme variant prop (#1357) Infra/Migrate Incubator.WheelPicker to reanimated 2 (#1379) Remove old typings that were migrated to generatedTypes Fix Hint export in generatedType/index Update react-native-gesture-handler to version 1.10.3 Fix export of AvatarHelper in src/index.ts (#1376) ExampleScreenPresenter - fix typo (#1374)
Description
Fix missing Hint bubble fade-out animation
Changelog
Added missing hide animation for
Hint
bubble