diff --git a/apps/remix-ide-e2e/src/tests/proxy.test.ts b/apps/remix-ide-e2e/src/tests/proxy.test.ts index 29e611b155..d6d51ed57d 100644 --- a/apps/remix-ide-e2e/src/tests/proxy.test.ts +++ b/apps/remix-ide-e2e/src/tests/proxy.test.ts @@ -56,7 +56,7 @@ module.exports = { browser .addFile('myTokenV2.sol', sources[1]['myTokenV2.sol']) .clickLaunchIcon('solidity') - .pause(2000) + .assert.visible('[data-id="compilerContainerCompileBtn"]') .click('[data-id="compilerContainerCompileBtn"]') .waitForElementPresent('select[id="compiledContracts"] option[value=MyTokenV2]', 60000) .clickLaunchIcon('udapp') @@ -70,12 +70,13 @@ module.exports = { browser .openFile('myTokenV1.sol') .clickLaunchIcon('solidity') - .pause(2000) + .assert.visible('[data-id="compilerContainerCompileBtn"]') .click('[data-id="compilerContainerCompileBtn"]') .waitForElementPresent('select[id="compiledContracts"] option[value=MyToken]', 60000) .clickLaunchIcon('udapp') .click('select.udapp_contractNames') .click('select.udapp_contractNames option[value=MyToken]') + .verify.visible('[data-id="contractGUIDeployWithProxyLabel"]') .waitForElementPresent('[data-id="contractGUIDeployWithProxyLabel"]') .click('[data-id="contractGUIDeployWithProxyLabel"]') .createContract('') @@ -113,7 +114,7 @@ module.exports = { .click('[data-id="deployAndRunClearInstances"]') .addFile('initializeProxy.sol', sources[2]['initializeProxy.sol']) .clickLaunchIcon('solidity') - .pause(2000) + .assert.visible('[data-id="compilerContainerCompileBtn"]') .click('[data-id="compilerContainerCompileBtn"]') .waitForElementPresent('select[id="compiledContracts"] option[value=MyInitializedToken]', 60000) .clickLaunchIcon('udapp') @@ -121,10 +122,12 @@ module.exports = { .click('select.udapp_contractNames option[value=MyInitializedToken]') .waitForElementPresent('[data-id="contractGUIDeployWithProxyLabel"]') .click('[data-id="contractGUIDeployWithProxyLabel"]') - .waitForElementPresent('input[title="tokenName"]') - .waitForElementPresent('input[title="tokenSymbol"]') - .setValue('input[title="tokenName"]', 'Remix') - .setValue('input[title="tokenSymbol"]', "R") + .useXpath() + .waitForElementPresent('//*[@id="runTabView"]/div/div[2]/div[3]/div[1]/div/div[1]/div[4]/div/div[1]/input') + .waitForElementPresent('//*[@id="runTabView"]/div/div[2]/div[3]/div[1]/div/div[1]/div[4]/div/div[2]/input') + .setValue('//*[@id="runTabView"]/div/div[2]/div[3]/div[1]/div/div[1]/div[4]/div/div[1]/input', 'Remix') + .setValue('//*[@id="runTabView"]/div/div[2]/div[3]/div[1]/div/div[1]/div[4]/div/div[2]/input', "R") + .useCss() .createContract('') .waitForElementContainsText('[data-id="udappNotifyModalDialogModalTitle-react"]', 'Deploy Implementation & Proxy (ERC1967)') .waitForElementVisible('[data-id="udappNotify-modal-footer-ok-react"]') @@ -160,7 +163,7 @@ module.exports = { .click('[data-id="deployAndRunClearInstances"]') .openFile('myTokenV2.sol') .clickLaunchIcon('solidity') - .pause(2000) + .assert.visible('[data-id="compilerContainerCompileBtn"]') .click('[data-id="compilerContainerCompileBtn"]') .waitForElementPresent('select[id="compiledContracts"] option[value=MyTokenV2]', 60000) .clickLaunchIcon('udapp') @@ -202,7 +205,7 @@ module.exports = { .click('[data-id="deployAndRunClearInstances"]') .openFile('myTokenV2.sol') .clickLaunchIcon('solidity') - .pause(2000) + .assert.visible('[data-id="compilerContainerCompileBtn"]') .click('[data-id="compilerContainerCompileBtn"]') .waitForElementPresent('select[id="compiledContracts"] option[value=MyTokenV2]', 60000) .clickLaunchIcon('udapp') diff --git a/apps/remix-ide-e2e/src/tests/vyper_api.ts b/apps/remix-ide-e2e/src/tests/vyper_api.ts index bb0afc3859..a6744227ee 100644 --- a/apps/remix-ide-e2e/src/tests/vyper_api.ts +++ b/apps/remix-ide-e2e/src/tests/vyper_api.ts @@ -24,7 +24,7 @@ module.exports = { 'Should clone the Vyper repo #group1': function (browser: NightwatchBrowser) { browser.click('button[data-id="add-repository"]') .frameParent() - .waitForElementContainsText('*[data-shared="tooltipPopup"]', 'Vyper repository cloned', 30000) + .waitForElementContainsText('*[data-shared="tooltipPopup"]', 'Vyper repository cloned', 60000) .openFile('examples') .openFile('examples/auctions') .openFile('examples/auctions/blind_auction.vy') diff --git a/apps/vyper/tsconfig.json b/apps/vyper/tsconfig.json index a3e71f89f3..89dc063037 100644 --- a/apps/vyper/tsconfig.json +++ b/apps/vyper/tsconfig.json @@ -6,8 +6,8 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitReturns": true, + "strict": false, + "noImplicitReturns": false, "noFallthroughCasesInSwitch": true }, "files": [], diff --git a/apps/vyper/webpack.config.js b/apps/vyper/webpack.config.js new file mode 100644 index 0000000000..02143af15b --- /dev/null +++ b/apps/vyper/webpack.config.js @@ -0,0 +1,31 @@ +const nxWebpack = require('@nrwl/react/plugins/webpack') +const TerserPlugin = require('terser-webpack-plugin') + +module.exports = config => { + const nxWebpackConfig = nxWebpack(config) + const webpackConfig = { + ...nxWebpackConfig, + node: { + fs: 'empty', + tls: 'empty', + readline: 'empty', + net: 'empty', + module: 'empty', + child_process: 'empty' + } + } + + if (process.env.NODE_ENV === 'production') { + return { + ...webpackConfig, + mode: 'production', + devtool: 'source-map', + optimization: { + minimize: true, + minimizer: [new TerserPlugin()] + } + } + } else { + return webpackConfig + } +} diff --git a/libs/remix-lib/src/execution/logsManager.ts b/libs/remix-lib/src/execution/logsManager.ts index e852d9a742..70e4ed9d41 100644 --- a/libs/remix-lib/src/execution/logsManager.ts +++ b/libs/remix-lib/src/execution/logsManager.ts @@ -17,7 +17,7 @@ export class LogsManager { } checkBlock (blockNumber, block, web3) { - eachOf(block.transactions, (tx, i, next) => { + eachOf(block.transactions, (tx: any, i, next) => { const txHash = '0x' + tx.hash().toString('hex') web3.eth.getTransactionReceipt(txHash, (_error, receipt) => { diff --git a/libs/remix-lib/src/execution/txFormat.ts b/libs/remix-lib/src/execution/txFormat.ts index e8be0bafcd..1cc381994e 100644 --- a/libs/remix-lib/src/execution/txFormat.ts +++ b/libs/remix-lib/src/execution/txFormat.ts @@ -265,6 +265,7 @@ export function linkBytecodeStandard (contract, contracts, callback, callbackSte cbLibDeployed() }, callbackStep, callbackDeployLibrary) } else { + //@ts-ignore cbLibDeployed('Cannot find compilation data of library ' + libName) } }, (error) => { 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 a10da271ec..6383789a24 100644 --- a/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx +++ b/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx @@ -1,5 +1,5 @@ +import { CustomTooltip } from '@remix-ui/helper'; import React, { CSSProperties } from 'react' //eslint-disable-line -import { OverlayProps, OverlayTrigger, OverlayTriggerProps, Tooltip } from 'react-bootstrap'// eslint-disable-line import './remix-ui-checkbox.css' type Placement = import('react-overlays/usePopper').Placement; @@ -36,15 +36,8 @@ export const RemixUiCheckbox = ({ display = 'flex', tooltipPlacement = 'right-start' }: RemixUiCheckboxProps) => { - return ( - - {title} - - } - > + + const childJSX = (
-
+ ) + return ( + + {childJSX} + ) } diff --git a/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx b/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx index a90dc433af..78b4624df1 100644 --- a/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx +++ b/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx @@ -1,9 +1,9 @@ import React, { useState } from 'react' import copy from 'copy-to-clipboard' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' import { Placement } from 'react-bootstrap/esm/Overlay' import './copy-to-clipboard.css' +import { CustomTooltip } from '@remix-ui/helper' interface ICopyToClipboard { content?: any, @@ -50,20 +50,22 @@ export const CopyToClipboard = (props: ICopyToClipboard) => { setTimeout(() => setMessage(tip), 500) } + const childJSX = ( + children || () + ) + return ( // eslint-disable-next-line jsx-a11y/anchor-is-valid - - { message } - - }> - { - children || () - } - + + {childJSX} + ) } diff --git a/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx b/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx index f1c0826eb2..260b0140a6 100644 --- a/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx @@ -1,5 +1,5 @@ +import { CustomTooltip } from '@remix-ui/helper' import React, { useState, useEffect } from 'react' // eslint-disable-line -import { OverlayTrigger, Tooltip } from 'react-bootstrap' import './button-navigator.css' export const ButtonNavigation = ({ stepOverBack, stepIntoBack, stepIntoForward, stepOverForward, jumpOut, jumpPreviousBreakpoint, jumpNextBreakpoint, jumpToException, revertedReason, stepState, jumpOutDisabled }) => { @@ -55,113 +55,125 @@ export const ButtonNavigation = ({ stepOverBack, stepIntoBack, stepIntoForward, const disableStepBtnStyle = 'stepButtonDisabled' const jumpBtnStyle = 'd-flex align-items-center justify-content-center btn btn-primary btn-sm jumpButton h-75 m-0 p-1' const disableJumpBtnStyle = 'jumpButtonDisabled' + const stepMarkupStructure = { + stepOverBackJSX : { + markup: (
{ stepOverBack && stepOverBack() }}> + +
), + placement: 'top-start', + tagId: 'overbackTooltip', + tooltipMsg: 'Step over back' + }, + stepBackJSX : { + markup: ( +
{ stepIntoBack && stepIntoBack() }} data-id="buttonNavigatorIntoBack" id="buttonNavigatorIntoBackContainer"> + +
+ ), + placement: 'top-start', + tagId: 'intobackTooltip', + tooltipMsg: 'Step back' + }, + + stepIntoJSX : { + markup: ( +
{ stepIntoForward && stepIntoForward() }} data-id="buttonNavigatorIntoForward" id="buttonNavigatorIntoFowardContainer"> + +
+ ), + placement: 'top-start', + tagId: 'intoforwardTooltip', + tooltipMsg: 'Step into' + }, + stepOverForwardJSX : { + markup: ( +
{ stepOverForward && stepOverForward() }} data-id="buttonNavigatorOverForward" id="buttonNavigatorOverForwardContainer"> + +
+ ), + placement: 'top-end', + tagId: 'overbackTooltip', + tooltipMsg: 'Step over forward', + } +} + const jumpMarkupStructure = { + jumpPreviousBreakpointJSX : { + markup: ( +
{ jumpPreviousBreakpoint && jumpPreviousBreakpoint() }} data-id="buttonNavigatorJumpPreviousBreakpoint"> + +
+ ), + placement: 'bottom-start', + tagId: 'jumppreviousbreakpointTooltip', + tooltipMsg: 'Jump to the previous breakpoint' + }, + jumpOutJSX : { + markup: ( +
{ jumpOut && jumpOut() }} data-id="buttonNavigatorJumpOut" id="buttonNavigatorJumpOutContainer"> + +
+ ), + placement: 'bottom-end', + tagId: 'jumpoutTooltip', + tooltipMsg: 'Jump out' + }, + jumpNextBreakpointJSX : { + markup: ( +
{ jumpNextBreakpoint && jumpNextBreakpoint() }} data-id="buttonNavigatorJumpNextBreakpoint" id="buttonNavigatorJumpNextBreakpointContainer"> + +
+ ), + placement: 'bottom-end', + tagId: 'jumpnextbreakpointTooltip', + tooltipMsg: 'Jump to the next breakpoint' + } + } return (
- - Step over back - - } - > -
{ stepOverBack && stepOverBack() }}> - -
-
- - Step back - - } - > -
{ stepIntoBack && stepIntoBack() }} data-id="buttonNavigatorIntoBack" id="buttonNavigatorIntoBackContainer"> - -
-
- - Step into - - } - > -
{ stepIntoForward && stepIntoForward() }} data-id="buttonNavigatorIntoForward" id="buttonNavigatorIntoFowardContainer"> - -
-
- - Step over forward - - } - > -
{ stepOverForward && stepOverForward() }} data-id="buttonNavigatorOverForward" id="buttonNavigatorOverForwardContainer"> - -
-
+ {stepMarkupStructure[x].markup} + + )) + }
- - {'Jump to the previous breakpoint'} - - } - > -
{ jumpPreviousBreakpoint && jumpPreviousBreakpoint() }} data-id="buttonNavigatorJumpPreviousBreakpoint"> - -
-
- - {'Jump out'} - - } - > -
{ jumpOut && jumpOut() }} data-id="buttonNavigatorJumpOut" id="buttonNavigatorJumpOutContainer"> - -
-
- - {'Jump to the next breakpoint'} - - } - > -
{ jumpNextBreakpoint && jumpNextBreakpoint() }} data-id="buttonNavigatorJumpNextBreakpoint" id="buttonNavigatorJumpNextBreakpointContainer"> - -
-
+ { + Object.keys(jumpMarkupStructure).map(x => ( + + {jumpMarkupStructure[x].markup} + + )) + }
This call has reverted, state changes made during the call will be reverted. diff --git a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx index df51c8a512..ae29aac379 100644 --- a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx @@ -6,10 +6,9 @@ import VmDebuggerHead from './vm-debugger/vm-debugger-head' // eslint-disable-li import { TransactionDebugger as Debugger } from '@remix-project/remix-debug' // eslint-disable-line import { DebuggerUIProps } from './idebugger-api' // eslint-disable-line import { Toaster } from '@remix-ui/toaster' // eslint-disable-line -import { isValidHash } from '@remix-ui/helper' +import { CustomTooltip, isValidHash } from '@remix-ui/helper' /* eslint-disable-next-line */ import './debugger-ui.css' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' const _paq = (window as any)._paq = (window as any)._paq || [] export const DebuggerUI = (props: DebuggerUIProps) => { @@ -346,19 +345,8 @@ export const DebuggerUI = (props: DebuggerUIProps) => { triggerEvent: state.debugger && state.debugger.vmDebuggerLogic ? state.debugger.vmDebuggerLogic.event.trigger.bind(state.debugger.vmDebuggerLogic.event) : null } - return ( -
- -
-
-
- - {"Debug with generated sources"} - - } placement="top-start" - > - + const customJSX = ( + { setState(prevState => { return { ...prevState, opt: { ...prevState.opt, debugWithGeneratedSources: checked } } @@ -366,7 +354,20 @@ export const DebuggerUI = (props: DebuggerUIProps) => { }} type="checkbox" /> - + ) + return ( +
+ +
+
+
+ + {customJSX} +
{ state.isLocalNodeUsed &&
{ diff --git a/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx b/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx index f50e153484..57f46d0b59 100644 --- a/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx @@ -1,5 +1,5 @@ +import { CustomTooltip } from '@remix-ui/helper' import React, { useState, useEffect, useRef } from 'react' //eslint-disable-line -import { OverlayTrigger, Tooltip } from 'react-bootstrap' import './tx-browser.css' export const TxBrowser = ({ requestDebug, updateTxNumberFlag, unloadRequested, transactionNumber, debugging }) => { @@ -46,7 +46,20 @@ export const TxBrowser = ({ requestDebug, updateTxNumberFlag, unloadRequested, t const txInputOnInput = () => { updateTxNumberFlag(!inputValue.current.value) } - + const customJSX = ( +
+ +
+ ) return (
@@ -65,29 +78,14 @@ export const TxBrowser = ({ requestDebug, updateTxNumberFlag, unloadRequested, t />
- - - {debugging ? 'Stop debugging' : 'Start debugging'} - - - } + -
- -
-
+ {customJSX} +
diff --git a/libs/remix-ui/helper/src/lib/components/custom-tooltip.tsx b/libs/remix-ui/helper/src/lib/components/custom-tooltip.tsx index e71b9330e1..302dfb1a95 100644 --- a/libs/remix-ui/helper/src/lib/components/custom-tooltip.tsx +++ b/libs/remix-ui/helper/src/lib/components/custom-tooltip.tsx @@ -4,7 +4,7 @@ import { OverlayTrigger, Tooltip } from 'react-bootstrap'; import { CustomTooltipType } from '../../types/customtooltip' -export function CustomTooltip({ children, placement, tooltipId, tooltipClasses, tooltipText }: CustomTooltipType) { +export function CustomTooltip({ children, placement, tooltipId, tooltipClasses, tooltipText, tooltipTextClasses }: CustomTooltipType) { return ( @@ -12,7 +12,7 @@ export function CustomTooltip({ children, placement, tooltipId, tooltipClasses, placement={placement} overlay={ - {tooltipText} + {typeof tooltipText === 'string' ? ({tooltipText}) : (tooltipText)} } > diff --git a/libs/remix-ui/helper/src/types/customtooltip.ts b/libs/remix-ui/helper/src/types/customtooltip.ts index 83cb2bb3a5..05178ebe08 100644 --- a/libs/remix-ui/helper/src/types/customtooltip.ts +++ b/libs/remix-ui/helper/src/types/customtooltip.ts @@ -6,5 +6,6 @@ export type CustomTooltipType = { placement?: Placement, tooltipId?: string, tooltipClasses?:string, - tooltipText: string + tooltipText: string | JSX.Element, + tooltipTextClasses?: string } \ No newline at end of file diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index b6441f8e61..60c2420067 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -3,9 +3,10 @@ import BasicLogo from 'libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo' import { ThemeContext } from '../themeContext' import React, { useEffect, useState, useRef, useContext } from 'react' -import { OverlayTrigger, Tooltip } from 'react-bootstrap'// eslint-disable-line +import { CustomTooltip } from '@remix-ui/helper' const _paq = window._paq = window._paq || [] // eslint-disable-line + function HomeTabTitle() { useEffect(() => { document.addEventListener("keyup", (e) => handleSearchKeyDown(e)) @@ -63,11 +64,13 @@ function HomeTabTitle() {
Remix - - Remix Youtube Playlist - - }> + - + - - Remix Twitter Profile - - }> + - + - - Remix Linkedin Profile - - }> + - + - - Remix Medium Posts - - }> + - + - - Remix Gitter channel - - }> + - +
The Native IDE for Web3 Development. diff --git a/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx b/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx index 8a8470304d..1b6bb08092 100644 --- a/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import React, { useContext } from 'react' import { ThemeContext } from '../themeContext' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' // eslint-disable-line +import { CustomTooltip } from '@remix-ui/helper' interface PluginButtonProps { imgPath: string, envID: string, @@ -30,13 +30,13 @@ function PluginButton ({ imgPath, envID, envText, callback, l2, description, rem { l2 && } { remixMaintained && - - Maintained by Remix - - }> + - + }
diff --git a/libs/remix-ui/run-tab/src/lib/components/account.tsx b/libs/remix-ui/run-tab/src/lib/components/account.tsx index 0dd64facc9..a74652ca61 100644 --- a/libs/remix-ui/run-tab/src/lib/components/account.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/account.tsx @@ -3,7 +3,7 @@ import React, { useEffect, useState, useRef } from 'react' import { CopyToClipboard } from '@remix-ui/clipboard' import { AccountProps } from '../types' import { PassphrasePrompt } from './passphrase' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' +import { CustomTooltip } from '@remix-ui/helper' export function AccountUI (props: AccountProps) { const { selectedAccount, loadedAccounts } = props.accounts @@ -151,15 +151,16 @@ export function AccountUI (props: AccountProps) {
- - {"Sign a message using this account"} - - }> + - +
) 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 25850555a4..b76748349e 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx @@ -2,10 +2,9 @@ import React, { useEffect, useRef, useState } from 'react' import { ContractDropdownProps, DeployMode } from '../types' import { ContractData, FuncABI } from '@remix-project/core-plugin' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' // eslint-disable-line import * as ethJSUtil from 'ethereumjs-util' import { ContractGUI } from './contractGUI' -import { deployWithProxyMsg, upgradeWithProxyMsg } from '@remix-ui/helper' +import { CustomTooltip, deployWithProxyMsg, upgradeWithProxyMsg } from '@remix-ui/helper' const _paq = window._paq = window._paq || [] export function ContractDropdownUI(props: ContractDropdownProps) { @@ -259,41 +258,37 @@ export function ContractDropdownUI(props: ContractDropdownProps) {
{compilerName && compilerName !== '' && }
{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.
- - }> + ( -
+ ) : null}
- - {contractOptions.title} - - } - > - - + + + {abiLabel.content}
@@ -323,11 +318,12 @@ export function ContractDropdownUI(props: ContractDropdownProps) { onChange={handleCheckedIPFS} checked={props.ipfsCheckedState} /> - - 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...)
- - }> + -
+
: '' }
or
- - {atAddressOptions.title} - - }> +
-
- - {"address of contract"} - - }> + + - +
diff --git a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx index 04dce73e53..652ffcd861 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx @@ -4,7 +4,7 @@ import * as remixLib from '@remix-project/remix-lib' import Web3 from 'web3' import { ContractGUIProps } from '../types' import { CopyToClipboard } from '@remix-ui/clipboard' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' +import { CustomTooltip } from '@remix-ui/helper' const txFormat = remixLib.execution.txFormat const txHelper = remixLib.execution.txHelper @@ -269,16 +269,11 @@ export function ContractGUI (props: ContractGUIProps) { className="udapp_contractActionsContainerSingle pt-2" style={{ display: toggleContainer ? "none" : "flex" }} > - - {buttonOptions.title} - - } + tooltipClasses="text-wrap" + tooltipId="remixUdappInstanceButtonTooltip" + tooltipText={buttonOptions.title} > - - + - - {props.funcABI.type === "fallback" || - props.funcABI.type === "receive" - ? `'(${props.funcABI.type}')` - : props.inputs} - - - } + tooltipClasses="text-nowrap" + tooltipId="remixContractGuiTooltip" + tooltipText={props.funcABI.type === "fallback" ||props.funcABI.type === "receive" ? `'(${props.funcABI.type}')` + : props.inputs} > - - 0 - ) - ? "hidden" - : "visible", - }} - > + + + 0 + ) + ? "hidden" + : "visible", + }} + > +
- - {inp.name} - - } + tooltipId="udappContractActionsTooltip" + tooltipClasses="text-nowrap" + tooltipText={inp.name} > { @@ -375,7 +369,7 @@ export function ContractGUI (props: ContractGUIProps) { placeholder={inp.type} data-id={`multiParamManagerInput${inp.name}`} /> - +
); })} @@ -411,16 +405,11 @@ export function ContractGUI (props: ContractGUIProps) { - - {buttonOptions.title} - - } + tooltipClasses="text-nowrap" + tooltipId="remixUdappInstanceButtonTooltip" + tooltipText={buttonOptions.title} > - +
{props.deployOption && (props.deployOption || []).length > 0 ? ( <> -
+
handleDeployProxySelect(e.target.checked)} checked={deployState.deploy} /> - +
{props.initializerOptions && @@ -489,15 +477,14 @@ export function ContractGUI (props: ContractGUIProps) { {" "} {inp.name}:{" "} - { - initializeFields.current[index] = el; - }} - style={{ height: 32 }} - className="form-control udapp_input" - placeholder={inp.type} - title={inp.name} - /> + { + initializeFields.current[index] = el; + }} + style={{ height: 32 }} + className="form-control udapp_input" + placeholder={inp.type} + />
); })} @@ -514,14 +501,13 @@ export function ContractGUI (props: ContractGUIProps) { onChange={(e) => handleUpgradeImpSelect(e.target.checked)} checked={deployState.upgrade} /> - +
- + +
{ !useLastProxy ?
- + validateProxyAddress(proxyAddress) } /> { proxyAddressError && { proxyAddressError } }
: diff --git a/libs/remix-ui/run-tab/src/lib/components/deployButton.tsx b/libs/remix-ui/run-tab/src/lib/components/deployButton.tsx index 08fa2843c7..579a103f36 100644 --- a/libs/remix-ui/run-tab/src/lib/components/deployButton.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/deployButton.tsx @@ -1,6 +1,7 @@ import React, { useState } from 'react' import { DeployButtonProps } from '../types' -import { ButtonGroup, Dropdown, OverlayTrigger, Tooltip } from 'react-bootstrap' +import { ButtonGroup, Dropdown } from 'react-bootstrap' +import { CustomTooltip } from '@remix-ui/helper' export function DeployButton (props: DeployButtonProps) { const [showOptions, setShowOptions] = useState(false) @@ -24,18 +25,16 @@ export function DeployButton (props: DeployButtonProps) { } : - - {props.buttonOptions.title} - - } + tooltipId="deployButtonTooltip" + tooltipClasses="text-nowrap" + tooltipText={props.buttonOptions.title} > - + } ) diff --git a/libs/remix-ui/run-tab/src/lib/components/deployInput.tsx b/libs/remix-ui/run-tab/src/lib/components/deployInput.tsx index c5dc153e42..d211bfc0b9 100644 --- a/libs/remix-ui/run-tab/src/lib/components/deployInput.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/deployInput.tsx @@ -1,5 +1,5 @@ +import { CustomTooltip } from '@remix-ui/helper' import React from 'react' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' import { DeployInputProps } from '../types' import { DeployButton } from './deployButton' @@ -7,13 +7,11 @@ export function DeployInput (props: DeployInputProps) { return (
- - {props.funcABI.type === 'fallback' || props.funcABI.type === 'receive' ? `'(${props.funcABI.type}')` : props.inputs} - - } + tooltipId="deployInputTooltip" + tooltipClasses="text-nowrap" + tooltipText={props.funcABI.type === 'fallback' || props.funcABI.type === 'receive' ? `'(${props.funcABI.type}')` : props.inputs} > - +
) } diff --git a/libs/remix-ui/run-tab/src/lib/components/environment.tsx b/libs/remix-ui/run-tab/src/lib/components/environment.tsx index b4a875b1b5..af7c0b043d 100644 --- a/libs/remix-ui/run-tab/src/lib/components/environment.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/environment.tsx @@ -2,8 +2,7 @@ import React from 'react' import { EnvironmentProps } from '../types' import { Dropdown } from 'react-bootstrap' -import { CustomMenu, CustomToggle } from '@remix-ui/helper' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' // eslint-disable-line +import { CustomMenu, CustomToggle, CustomTooltip } from '@remix-ui/helper' export function EnvironmentUI (props: EnvironmentProps) { @@ -29,13 +28,10 @@ export function EnvironmentUI (props: EnvironmentProps) { return (
@@ -43,13 +39,9 @@ export function EnvironmentUI (props: EnvironmentProps) { { isL2(currentProvider) && 'L2 - '} { currentProvider && currentProvider.content } - { currentProvider && bridges[currentProvider.value] && - Click to open a bridge for converting L1 mainnet ETH to the selected network currency. - - }> + { currentProvider && bridges[currentProvider.value] && - } + } { @@ -67,13 +59,10 @@ export function EnvironmentUI (props: EnvironmentProps) { } - - {"Click for docs about Environment"} - - }> + - +
) diff --git a/libs/remix-ui/run-tab/src/lib/components/gasPrice.tsx b/libs/remix-ui/run-tab/src/lib/components/gasPrice.tsx index 1dcd3fb57f..f831bdeaf2 100644 --- a/libs/remix-ui/run-tab/src/lib/components/gasPrice.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/gasPrice.tsx @@ -1,6 +1,6 @@ // eslint-disable-next-line no-use-before-define +import { CustomTooltip } from '@remix-ui/helper' import React from 'react' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' import { GasPriceProps } from '../types' export function GasPriceUI (props: GasPriceProps) { @@ -11,13 +11,14 @@ export function GasPriceUI (props: GasPriceProps) { return (
- - {"The default gas limit is 3M. Adjust as needed."} - - }> + - +
) } diff --git a/libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx b/libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx index 94cb03deba..36a8e0446b 100644 --- a/libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx @@ -1,6 +1,6 @@ // eslint-disable-next-line no-use-before-define +import { CustomTooltip } from '@remix-ui/helper' import React from 'react' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' import { InstanceContainerProps } from '../types' import { UniversalDappUI } from './universalDappUI' @@ -14,31 +14,27 @@ export function InstanceContainerUI (props: InstanceContainerProps) { return (
- - {"Autogenerated generic user interfaces for interaction with deployed contracts"} - - } + tooltipClasses="text-nowrap" + tooltipId="deployAndRunClearInstancesTooltip" + tooltipText={"Autogenerated generic user interfaces for interaction with deployed contracts"} > - + { instanceList.length > 0 ? ( - - {"Clear instances list and reset recorder"} - - } + tooltipClasses="text-nowrap" + tooltipId="deployAndRunClearInstancesTooltip" + tooltipText={"Clear instances list and reset recorder"} > - + ) : null }
diff --git a/libs/remix-ui/run-tab/src/lib/components/multiDeployInput.tsx b/libs/remix-ui/run-tab/src/lib/components/multiDeployInput.tsx index 8764750402..40aea41eaf 100644 --- a/libs/remix-ui/run-tab/src/lib/components/multiDeployInput.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/multiDeployInput.tsx @@ -1,5 +1,5 @@ -import React, { useRef, useState } from 'react' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' +import { CustomTooltip } from '@remix-ui/helper' +import React, { useRef } from 'react' import { MultiDeployInputProps } from '../types' import { DeployButton } from './deployButton' @@ -17,16 +17,14 @@ export function MultiDeployInput(props: MultiDeployInputProps) { return (
- - {inp.name} - - } + tooltipId="udappMultiArgTooltip" + tooltipClasses="text-nowrap" + tooltipText={inp.name} > { multiFields.current[index] = el }} className="form-control" placeholder={inp.type} data-id={`multiParamManagerInput${inp.name}`} /> - +
) })}
diff --git a/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx b/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx index c413e2ec90..b80aadea1f 100644 --- a/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx @@ -1,7 +1,7 @@ // eslint-disable-next-line no-use-before-define import React, {useRef, useState, useEffect} from 'react' import { RecorderProps } from '../types' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' // eslint-disable-line +import { CustomTooltip } from '@remix-ui/helper' export function RecorderUI (props: RecorderProps) { const inputLive = useRef() @@ -31,21 +31,22 @@ export function RecorderUI (props: RecorderProps) {
- - {'The number of recorded transactions'} - - }> +
{props.count}
-
- - Save transactions (deployed contracts and function executions) and replay them in another environment.
e.g Transactions created in Remix VM can be replayed in the Injected Provider. -
- - }> + + -
+
@@ -56,43 +57,44 @@ export function RecorderUI (props: RecorderProps) {
- - If contracts are updated after recording transactions, checking this box
will run recorded transactions with the latest copy of the compiled contracts
- - }> - -
+ + +
- - - { + - - }> + > - - - Run transaction(s) from the current scenario file - - }> + + - +
diff --git a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx index b9bdfa82ed..4c6b89133b 100644 --- a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx @@ -7,9 +7,8 @@ import * as remixLib from '@remix-project/remix-lib' import * as ethJSUtil from 'ethereumjs-util' import { ContractGUI } from './contractGUI' import { TreeView, TreeViewItem } from '@remix-ui/tree-view' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' // eslint-disable-line import { BN } from 'ethereumjs-util' -import { is0XPrefixed, isHexadecimal, isNumeric, shortenAddress } from '@remix-ui/helper' +import { CustomTooltip, is0XPrefixed, isHexadecimal, isNumeric, shortenAddress } from '@remix-ui/helper' const txHelper = remixLib.execution.txHelper @@ -244,13 +243,11 @@ export function UniversalDappUI (props: UdappProps) {
- - {'Remove from the list'} - - } + tooltipClasses="text-nowrap" + tooltipId="udapp_udappCloseTooltip" + tooltipText="Remove from the list" > - +
Low level interactions
- - {"check out docs for using 'receive'/'fallback'"} - - } + tooltipClasses="text-wrap" + tooltipId="receiveEthDocstoolTip" + tooltipText={"check out docs for using 'receive'/'fallback'"} > - +
- - {"The Calldata to send to fallback function of the contract."} - - } + tooltipClasses="text-nowrap" + tooltipId="deployAndRunLLTxCalldataInputTooltip" + tooltipText="The Calldata to send to fallback function of the contract." > - - + - Send data to contract. - - } + tooltipClasses="text-nowrap" + tooltipId="deployAndRunLLTxCalldataTooltip" + tooltipText="Send data to contract." > - +
diff --git a/libs/remix-ui/run-tab/src/lib/components/value.tsx b/libs/remix-ui/run-tab/src/lib/components/value.tsx index 3e23867aee..d4cd484a60 100644 --- a/libs/remix-ui/run-tab/src/lib/components/value.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/value.tsx @@ -1,9 +1,8 @@ // eslint-disable-next-line no-use-before-define import React, { useEffect, useRef, useState } from 'react' import { BN } from 'ethereumjs-util' -import { isNumeric } from '@remix-ui/helper' +import { CustomTooltip, isNumeric } from '@remix-ui/helper' import { ValueProps } from '../types' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' export function ValueUI (props: ValueProps) { const [sendValue, setSendValue] = useState(props.sendValue) @@ -50,11 +49,12 @@ export function ValueUI (props: ValueProps) {
- - {"Enter an amount and choose its unit"} - - }> + - - { props.setUnit((e.target.value) as 'ether' | 'finney' | 'gwei' | 'wei') }}> diff --git a/libs/remix-ui/search/src/lib/components/Find.tsx b/libs/remix-ui/search/src/lib/components/Find.tsx index 284a2d07ba..dd39d0a1c6 100644 --- a/libs/remix-ui/search/src/lib/components/Find.tsx +++ b/libs/remix-ui/search/src/lib/components/Find.tsx @@ -1,4 +1,5 @@ -import React, { useContext, useEffect, useRef, useState } from 'react' +import { CustomTooltip } from '@remix-ui/helper' +import React, { useContext, useEffect, useState } from 'react' import { SearchContext } from '../context/context' export const Find = () => { @@ -42,48 +43,66 @@ export const Find = () => { onKeyUp={handleKeypress} >
-
{ - toggleCaseSensitive() - }} - >
-
{ - toggleMatchWholeWord() - }} - >
-
{ - toggleUseRegex() - }} - >
+ +
{ + toggleCaseSensitive() + }} + >
+
+ +
{ + toggleMatchWholeWord() + }} + >
+
+ +
{ + toggleUseRegex() + }} + >
+
diff --git a/libs/remix-ui/search/src/lib/components/FindContainer.tsx b/libs/remix-ui/search/src/lib/components/FindContainer.tsx index 7bd5d5ba1c..ed52d893fd 100644 --- a/libs/remix-ui/search/src/lib/components/FindContainer.tsx +++ b/libs/remix-ui/search/src/lib/components/FindContainer.tsx @@ -1,3 +1,4 @@ +import { CustomTooltip } from '@remix-ui/helper' import React, { useContext, useEffect, useState } from 'react' import { SearchContext } from '../context/context' import { Find } from './Find' @@ -13,18 +14,24 @@ export const FindContainer = props => { }, [expanded]) return (
-
+ +
+
{expanded ? diff --git a/libs/remix-ui/search/src/lib/components/results/ResultFileName.tsx b/libs/remix-ui/search/src/lib/components/results/ResultFileName.tsx index 303e8da21e..333c608a9b 100644 --- a/libs/remix-ui/search/src/lib/components/results/ResultFileName.tsx +++ b/libs/remix-ui/search/src/lib/components/results/ResultFileName.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react' import { SearchResult } from '../../types' -import { getPathIcon } from '@remix-ui/helper' +import { CustomTooltip, getPathIcon } from '@remix-ui/helper' import * as path from 'path' interface ResultItemProps { file: SearchResult @@ -18,10 +18,17 @@ export const ResultFileName = (props: ResultItemProps) => { return ( <> {icon ?
: null} -
- {path.basename(props.file.path)} - {path.dirname(props.file.path)} -
+ +
+ {path.basename(props.file.path)} + {path.dirname(props.file.path)} +
+
) } diff --git a/libs/remix-ui/search/src/lib/components/results/ResultSummary.tsx b/libs/remix-ui/search/src/lib/components/results/ResultSummary.tsx index 0d4a640a04..ad6141ecbc 100644 --- a/libs/remix-ui/search/src/lib/components/results/ResultSummary.tsx +++ b/libs/remix-ui/search/src/lib/components/results/ResultSummary.tsx @@ -1,5 +1,6 @@ import { useDialogDispatchers } from '@remix-ui/app' +import { CustomTooltip } from '@remix-ui/helper' import React, { useContext } from 'react' import { SearchContext } from '../../context/context' import { SearchResult, SearchResultLine, SearchResultLineLine } from '../../types' @@ -53,9 +54,16 @@ export const ResultSummary = (props: ResultSummaryProps) => {
{state.replaceEnabled?
-
{ - replace(lineItem) - }} className="codicon codicon-find-replace" role="button" aria-label="Replace" aria-disabled="false">
+ +
{ + replace(lineItem) + }} className="codicon codicon-find-replace" role="button" aria-label="Replace" aria-disabled="false">
+
:null}
))} diff --git a/libs/remix-ui/settings/src/lib/etherscan-settings.tsx b/libs/remix-ui/settings/src/lib/etherscan-settings.tsx index 344b6e49f8..afb9259120 100644 --- a/libs/remix-ui/settings/src/lib/etherscan-settings.tsx +++ b/libs/remix-ui/settings/src/lib/etherscan-settings.tsx @@ -1,4 +1,5 @@ import { CopyToClipboard } from '@remix-ui/clipboard' +import { CustomTooltip } from '@remix-ui/helper' import React, { useEffect, useState } from 'react' import { EtherscanSettingsProps } from '../types' import { etherscanTokenTitle, etherscanAccessTokenText, etherscanAccessTokenText2, etherscanTokenLink } from './constants' @@ -48,7 +49,13 @@ export function EtherscanSettings (props: EtherscanSettingsProps) {
- + +
diff --git a/libs/remix-ui/settings/src/lib/github-settings.tsx b/libs/remix-ui/settings/src/lib/github-settings.tsx index 09c50bb34e..345a7ae6bf 100644 --- a/libs/remix-ui/settings/src/lib/github-settings.tsx +++ b/libs/remix-ui/settings/src/lib/github-settings.tsx @@ -1,4 +1,5 @@ import { CopyToClipboard } from '@remix-ui/clipboard' +import { CustomTooltip } from '@remix-ui/helper' import React, { useEffect, useState } from 'react' import { GithubSettingsProps } from '../types' import { gitAccessTokenTitle, gitAccessTokenText, gitAccessTokenText2, gitAccessTokenLink } from './constants' @@ -73,7 +74,14 @@ export function GithubSettings (props: GithubSettingsProps) { handleChangeEmailState(e)} value={ githubEmail } />
- + + +
diff --git a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx index b31313726d..fcdb76a41c 100644 --- a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx +++ b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx @@ -9,6 +9,7 @@ import { Toaster } from '@remix-ui/toaster'// eslint-disable-line import { RemixUiThemeModule, ThemeModule} from '@remix-ui/theme-module' import { GithubSettings } from './github-settings' import { EtherscanSettings } from './etherscan-settings' +import { CustomTooltip } from '@remix-ui/helper' /* eslint-disable-next-line */ export interface RemixUiSettingsProps { @@ -154,25 +155,32 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => { const displayErrorsChecked = props.config.get('settings/display-errors') || false return (
-
- -
+ }}>Reset to Default settings +
+
General settings
diff --git a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx index 1ea42d038a..7fcccfb4ad 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -2,11 +2,10 @@ import React, { useEffect, useState, useRef, useReducer } from 'react' // eslint import semver from 'semver' import { CompilerContainerProps } from './types' import { ConfigurationSettings } from '@remix-project/remix-lib-ts' -import { checkSpecialChars, extractNameFromKey } from '@remix-ui/helper' +import { checkSpecialChars, CustomTooltip, extractNameFromKey } from '@remix-ui/helper' import { canUseWorker, baseURLBin, baseURLWasm, urlFromVersion, pathToURL, promisedMiniXhr } from '@remix-project/remix-solidity' import { compilerReducer, compilerInitialState } from './reducers/compiler' import { resetEditorMode, listenToEvents } from './actions/compiler' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' // eslint-disable-line import { getValidLanguage } from '@remix-project/remix-solidity' import { CopyToClipboard } from '@remix-ui/clipboard' import { configFileContent } from './compilerConfiguration' @@ -725,26 +724,22 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
- - {"Add a custom compiler with URL"} - - } + tooltipId="promptCompilerTooltip" + tooltipClasses="text-nowrap" + tooltipText={"Add a custom compiler with URL"} > promptCompiler()}> - - + - {"See compiler license"} - - } + tooltipId="showCompilerTooltip" + tooltipClasses="text-nowrap" + tooltipText={"See compiler license"} > showCompilerLicense()}> - + - - Learn how to use Hardhat Compilation - - }> + Learn how to use Hardhat Compilation} + > - +
} @@ -791,13 +787,14 @@ export const CompilerContainer = (props: CompilerContainerProps) => { - - Learn how to use Truffle Compilation - - }> + Learn how to use Truffle Compilation} + > - +
} @@ -820,19 +817,17 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
- - {'Language specification available from Compiler >= v0.5.7'} - - } + tooltipId="compilerLabelTooltip" + tooltipClasses="text-nowrap" + tooltipText={{'Language specification available from Compiler >= v0.5.7'}} > - +
@@ -863,21 +858,19 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
- {(!showFilePathInput && state.useFileConfiguration) && - + tooltipId="configfileTooltip" + tooltipClasses="text-nowrap" + tooltipText={ Click to open the config file - - - } + } > { } : async () => { await openFile() }} className="py-2 remixui_compilerConfigPath" >{configFilePath === '' ? 'No file selected.' : configFilePath} - } + } {(!showFilePathInput && !state.useFileConfiguration) && {configFilePath}} {
} + > {} Compile {typeof state.compiledFileName === 'string' ? extractNameFromKey(state.compiledFileName) || '' : ''} - +
} + > Compile and Run script - + - -
+
Choose the script to execute right after compilation by adding the `dev-run-script` natspec tag, as in:
                     
