This is an automated email from the ASF dual-hosted git repository.
jscheffl pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 3bfeb5437e9 Standardize copy in details page (#47804)
3bfeb5437e9 is described below
commit 3bfeb5437e9717d3aded2d2daac3f6ea361073c9
Author: Aritra Basu <[email protected]>
AuthorDate: Sat Mar 15 16:30:12 2025 +0530
Standardize copy in details page (#47804)
The different details pages had two
different types of copy buttons,
one clipboard and another clipboard
with text. Since the clipboard with text
was only used in the rendered json field.
Replaced that to clipboard.
---
airflow/ui/src/components/RenderedJsonField.tsx | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/airflow/ui/src/components/RenderedJsonField.tsx
b/airflow/ui/src/components/RenderedJsonField.tsx
index 8bcf8944a6c..132a57116a6 100644
--- a/airflow/ui/src/components/RenderedJsonField.tsx
+++ b/airflow/ui/src/components/RenderedJsonField.tsx
@@ -16,11 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { Flex, Spacer, type FlexProps } from "@chakra-ui/react";
+import { Flex, type FlexProps } from "@chakra-ui/react";
import { useTheme } from "next-themes";
import ReactJson, { type ReactJsonViewProps } from "react-json-view";
-import { ClipboardRoot, ClipboardButton } from "src/components/ui";
+import { ClipboardRoot, ClipboardIconButton } from "src/components/ui";
type Props = {
readonly content: object;
@@ -32,7 +32,7 @@ const RenderedJsonField = ({ content, jsonProps, ...rest }:
Props) => {
const { theme } = useTheme();
return (
- <Flex {...rest} p={2}>
+ <Flex {...rest}>
<ReactJson
displayDataTypes={false}
enableClipboard={false}
@@ -46,9 +46,8 @@ const RenderedJsonField = ({ content, jsonProps, ...rest }:
Props) => {
theme={theme === "dark" ? "monokai" : "rjv-default"}
{...jsonProps}
/>
- <Spacer />
<ClipboardRoot value={contentFormatted}>
- <ClipboardButton />
+ <ClipboardIconButton />
</ClipboardRoot>
</Flex>
);