File tree Expand file tree Collapse file tree 8 files changed +51
-41
lines changed Expand file tree Collapse file tree 8 files changed +51
-41
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import {
2626 DialogTitle ,
2727 DialogTitleExtra ,
2828} from "@phoenix/components/dialog" ;
29+ import { StopPropagation } from "@phoenix/components/StopPropagation" ;
2930import { useNotifyError , useNotifySuccess } from "@phoenix/contexts" ;
3031import { assertUnreachable } from "@phoenix/typeUtils" ;
3132import { getErrorMessagesFromRelayMutationError } from "@phoenix/utils/errorUtils" ;
@@ -163,7 +164,7 @@ export function ExperimentActionMenu(props: ExperimentActionMenuProps) {
163164 }
164165
165166 return (
166- < >
167+ < StopPropagation >
167168 < MenuTrigger >
168169 < Button
169170 aria-label = "Experiment action menu"
@@ -272,6 +273,6 @@ export function ExperimentActionMenu(props: ExperimentActionMenuProps) {
272273 </ Dialog >
273274 </ Modal >
274275 </ ModalOverlay >
275- </ >
276+ </ StopPropagation >
276277 ) ;
277278}
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
1111 Popover ,
1212 Text ,
1313} from "@phoenix/components" ;
14+ import { StopPropagation } from "@phoenix/components/StopPropagation" ;
1415
1516import { DeleteDatasetDialog } from "./DeleteDatasetDialog" ;
1617import { EditDatasetDialog } from "./EditDatasetDialog" ;
@@ -45,7 +46,7 @@ export function DatasetActionMenu(props: DatasetActionMenuProps) {
4546 const [ isEditOpen , setIsEditOpen ] = useState ( false ) ;
4647
4748 return (
48- < >
49+ < StopPropagation >
4950 < MenuTrigger >
5051 < Button
5152 size = "S"
@@ -111,6 +112,6 @@ export function DatasetActionMenu(props: DatasetActionMenuProps) {
111112 isOpen = { isEditOpen }
112113 onOpenChange = { setIsEditOpen }
113114 />
114- </ >
115+ </ StopPropagation >
115116 ) ;
116117}
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {
1818 Popover ,
1919} from "@phoenix/components" ;
2020import { CreateDatasetForm } from "@phoenix/components/dataset/CreateDatasetForm" ;
21+ import { StopPropagation } from "@phoenix/components/StopPropagation" ;
2122import { useNotifyError , useNotifySuccess } from "@phoenix/contexts" ;
2223import { getErrorMessagesFromRelayMutationError } from "@phoenix/utils/errorUtils" ;
2324
@@ -48,7 +49,7 @@ export function NewDatasetActionMenu({
4849 setDatasetFromCSVDialogOpen ( true ) ;
4950 } ;
5051 return (
51- < >
52+ < StopPropagation >
5253 < MenuTrigger >
5354 < Button leadingVisual = { < Icon svg = { < Icons . DatabaseOutline /> } /> } >
5455 Create Dataset
@@ -153,6 +154,6 @@ export function NewDatasetActionMenu({
153154 </ Modal >
154155 </ ModalOverlay >
155156 </ DialogTrigger >
156- </ >
157+ </ StopPropagation >
157158 ) ;
158159}
Original file line number Diff line number Diff line change 77 MenuTrigger ,
88 Popover ,
99} from "@phoenix/components" ;
10+ import { StopPropagation } from "@phoenix/components/StopPropagation" ;
1011import { prependBasename } from "@phoenix/utils/routingUtils" ;
1112interface DownloadExperimentActionMenuProps {
1213 experimentId : string ;
@@ -16,32 +17,34 @@ export function DownloadExperimentActionMenu({
1617 experimentId,
1718} : DownloadExperimentActionMenuProps ) {
1819 return (
19- < MenuTrigger >
20- < Button
21- size = "S"
22- leadingVisual = { < Icon svg = { < Icons . DownloadOutline /> } /> }
23- />
24- < Popover >
25- < Menu
26- onAction = { ( action ) => {
27- if ( action === "csv" ) {
28- window . open (
29- prependBasename ( `/v1/experiments/${ experimentId } /csv` ) ,
30- "_blank"
31- ) ;
32- }
33- if ( action === "json" ) {
34- window . open (
35- prependBasename ( `/v1/experiments/${ experimentId } /json` ) ,
36- "_blank"
37- ) ;
38- }
39- } }
40- >
41- < MenuItem id = "csv" > Download CSV</ MenuItem >
42- < MenuItem id = "json" > Download JSON</ MenuItem >
43- </ Menu >
44- </ Popover >
45- </ MenuTrigger >
20+ < StopPropagation >
21+ < MenuTrigger >
22+ < Button
23+ size = "S"
24+ leadingVisual = { < Icon svg = { < Icons . DownloadOutline /> } /> }
25+ />
26+ < Popover >
27+ < Menu
28+ onAction = { ( action ) => {
29+ if ( action === "csv" ) {
30+ window . open (
31+ prependBasename ( `/v1/experiments/${ experimentId } /csv` ) ,
32+ "_blank"
33+ ) ;
34+ }
35+ if ( action === "json" ) {
36+ window . open (
37+ prependBasename ( `/v1/experiments/${ experimentId } /json` ) ,
38+ "_blank"
39+ ) ;
40+ }
41+ } }
42+ >
43+ < MenuItem id = "csv" > Download CSV</ MenuItem >
44+ < MenuItem id = "json" > Download JSON</ MenuItem >
45+ </ Menu >
46+ </ Popover >
47+ </ MenuTrigger >
48+ </ StopPropagation >
4649 ) ;
4750}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import {
2424 DialogTitle ,
2525 DialogTitleExtra ,
2626} from "@phoenix/components/dialog" ;
27+ import { StopPropagation } from "@phoenix/components/StopPropagation" ;
2728import { useNotifySuccess } from "@phoenix/contexts" ;
2829
2930import { ProjectActionMenuClearMutation } from "./__generated__/ProjectActionMenuClearMutation.graphql" ;
@@ -112,7 +113,7 @@ export function ProjectActionMenu({
112113 } , [ ] ) ;
113114
114115 return (
115- < >
116+ < StopPropagation >
116117 < MenuTrigger >
117118 < Button
118119 size = "S"
@@ -307,6 +308,6 @@ export function ProjectActionMenu({
307308 </ Modal >
308309 </ ModalOverlay >
309310 </ DialogTrigger >
310- </ >
311+ </ StopPropagation >
311312 ) ;
312313}
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 Modal ,
1313 Popover ,
1414} from "@phoenix/components" ;
15+ import { StopPropagation } from "@phoenix/components/StopPropagation" ;
1516
1617import { DeletePromptDialog } from "./DeletePromptDialog" ;
1718
@@ -33,7 +34,7 @@ export function PromptActionMenu({
3334 } , [ ] ) ;
3435
3536 return (
36- < >
37+ < StopPropagation >
3738 < MenuTrigger >
3839 < Button
3940 size = "S"
@@ -78,6 +79,6 @@ export function PromptActionMenu({
7879 />
7980 </ Modal >
8081 </ DialogTrigger >
81- </ >
82+ </ StopPropagation >
8283 ) ;
8384}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import {
2323 Text ,
2424 View ,
2525} from "@phoenix/components" ;
26+ import { StopPropagation } from "@phoenix/components/StopPropagation" ;
2627
2728import { EditRetentionPolicy } from "./EditRetentionPolicy" ;
2829
@@ -77,7 +78,7 @@ export const RetentionPolicyActionMenu = ({
7778 ` ) ;
7879
7980 return (
80- < >
81+ < StopPropagation >
8182 < MenuTrigger >
8283 < Button
8384 size = "S"
@@ -231,6 +232,6 @@ export const RetentionPolicyActionMenu = ({
231232 </ Modal >
232233 </ ModalOverlay >
233234 </ DialogTrigger >
234- </ >
235+ </ StopPropagation >
235236 ) ;
236237} ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313 ModalOverlay ,
1414 Popover ,
1515} from "@phoenix/components" ;
16+ import { StopPropagation } from "@phoenix/components/StopPropagation" ;
1617
1718import { AuthMethod } from "./__generated__/UsersTable_users.graphql" ;
1819import { DeleteUserDialog } from "./DeleteUserDialog" ;
@@ -75,7 +76,7 @@ export function UserActionMenu(props: UserActionMenuProps) {
7576 } , [ authMethod ] ) ;
7677
7778 return (
78- < >
79+ < StopPropagation >
7980 < MenuTrigger >
8081 < Button
8182 size = "S"
@@ -129,6 +130,6 @@ export function UserActionMenu(props: UserActionMenuProps) {
129130 </ Modal >
130131 </ ModalOverlay >
131132 </ DialogTrigger >
132- </ >
133+ </ StopPropagation >
133134 ) ;
134135}
You can’t perform that action at this time.
0 commit comments