Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32216476
D8858.1765167282.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8858.1765167282.diff
View Options
diff --git a/web/utils/tooltip-action-utils.js b/web/utils/tooltip-action-utils.js
--- a/web/utils/tooltip-action-utils.js
+++ b/web/utils/tooltip-action-utils.js
@@ -22,7 +22,7 @@
import {
type MessageTooltipAction,
getTooltipPositionStyle,
- calculateTooltipSize,
+ calculateMessageTooltipSize,
type TooltipPosition,
type TooltipPositionStyle,
type TooltipSize,
@@ -416,7 +416,7 @@
};
}
const tooltipLabels = tooltipActions.map(action => action.label);
- return calculateTooltipSize({
+ return calculateMessageTooltipSize({
tooltipLabels,
timestamp: messageTimestamp,
});
diff --git a/web/utils/tooltip-utils.js b/web/utils/tooltip-utils.js
--- a/web/utils/tooltip-utils.js
+++ b/web/utils/tooltip-utils.js
@@ -318,18 +318,15 @@
return tooltipPositionStyle;
}
-type CalculateTooltipSizeArgs = {
+type CalculateMessageTooltipSizeArgs = {
+tooltipLabels: $ReadOnlyArray<string>,
+timestamp: string,
};
-function calculateTooltipSize({
+function calculateMessageTooltipSize({
tooltipLabels,
timestamp,
-}: CalculateTooltipSizeArgs): {
- +width: number,
- +height: number,
-} {
+}: CalculateMessageTooltipSizeArgs): TooltipSize {
const textWidth =
calculateMaxTextWidth([...tooltipLabels, timestamp], 14) +
2 * tooltipLabelStyle.padding;
@@ -352,4 +349,8 @@
};
}
-export { findTooltipPosition, getTooltipPositionStyle, calculateTooltipSize };
+export {
+ findTooltipPosition,
+ getTooltipPositionStyle,
+ calculateMessageTooltipSize,
+};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 8, 4:14 AM (10 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5845722
Default Alt Text
D8858.1765167282.diff (1 KB)
Attached To
Mode
D8858: [web] rename calculateToolTipSize to calculateMessageTooltipSize
Attached
Detach File
Event Timeline
Log In to Comment