Page MenuHomePhabricator

D6399.diff
No OneTemporary

D6399.diff

diff --git a/web/chat/tooltip-provider.js b/web/chat/tooltip-provider.js
--- a/web/chat/tooltip-provider.js
+++ b/web/chat/tooltip-provider.js
@@ -4,6 +4,8 @@
import invariant from 'invariant';
import * as React from 'react';
+import type { SetState } from 'lib/types/hook-types';
+
import type { TooltipPositionStyle } from '../utils/tooltip-utils';
import css from './tooltip.css';
@@ -24,6 +26,8 @@
type TooltipContextType = {
+renderTooltip: (params: RenderTooltipParams) => RenderTooltipResult,
+clearTooltip: () => mixed,
+ +renderEmojiKeyboard: boolean,
+ +setRenderEmojiKeyboard: SetState<boolean>,
};
const TooltipContext: React.Context<TooltipContextType> = React.createContext<TooltipContextType>(
@@ -34,6 +38,8 @@
updateTooltip: () => {},
}),
clearTooltip: () => {},
+ renderEmojiKeyboard: false,
+ setRenderEmojiKeyboard: () => {},
},
);
@@ -50,6 +56,9 @@
tooltipPosition,
setTooltipPosition,
] = React.useState<?TooltipPositionStyle>(null);
+ const [renderEmojiKeyboard, setRenderEmojiKeyboard] = React.useState<boolean>(
+ false,
+ );
const clearTooltip = React.useCallback((tooltipToClose: symbol) => {
if (tooltipSymbol.current !== tooltipToClose) {
@@ -58,6 +67,7 @@
tooltipCancelTimer.current = null;
setTooltipNode(null);
setTooltipPosition(null);
+ setRenderEmojiKeyboard(false);
tooltipSymbol.current = null;
}, []);
@@ -150,8 +160,10 @@
() => ({
renderTooltip,
clearTooltip: clearCurrentTooltip,
+ renderEmojiKeyboard,
+ setRenderEmojiKeyboard,
}),
- [renderTooltip, clearCurrentTooltip],
+ [renderTooltip, clearCurrentTooltip, renderEmojiKeyboard],
);
return (

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 4:02 PM (20 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2677915
Default Alt Text
D6399.diff (1 KB)

Event Timeline