-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/staging' into flink-test-mechani…
…sm-caching
- Loading branch information
Showing
160 changed files
with
3,677 additions
and
1,657 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.idea/ | ||
.idea/* | ||
!.idea/icon.svg | ||
target/ | ||
*.iml | ||
.*orig | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+10 Bytes
(100%)
.../__image_snapshots__/electron/Linux/Activities should display activities #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+67 Bytes
(100%)
.../__image_snapshots__/electron/Linux/Activities should display activities #2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-344 Bytes
(99%)
.../__image_snapshots__/electron/Linux/Activities should display activities #3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.64 KB
(100%)
...on/Linux/Sticky notes should add text to note and display it as markdown #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.41 KB
(100%)
...snapshots__/electron/Linux/Sticky notes should allow to drag sticky note #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+916 Bytes
(100%)
...Linux/Sticky notes should disable sticky note when scenario is not saved #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
designer/client/src/components/notifications/copyTooltip.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import React, { PropsWithChildren, useEffect, useState } from "react"; | ||
import copy from "copy-to-clipboard"; | ||
import { Button, Tooltip } from "@mui/material"; | ||
import { CopyAll, Done } from "@mui/icons-material"; | ||
|
||
export function useCopyClipboard(): [boolean, (value: string) => void] { | ||
const [isCopied, setIsCopied] = useState<boolean>(); | ||
const [text, setText] = useState<string>(); | ||
|
||
useEffect(() => { | ||
if (isCopied) { | ||
const id = setTimeout(() => { | ||
setIsCopied(false); | ||
}, 1000); | ||
|
||
return () => { | ||
clearTimeout(id); | ||
}; | ||
} | ||
}, [isCopied, text]); | ||
|
||
return [ | ||
isCopied, | ||
(value: string) => { | ||
setText(value); | ||
setIsCopied(copy(value)); | ||
}, | ||
]; | ||
} | ||
|
||
export function CopyTooltip({ | ||
children, | ||
text, | ||
title, | ||
}: PropsWithChildren<{ | ||
text: string; | ||
title: string; | ||
}>): JSX.Element { | ||
const [isCopied, copy] = useCopyClipboard(); | ||
return ( | ||
<Tooltip | ||
enterDelay={700} | ||
leaveDelay={200} | ||
title={ | ||
<Button | ||
size="small" | ||
variant="text" | ||
color="inherit" | ||
startIcon={isCopied ? <Done fontSize="small" /> : <CopyAll fontSize="small" />} | ||
onClick={(e) => { | ||
copy(text); | ||
e.stopPropagation(); | ||
}} | ||
> | ||
{title} | ||
</Button> | ||
} | ||
componentsProps={{ | ||
popper: { | ||
sx: { | ||
opacity: 0.8, | ||
}, | ||
}, | ||
tooltip: { | ||
sx: { | ||
bgcolor: (t) => (t.palette.mode === "dark" ? t.palette.common.white : t.palette.common.black), | ||
color: (t) => (t.palette.mode === "dark" ? t.palette.common.black : t.palette.common.white), | ||
}, | ||
}, | ||
arrow: { sx: { color: (t) => (t.palette.mode === "dark" ? t.palette.common.white : t.palette.common.black) } }, | ||
}} | ||
placement="bottom-start" | ||
arrow | ||
> | ||
<span>{children}</span> | ||
</Tooltip> | ||
); | ||
} |
Oops, something went wrong.