Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3490122
D6447.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D6447.diff
View Options
diff --git a/native/chat/multimedia-message.react.js b/native/chat/multimedia-message.react.js
--- a/native/chat/multimedia-message.react.js
+++ b/native/chat/multimedia-message.react.js
@@ -170,7 +170,7 @@
item,
initialCoordinates: coordinates,
verticalBounds,
- location: 'fixed',
+ tooltipLocation: 'fixed',
margin,
visibleEntryIDs,
chatInputBarHeight: currentInputBarHeight,
diff --git a/native/chat/robotext-message.react.js b/native/chat/robotext-message.react.js
--- a/native/chat/robotext-message.react.js
+++ b/native/chat/robotext-message.react.js
@@ -144,7 +144,7 @@
initialCoordinates: coordinates,
verticalBounds,
visibleEntryIDs,
- location: 'fixed',
+ tooltipLocation: 'fixed',
margin,
item,
chatInputBarHeight: currentInputBarHeight,
diff --git a/native/chat/text-message.react.js b/native/chat/text-message.react.js
--- a/native/chat/text-message.react.js
+++ b/native/chat/text-message.react.js
@@ -214,7 +214,7 @@
initialCoordinates: coordinates,
verticalBounds,
visibleEntryIDs,
- location: 'fixed',
+ tooltipLocation: 'fixed',
margin,
item,
chatInputBarHeight: currentInputBarHeight,
diff --git a/native/navigation/tooltip.react.js b/native/navigation/tooltip.react.js
--- a/native/navigation/tooltip.react.js
+++ b/native/navigation/tooltip.react.js
@@ -93,7 +93,7 @@
+presentedFrom: string,
+initialCoordinates: LayoutCoordinates,
+verticalBounds: VerticalBounds,
- +location?: 'above' | 'below' | 'fixed',
+ +tooltipLocation?: 'above' | 'below' | 'fixed',
+margin?: number,
+visibleEntryIDs?: $ReadOnlyArray<string>,
+chatInputBarHeight?: number,
@@ -273,18 +273,18 @@
}
get tooltipHeight(): number {
- if (this.props.route.params.location === 'fixed') {
+ if (this.props.route.params.tooltipLocation === 'fixed') {
return fixedTooltipHeight;
} else {
return tooltipHeight(this.entries.length);
}
}
- get location(): 'above' | 'below' | 'fixed' {
+ get tooltipLocation(): 'above' | 'below' | 'fixed' {
const { params } = this.props.route;
- const { location } = params;
- if (location) {
- return location;
+ const { tooltipLocation } = params;
+ if (tooltipLocation) {
+ return tooltipLocation;
}
const { initialCoordinates, verticalBounds } = params;
@@ -353,14 +353,14 @@
chatInputBarHeight,
} = route.params;
const { x, y, width, height } = initialCoordinates;
- const { margin, location } = this;
+ const { margin, tooltipLocation } = this;
const style = {};
style.position = 'absolute';
(style.alignItems = 'center'),
(style.opacity = this.tooltipContainerOpacity);
- if (location !== 'fixed') {
+ if (tooltipLocation !== 'fixed') {
style.transform = [{ translateX: this.tooltipHorizontal }];
}
@@ -376,7 +376,7 @@
const inputBarHeight = chatInputBarHeight ?? 0;
- if (location === 'fixed') {
+ if (tooltipLocation === 'fixed') {
const padding = 8;
style.minWidth = dimensions.width - 16;
@@ -388,7 +388,7 @@
verticalBounds.y -
inputBarHeight +
padding;
- } else if (location === 'above') {
+ } else if (tooltipLocation === 'above') {
style.bottom =
dimensions.height - Math.max(y, verticalBounds.y) + margin;
style.transform.push({ translateY: this.tooltipVerticalAbove });
@@ -399,7 +399,7 @@
style.transform.push({ translateY: this.tooltipVerticalBelow });
}
- if (location !== 'fixed') {
+ if (tooltipLocation !== 'fixed') {
style.transform.push({ scale: this.tooltipScale });
}
@@ -429,14 +429,14 @@
const tooltipContainerStyle = [styles.itemContainer];
- if (this.location === 'fixed') {
+ if (this.tooltipLocation === 'fixed') {
tooltipContainerStyle.push(styles.itemContainerFixed);
}
const { entries } = this;
const items = entries.map((entry, index) => {
let style;
- if (this.location === 'fixed') {
+ if (this.tooltipLocation === 'fixed') {
style = index !== entries.length - 1 ? styles.itemMarginFixed : null;
} else {
style = index !== entries.length - 1 ? styles.itemMargin : null;
@@ -453,7 +453,7 @@
);
});
- if (this.location === 'fixed' && entries.length > 3) {
+ if (this.tooltipLocation === 'fixed' && entries.length > 3) {
items.splice(3);
const moreSpec = {
@@ -495,10 +495,10 @@
let triangleDown = null;
let triangleUp = null;
- const { location } = this;
- if (location === 'above') {
+ const { tooltipLocation } = this;
+ if (tooltipLocation === 'above') {
triangleDown = <View style={[styles.triangleDown, triangleStyle]} />;
- } else if (location === 'below') {
+ } else if (tooltipLocation === 'below') {
triangleUp = <View style={[styles.triangleUp, triangleStyle]} />;
}
@@ -521,7 +521,7 @@
let tooltip = null;
- if (this.location !== 'fixed') {
+ if (this.tooltipLocation !== 'fixed') {
tooltip = (
<AnimatedView
style={this.tooltipContainerStyle}
@@ -533,7 +533,7 @@
</AnimatedView>
);
} else if (
- this.location === 'fixed' &&
+ this.tooltipLocation === 'fixed' &&
!hideTooltip &&
!showEmojiKeyboard.value
) {
@@ -564,7 +564,7 @@
}
onPressBackdrop = () => {
- if (this.location !== 'fixed') {
+ if (this.tooltipLocation !== 'fixed') {
this.props.navigation.goBackOnce();
} else {
this.props.setHideTooltip(true);
@@ -572,7 +572,10 @@
};
onPressEntry = (entry: TooltipEntry<RouteName>) => {
- if (this.location !== 'fixed' || this.props.actionSheetShown.value) {
+ if (
+ this.tooltipLocation !== 'fixed' ||
+ this.props.actionSheetShown.value
+ ) {
this.props.navigation.goBackOnce();
} else {
this.props.setHideTooltip(true);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 3:05 PM (21 h, 41 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2677758
Default Alt Text
D6447.diff (6 KB)
Attached To
Mode
D6447: [native] change location to tooltipLocation in the TooltipParams
Attached
Detach File
Event Timeline
Log In to Comment