about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-04-16 18:51:25 -0700
committerGitHub <noreply@github.com>2024-04-17 02:51:25 +0100
commitd5982891fa0f79a5bc00eccb66be2611fb2d3502 (patch)
treef17bca4a139fa9838ebbe69d45adba03d96138ae /src
parent480fa10e0b90ba907db04123f0791f8ba756ab65 (diff)
downloadvoidsky-d5982891fa0f79a5bc00eccb66be2611fb2d3502.tar.zst
properly animate the profile hover card (#3590)
* properly implement with `isOpen` and `isPositioned`

* well, this works just as well

* add `willChange`
Diffstat (limited to 'src')
-rw-r--r--src/components/ProfileHoverCard/index.web.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/ProfileHoverCard/index.web.tsx b/src/components/ProfileHoverCard/index.web.tsx
index 467cbddc6..2cd1228d8 100644
--- a/src/components/ProfileHoverCard/index.web.tsx
+++ b/src/components/ProfileHoverCard/index.web.tsx
@@ -289,12 +289,12 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) {
       {props.children}
       {isVisible && (
         <Portal>
-          <div style={animationStyle}>
-            <div
-              ref={refs.setFloating}
-              style={floatingStyles}
-              onPointerEnter={onPointerEnterCard}
-              onPointerLeave={onPointerLeaveCard}>
+          <div
+            ref={refs.setFloating}
+            style={floatingStyles}
+            onPointerEnter={onPointerEnterCard}
+            onPointerLeave={onPointerLeaveCard}>
+            <div style={{willChange: 'transform', ...animationStyle}}>
               <Card did={props.did} hide={onPress} />
             </div>
           </div>