From e5f4696f05505580a440f95e61ba806e3be069cc Mon Sep 17 00:00:00 2001
From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com>
Date: Sat, 31 May 2025 14:28:49 +0000
Subject: [PATCH] Fix tooltips in SharePopover components
- Add TooltipProvider to Document and Collection SharePopover components
- Fixes tooltip context being lost when content is rendered in portals
- Ensures tooltips work properly for CopyLinkButton and other tooltip-enabled components
---
.../Sharing/Collection/SharePopover.tsx | 63 ++++++++--------
.../Sharing/Document/SharePopover.tsx | 71 ++++++++++---------
2 files changed, 70 insertions(+), 64 deletions(-)
diff --git a/app/components/Sharing/Collection/SharePopover.tsx b/app/components/Sharing/Collection/SharePopover.tsx
index 0d76743dcf..33ff82e275 100644
--- a/app/components/Sharing/Collection/SharePopover.tsx
+++ b/app/components/Sharing/Collection/SharePopover.tsx
@@ -11,6 +11,7 @@ import Group from "~/models/Group";
import User from "~/models/User";
import { Avatar, AvatarSize } from "~/components/Avatar";
import NudeButton from "~/components/NudeButton";
+import { TooltipProvider } from "~/components/TooltipContext";
import { createAction } from "~/actions";
import { UserSection } from "~/actions/sections";
import useBoolean from "~/hooks/useBoolean";
@@ -335,38 +336,40 @@ function SharePopover({ collection, visible, onRequestClose }: Props) {
);
return (
-
- {can.update && (
-
- )}
+
+
+ {can.update && (
+
+ )}
- {picker && (
-
- )}
+ {picker && (
+
+ )}
-
-
+
+
+
);
}
diff --git a/app/components/Sharing/Document/SharePopover.tsx b/app/components/Sharing/Document/SharePopover.tsx
index 007633977c..02e9febe69 100644
--- a/app/components/Sharing/Document/SharePopover.tsx
+++ b/app/components/Sharing/Document/SharePopover.tsx
@@ -11,6 +11,7 @@ import Group from "~/models/Group";
import User from "~/models/User";
import { Avatar, GroupAvatar, AvatarSize } from "~/components/Avatar";
import NudeButton from "~/components/NudeButton";
+import { TooltipProvider } from "~/components/TooltipContext";
import { createAction } from "~/actions";
import { UserSection } from "~/actions/sections";
import useBoolean from "~/hooks/useBoolean";
@@ -345,42 +346,44 @@ function SharePopover({ document, onRequestClose, visible }: Props) {
);
return (
-
- {can.manageUsers && (
-
- )}
+
+
+ {can.manageUsers && (
+
+ )}
- {picker && (
-
- )}
+ {picker && (
+
+ )}
-
-
+
+
+
);
}