@@ -947,11 +941,10 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
                     
                   
Click to know more -
- - }> +
} + > - + '@custom:dev-run-script file_path'} direction='top'>
{/* Copy to Clipboard */}
diff --git a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx index 98d297b8b9..8dbf12b281 100644 --- a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx +++ b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx @@ -2,12 +2,12 @@ import React, { useState, useRef, useEffect, ReactElement } from 'react' // esli import * as semver from 'semver' import { eachOfSeries } from 'async' // eslint-disable-line import type Web3 from 'web3' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' import { canUseWorker, urlFromVersion } from '@remix-project/remix-solidity' import { Renderer } from '@remix-ui/renderer' // eslint-disable-line import { Toaster } from '@remix-ui/toaster' // eslint-disable-line import { format } from 'util' import './css/style.css' +import { CustomTooltip } from '@remix-ui/helper' const _paq = (window as any)._paq = (window as any)._paq || [] // eslint-disable-line @typescript-eslint/no-explicit-any @@ -297,26 +297,21 @@ export const SolidityUnitTesting = (props: Record) => { // eslint-d let label if (index > -1) { const className = "alert-danger d-inline-block mb-1 mr-1 p-1 failed_" + runningTestFileName - label = ( - At least one contract test failed - - }>
- FAIL -
) + label = ( +
FAIL
+
) } else { const className = "alert-success d-inline-block mb-1 mr-1 p-1 passed_" + runningTestFileName - label = ( - All contract tests passed - - }>
- PASS -
) + label = ( +
PASS
+
) } // show contract and file name with label const ContractCard: ReactElement = ( @@ -343,11 +338,14 @@ export const SolidityUnitTesting = (props: Record) => { // eslint-d const { web3, debugTxHash } = test debugBtn = (
startDebug(debugTxHash, web3)}> - - Start debugging - - }> + + +
) } @@ -674,13 +672,11 @@ export const SolidityUnitTesting = (props: Record) => { // eslint-d }) } - - {"Press 'Enter' to change the path for test files."} - - } + tooltipClasses="text-nowrap" + tooltipId="uiPathInputtooltip" + tooltipText={"Press 'Enter' to change the path for test files."} > ) => { // eslint-d onChange={handleTestDirInput} onClick = {() => { if (inputPathValue === '/') setInputPathValue('')} } /> - - + - Create a test folder - - } + tooltipClasses="text-nowrap" + tooltipId="uiPathInputButtontooltip" + tooltipText="Create a test folder" > - +
- - Generate a sample test file - - } placement={'bottom-start'}> + - - - Check out documentation. - - } placement={'bottom-start'}> - + + + - - + +
- - - {runButtonTitle} - - - }> + - +
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 787aa4483d..b6567c020b 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,5 @@ +import { CustomTooltip } from '@remix-ui/helper' import React from 'react' //eslint-disable-line -import { OverlayTrigger, Tooltip } from 'react-bootstrap' interface StaticAnalyserButtonProps { onClick: (event) => void @@ -18,18 +18,16 @@ const StaticAnalyserButton = ({ classList += disabled ? " disabled" : "" return ( ) } diff --git a/libs/remix-ui/static-analyser/src/lib/ErrorRenderer.tsx b/libs/remix-ui/static-analyser/src/lib/ErrorRenderer.tsx index 54c3dbb06e..6d31911895 100644 --- a/libs/remix-ui/static-analyser/src/lib/ErrorRenderer.tsx +++ b/libs/remix-ui/static-analyser/src/lib/ErrorRenderer.tsx @@ -1,3 +1,4 @@ +import { CustomTooltip } from '@remix-ui/helper'; import React from 'react' //eslint-disable-line interface ErrorRendererProps { @@ -53,7 +54,14 @@ const ErrorRenderer = ({ message, opt, editor, name }: ErrorRendererProps) => { ? more : } - Pos: {opt.locationString} + + Pos: {opt.locationString} +
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 4692eaf8b2..4e780b6752 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 @@ -8,8 +8,8 @@ import { RemixUiCheckbox } from '@remix-ui/checkbox' // eslint-disable-line import ErrorRenderer from './ErrorRenderer' // eslint-disable-line import { compilation } from './actions/staticAnalysisActions' import { initialState, analysisReducer } from './reducers/staticAnalysisReducer' -import { OverlayTrigger, Tooltip } from 'react-bootstrap'// eslint-disable-line import { CodeAnalysis } from '@remix-project/remix-analyzer' +import { CustomTooltip } from '@remix-ui/helper' declare global { interface Window { @@ -521,13 +521,14 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { /> - - Learn how to use Slither Analysis - - }> + Learn how to use Slither Analysis} + > - + } diff --git a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx index 07f66efff3..88228e6cb4 100644 --- a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx +++ b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx @@ -1,8 +1,8 @@ import { fileDecoration, FileDecorationIcons } from '@remix-ui/file-decorators' +import { CustomTooltip } from '@remix-ui/helper' import { Plugin } from '@remixproject/engine' import React, { useState, useRef, useEffect, useReducer } from 'react' // eslint-disable-line -import { OverlayTrigger, Tooltip } from 'react-bootstrap' // eslint-disable-line import { Tab, Tabs, TabList, TabPanel } from 'react-tabs' import './remix-ui-tabs.css' const _paq = window._paq = window._paq || [] @@ -160,16 +160,16 @@ export const TabsUI = (props: TabsUIProps) => { } }} > - - + {(tabsState.currentExt === 'js' || tabsState.currentExt === 'ts') ? "Run script (CTRL + SHIFT + S)" : tabsState.currentExt === 'sol' || tabsState.currentExt === 'yul'? "Compile CTRL + S" : "Select .sol or .yul file to compile or a .ts or .js file and run it"} - - - }> + } + > - + props.onZoomOut()}> props.onZoomIn()}> diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx index 45b293381b..49fc4393ce 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx @@ -1,5 +1,5 @@ +import { CustomTooltip } from '@remix-ui/helper' import React, { useState, useEffect } from 'react' //eslint-disable-line -import { OverlayTrigger, Tooltip } from 'react-bootstrap' import { Placement } from 'react-bootstrap/esm/Overlay' import { FileExplorerMenuProps } from '../types' const _paq = window._paq = window._paq || [] @@ -53,27 +53,23 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => { return ( <> - - {props.title} - - } + tooltipId="remixuilabelTooltip" + tooltipClasses="text-nowrap" + tooltipText={props.title} > { props.title } - + { state.menuItems.map(({ action, title, icon, placement }, index) => { if (action === 'uploadFile') { return ( - - {title} - - } + tooltipId="uploadFileTooltip" + tooltipClasses="text-nowrap" + tooltipText={title} > - + ) } else { return ( - - {title} - - } + tooltipId={`${action}-${title}-${icon}-${index}`} + tooltipClasses="text-nowrap" + tooltipText={title} > { key={`${action}-${title}-${index}`} > - + ) } })} diff --git a/libs/remix-ui/workspace/src/lib/components/file-label.tsx b/libs/remix-ui/workspace/src/lib/components/file-label.tsx index 94d53f8a8c..4490273e12 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-label.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-label.tsx @@ -70,13 +70,12 @@ export const FileLabel = (props: FileLabelProps) => { onKeyDown={handleEditInput} onBlur={handleEditBlur} > - - {file.name} - + + {file.name} + ) } diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index e7fe3f0b30..dd0716d6d6 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect, useRef, useContext, SyntheticEvent, ChangeEvent, KeyboardEvent } from 'react' // eslint-disable-line -import { Dropdown, OverlayTrigger, Tooltip } from 'react-bootstrap' -import { CustomIconsToggle, CustomMenu, CustomToggle } from '@remix-ui/helper' +import { Dropdown } from 'react-bootstrap' +import { CustomIconsToggle, CustomMenu, CustomToggle, CustomTooltip } from '@remix-ui/helper' import { FileExplorer } from './components/file-explorer' // eslint-disable-line import { FileSystemContext } from './contexts' import './css/remix-ui-workspace.css' @@ -336,13 +336,11 @@ export function Workspace () { } const workspaceMenuIcons = [ - - Create - - } + tooltipId="createWorkspaceTooltip" + tooltipClasses="text-nowrap" + tooltipText="Create" >
Create
-
, - , + - Delete Workspace - - } + tooltipId="createWorkspaceTooltip" + tooltipClasses="text-nowrap" + tooltipText="Delete Workspace" >
{'Delete'}
-
, - , + - Rename Workspace - - } + tooltipClasses="text-nowrap" + tooltipId="workspaceRenametooltip" + tooltipText="Rename Workspace" >
{ renameCurrentWorkspace() @@ -426,15 +420,13 @@ export function Workspace () { {'Rename'}
-
, + , , - - Clone Git Repository - - } + tooltipId="cloneWorkspaceTooltip" + tooltipClasses="text-nowrap" + tooltipText="Clone Git Repository" >
{'Clone'}
-
, + , , - - Download Workspace - - } + tooltipId="createWorkspaceTooltip" + tooltipClasses="text-nowrap" + tooltipText="Download Workspace" >
{'Download'}
-
, - , + - Restore Workspace Backup - - } + tooltipId="createWorkspaceTooltip" + tooltipClasses="text-nowrap" + tooltipText="Restore Workspace Backup" >
{'Restore'}
-
, + , ] return ( @@ -538,13 +526,11 @@ export function Workspace () {
{currentWorkspace !== LOCALHOST ? ( - - Create - - } + tooltipId="createWorkspaceTooltip" + tooltipClasses="text-nowrap" + tooltipText="Create" > - + hideIconsMenu(!showIconsMenu)} show={showIconsMenu}>