Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3361476
D5726.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5726.diff
View Options
diff --git a/web/chat/mention-suggestion-tooltip.css b/web/chat/mention-suggestion-tooltip.css
--- a/web/chat/mention-suggestion-tooltip.css
+++ b/web/chat/mention-suggestion-tooltip.css
@@ -56,3 +56,12 @@
.suggestion:hover {
background-color: var(--typeahead-overlay-light);
}
+
+.notVisible {
+ opacity: 0;
+}
+
+.visible {
+ opacity: 1;
+ transition: opacity 100ms ease-in;
+}
diff --git a/web/chat/mention-suggestion-tooltip.react.js b/web/chat/mention-suggestion-tooltip.react.js
--- a/web/chat/mention-suggestion-tooltip.react.js
+++ b/web/chat/mention-suggestion-tooltip.react.js
@@ -1,5 +1,6 @@
// @flow
+import classNames from 'classnames';
import * as React from 'react';
import SearchIndex from 'lib/shared/search-index';
@@ -36,6 +37,13 @@
viewerID,
matchedStrings,
} = props;
+ const [isVisible, setIsVisible] = React.useState(false);
+
+ React.useEffect(() => {
+ setIsVisible(true);
+
+ return () => setIsVisible(false);
+ }, [setIsVisible]);
const {
entireText: matchedText,
@@ -103,8 +111,13 @@
return null;
}
+ const overlayClasses = classNames(css.suggestionsContainer, {
+ [css.notVisible]: !isVisible,
+ [css.visible]: isVisible,
+ });
+
return (
- <div className={css.suggestionsContainer} style={tooltipPositionStyle}>
+ <div className={overlayClasses} style={tooltipPositionStyle}>
{tooltipButtons}
</div>
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 5:39 PM (20 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580556
Default Alt Text
D5726.diff (1 KB)
Attached To
Mode
D5726: [web] Added on enter animation for typeahead overlay.
Attached
Detach File
Event Timeline
Log In to Comment