From 72bec3b8478321284dcd8fb061f32d0e66856ee5 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Tue, 22 Nov 2022 12:23:10 +0100 Subject: [PATCH] address changes in review comments --- .../checkbox/src/lib/remix-ui-checkbox.tsx | 2 +- .../src/lib/components/contractDropdownUI.tsx | 64 +++++++++++-------- .../src/lib/compiler-container.tsx | 2 +- .../src/lib/Button/StaticAnalyserButton.tsx | 2 +- 4 files changed, 41 insertions(+), 29 deletions(-) diff --git a/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx b/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx index 8c36fa5fa8..268927908e 100644 --- a/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx +++ b/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx @@ -34,7 +34,7 @@ export const RemixUiCheckbox = ({ title, visibility, display = 'flex', - tooltipPlacement = 'right-start' + tooltipPlacement = 'right' }: RemixUiCheckboxProps) => { const childJSX = ( diff --git a/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx index 78da4cd98e..cd05f0823c 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx @@ -136,12 +136,12 @@ export function ContractDropdownUI (props: ContractDropdownProps) { if (enable) { setAtAddressOptions({ disabled: false, - title: Interact with the deployed contract - requires the .abi file or
compiled .sol file to be selected in the editor
(with the same compiler configuration)
+ title: Interact with the deployed contract - requires the .abi file or
compiled .sol file to be selected in the editor
(with the same compiler configuration)
}) } else { setAtAddressOptions({ disabled: true, - title: loadedAddress ? 'Compile a *.sol file or select a *.abi file.' : To interact with a deployed contract,
enter its address and compile its source *.sol file
(with the same compiler settings) or select its .abi file in the editor.
+ title: loadedAddress ? 'Compile a *.sol file or select a *.abi file.' : To interact with a deployed contract either,
enter its address and compile its source *.sol file
(with the same compiler settings) or select its .abi file in the editor.
}) } } @@ -155,7 +155,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) { } else { setContractOptions({ disabled: true, - title: loadType === 'sol' ? 'Select and compile *.sol file to deploy or access a contract.' : When there is a compiled .sol file, choose the
contract to deploy or to use with AtAddress.'
+ title: loadType === 'sol' ? 'Select and compile *.sol file to deploy or access a contract.' : When there is a compiled .sol file, choose the
contract to deploy or to use with AtAddress.'
}) } } @@ -236,7 +236,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) { const checkSumWarning = () => { return ( - + It seems you are not using a checksumed address.
A checksummed address is an address that contains uppercase letters, as specified in EIP-55.
Checksummed addresses are meant to help prevent users from sending transactions to the wrong address. @@ -264,10 +264,12 @@ export function ContractDropdownUI (props: ContractDropdownProps) { {props.remixdActivated ? (Click here to import contracts compiled from an external framework.
- This action is enabled when Remix is connected to an external framework (hardhat, truffle, foundry) through remixd.
} + tooltipText={ + Click here to import contracts compiled from an external framework.
+ This action is enabled when Remix is connected to an external
framework (hardhat, truffle, foundry) through remixd. +
} > ) : null} - +
+ {contractOptions.disabled ? ( + + ) : ( -
- - {abiLabel.content} -
-
+ + )} + {abiLabel.content} +
+
{((contractList[currentFile] && contractList[currentFile].filter(contract => contract)) || []).length <= 0 ? intl.formatMessage({id: 'udapp.noCompiledContracts', defaultMessage: 'No compiled contracts'}) : loadedContractData ?
@@ -322,9 +334,9 @@ export function ContractDropdownUI (props: ContractDropdownProps) { /> Publishing the source code and metadata to IPFS
facilitates source code verification using Sourcify and
will greatly foster contract adoption
(auditing, debugging, calling it, etc...)} + tooltipText={Publishing the source code and metadata to IPFS facilitates
source code verification using Sourcify and will greatly foster
contract adoption (auditing, debugging, calling it, etc...)
} >
-
+
@@ -356,9 +368,9 @@ export function ContractDropdownUI (props: ContractDropdownProps) { { contract ContractName {'{}'}
- Click to know more + Click the i icon to learn more
} > diff --git a/libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx b/libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx index 4f8eed6086..db660c1d49 100644 --- a/libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx +++ b/libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx @@ -19,7 +19,7 @@ const StaticAnalyserButton = ({ return (