From e267cd7da3a96f35db9792f8611169a30380b7a2 Mon Sep 17 00:00:00 2001 From: Dhanraj30 Date: Sat, 11 Jan 2025 16:01:17 +0530 Subject: [PATCH 1/3] Make dry run toggle live by default and add tooltip --- app/src/components/SecondaryButton.tsx | 10 +++++++++- app/src/features/toolbar/components/ActionToolbar.tsx | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/components/SecondaryButton.tsx b/app/src/components/SecondaryButton.tsx index 8b2a4b6..e517651 100644 --- a/app/src/components/SecondaryButton.tsx +++ b/app/src/components/SecondaryButton.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import Button from "@mui/material/Button"; import Tooltip from "@mui/material/Tooltip"; import useTheme from "../context/theme"; @@ -11,6 +11,7 @@ export interface SecondaryButtonProps { tooltip?: string; style?: React.CSSProperties; header?: boolean; + live?: boolean; } function SecondaryButton({ onClick, @@ -20,6 +21,7 @@ function SecondaryButton({ tooltip, style, header, + live = false, }: SecondaryButtonProps) { if (header) { style = { @@ -33,6 +35,12 @@ function SecondaryButton({ const { themeColor } = useTheme(); + useEffect(() => { + if (live) { + onClick(); + } + }, [live, onClick]); + return ( diff --git a/app/src/features/toolbar/components/ActionToolbar.tsx b/app/src/features/toolbar/components/ActionToolbar.tsx index 729b6c0..4bee70d 100644 --- a/app/src/features/toolbar/components/ActionToolbar.tsx +++ b/app/src/features/toolbar/components/ActionToolbar.tsx @@ -100,6 +100,7 @@ function ActionToolbar({ ? "Hide the Solidity editor" : "Show the Solidity editor to transpile Solidity to Sway" } + live={true} /> Date: Sun, 12 Jan 2025 16:35:10 +0530 Subject: [PATCH 2/3] Fix: responsive to smaller screen size --- app/src/components/SecondaryButton.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/src/components/SecondaryButton.tsx b/app/src/components/SecondaryButton.tsx index e517651..4099ada 100644 --- a/app/src/components/SecondaryButton.tsx +++ b/app/src/components/SecondaryButton.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import React from "react"; import Button from "@mui/material/Button"; import Tooltip from "@mui/material/Tooltip"; import useTheme from "../context/theme"; @@ -11,7 +11,6 @@ export interface SecondaryButtonProps { tooltip?: string; style?: React.CSSProperties; header?: boolean; - live?: boolean; } function SecondaryButton({ onClick, @@ -21,7 +20,6 @@ function SecondaryButton({ tooltip, style, header, - live = false, }: SecondaryButtonProps) { if (header) { style = { @@ -35,12 +33,6 @@ function SecondaryButton({ const { themeColor } = useTheme(); - useEffect(() => { - if (live) { - onClick(); - } - }, [live, onClick]); - return ( @@ -57,6 +49,12 @@ function SecondaryButton({ borderColor: themeColor("disabled1"), color: themeColor("disabled1"), }, + "@media (max-width: 1440px)": { + marginRight: "5px", + marginBottom: "5px", + height: "35px", + minWidth: "90px", + }, }} variant="outlined" onClick={onClick} From 6155ada0ebefc0e380b60780f4b2597144e0b35d Mon Sep 17 00:00:00 2001 From: Dhanraj30 Date: Sun, 12 Jan 2025 17:15:07 +0530 Subject: [PATCH 3/3] fix: interface sidebar responsive to smaller screen size --- app/src/features/toolbar/components/AbiActionToolbar.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/features/toolbar/components/AbiActionToolbar.tsx b/app/src/features/toolbar/components/AbiActionToolbar.tsx index a12fbec..af24287 100644 --- a/app/src/features/toolbar/components/AbiActionToolbar.tsx +++ b/app/src/features/toolbar/components/AbiActionToolbar.tsx @@ -28,6 +28,7 @@ function AbiActionToolbar({ style={{ margin: "5px 0 10px", display: isMobile ? "inline-table" : "flex", + flexWrap: "wrap", }} >