Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3500166
D12977.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D12977.diff
View Options
diff --git a/native/tooltip/nux-tips-overlay.react.js b/native/tooltip/nux-tips-overlay.react.js
--- a/native/tooltip/nux-tips-overlay.react.js
+++ b/native/tooltip/nux-tips-overlay.react.js
@@ -6,10 +6,7 @@
import Animated from 'react-native-reanimated';
import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
-import {
- OverlayContext,
- type OverlayContextType,
-} from '../navigation/overlay-context.js';
+import { OverlayContext } from '../navigation/overlay-context.js';
import type { NavigationRoute } from '../navigation/route-names.js';
import { type DimensionsInfo } from '../redux/dimensions-updater.react.js';
import { useSelector } from '../redux/redux-utils.js';
@@ -83,7 +80,7 @@
...Base,
// Redux state
+dimensions: DimensionsInfo,
- +overlayContext: ?OverlayContextType,
+ +position: Animated.Node,
+styles: $ReadOnly<typeof unboundStyles>,
+closeTip: () => mixed,
+contentContainerStyle: ViewStyle,
@@ -110,9 +107,7 @@
constructor(props: NUXTipsOverlayProps<BaseNUXTipsOverlayProps>) {
super(props);
- const { overlayContext } = props;
- invariant(overlayContext, 'NUXTipsOverlay should have OverlayContext');
- const { position } = overlayContext;
+ const { position } = props;
this.backdropOpacity = interpolateNode(position, {
inputRange: [0, 1],
@@ -209,7 +204,7 @@
render(): React.Node {
const {
dimensions,
- overlayContext,
+ position,
styles,
closeTip,
contentContainerStyle,
@@ -236,9 +231,6 @@
const triangleUp = <View style={[styles.triangleUp, triangleStyle]} />;
- invariant(overlayContext, 'NUXTipsOverlay should have OverlayContext');
- const { position } = overlayContext;
-
const buttonProps: ButtonProps<BaseNUXTipsOverlayProps> = {
...navAndRouteForFlow,
progress: position,
@@ -294,6 +286,8 @@
function ConnectedNUXTipsOverlay(props: BaseNUXTipsOverlayProps) {
const dimensions = useSelector(state => state.dimensions);
const overlayContext = React.useContext(OverlayContext);
+ invariant(overlayContext, 'NUXTipsOverlay should have OverlayContext');
+ const { position } = overlayContext;
const { goBackOnce } = props.navigation;
@@ -316,7 +310,7 @@
<NUXTipsOverlay
{...props}
dimensions={dimensions}
- overlayContext={overlayContext}
+ position={position}
styles={styles}
closeTip={goBackOnce}
contentContainerStyle={contentContainerStyle}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 1:03 AM (13 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2684323
Default Alt Text
D12977.diff (2 KB)
Attached To
Mode
D12977: [native] Move position
Attached
Detach File
Event Timeline
Log In to Comment