From 3ff2b4429ce44e66d062ad1324be3df3fcf05858 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 9 Jun 2023 17:01:41 +0100 Subject: [PATCH 01/20] linter & slither checkbox tooltip updates --- .../static-analyser/src/lib/remix-ui-static-analyser.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index dda3c2c023..639595e8d4 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -633,7 +633,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { { inputType="checkbox" onClick={handleSlitherEnabled} checked={showSlither} - disabled={true} + disabled={false} label="Slither" onChange={() => {}} optionalClassName="mr-3" - title="To run Slither analysis, Remix IDE must be connected to your local filesystem with remixd." + title="Run Slither static analysis." /> ) + + const buttonWithTooltip = () => ( + ) + + return ( + title && title.length > 0 ? buttonWithTooltip() : buttonWithoutTooltip() + ) } export default StaticAnalyserButton diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index 838b723942..710232f390 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -657,17 +657,23 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { label="Slither" onChange={() => {}} optionalClassName="mr-3" - title={slitherEnabled ? "Run Slither static analysis." : "To have slither active, you need to have remixd connected to your local filesystem"} + title={slitherEnabled ? "Run Slither static analysis." : "To run Slither analysis, Remix IDE must be connected to your local filesystem with Remixd."} /> -