From aa942660415a15b0d611322cef0b87ec91825ce9 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 30 Jun 2023 11:46:47 +0100 Subject: [PATCH 1/9] add div to capture tooltip. mute pointerevents --- .../src/lib/Button/StaticAnalyserButton.tsx | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) 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 136846bb96..b0f967e10d 100644 --- a/libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx +++ b/libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx @@ -1,5 +1,6 @@ import { CustomTooltip } from '@remix-ui/helper' import React from 'react' //eslint-disable-line +import '../ssa.css' interface StaticAnalyserButtonProps { onClick: (event) => void @@ -21,7 +22,12 @@ const StaticAnalyserButton = ({ classList.length === 0 && disabled ? `${defaultStyle} disabled` : classList.length > 0 ? `${classList}` : defaultStyle const buttonWithoutTooltip = () => ( - + - ) + ) return ( title && title.length > 0 ? buttonWithTooltip() : buttonWithoutTooltip() From 3de93f2a4eba1d79d7de24dc482c447087d398a7 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 30 Jun 2023 11:48:16 +0100 Subject: [PATCH 2/9] increase specificity of css selector for e2e --- apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts b/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts index 446ea13622..428e50e9b6 100644 --- a/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts +++ b/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts @@ -40,7 +40,7 @@ module.exports = { .click('*[id="compileBtn"]') .pause(10000) .clickLaunchIcon('solidityStaticAnalysis') - .click('*[id="staticAnalysisRunBtn"]') + .click('div#staticAnalysisWrapper > *[id="staticAnalysisRunBtn"]') .waitForElementPresent('#staticanalysisresult .warning', 5000) // Check warning count .click('*[data-rb-event-key="remix"]') From 6827fa8f396b4bc6fed6727c31d684b43c97d029 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 30 Jun 2023 11:48:48 +0100 Subject: [PATCH 3/9] remove redundant import --- .../static-analyser/src/lib/Button/StaticAnalyserButton.tsx | 1 - 1 file changed, 1 deletion(-) 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 b0f967e10d..f72366b7d3 100644 --- a/libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx +++ b/libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx @@ -1,6 +1,5 @@ import { CustomTooltip } from '@remix-ui/helper' import React from 'react' //eslint-disable-line -import '../ssa.css' interface StaticAnalyserButtonProps { onClick: (event) => void From ed0e12d123abf10ec93444449c37d67c62a0c2a9 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 30 Jun 2023 11:52:30 +0100 Subject: [PATCH 4/9] remove extra padding from wrapping div --- .../static-analyser/src/lib/Button/StaticAnalyserButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 f72366b7d3..2e34884fe2 100644 --- a/libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx +++ b/libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx @@ -16,7 +16,7 @@ const StaticAnalyserButton = ({ title, classList }: StaticAnalyserButtonProps) => { - const defaultStyle = "btn btn-sm w-25 btn-primary" + const defaultStyle = "btn btn-sm btn-block btn-primary" const newclassList = disabled && classList.length > 0 ? `${classList} disabled` : classList.length === 0 && disabled ? `${defaultStyle} disabled` : classList.length > 0 ? `${classList}` : defaultStyle @@ -40,7 +40,7 @@ const StaticAnalyserButton = ({ tooltipClasses="text-nowrap" tooltipText={title} > -
+
+
) From c027acc003dd1bbca3dd1490af8f46145db2db13 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 5 Jul 2023 14:16:52 +0100 Subject: [PATCH 9/9] fix text for tooltip --- .../static-analyser/src/lib/remix-ui-static-analyser.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f4332fb58b..5ad011d24a 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 @@ -130,7 +130,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { `${ state && state.data && state.file.length > 0 ? "Run analysis" - : "To run analysis tools, first compile a contract." + : "To run analysis for selected tools, first compile a contract" }` ); }