From b06f28a419f49a4cb35efbafbcd846cbd0b56f14 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Tue, 27 Sep 2022 11:12:40 +0100 Subject: [PATCH] add checkbox and button tooltips --- .../debugger-ui/src/lib/debugger-ui.tsx | 20 ++++++++++++++----- .../src/lib/tx-browser/tx-browser.tsx | 15 ++++++++++++-- 2 files changed, 28 insertions(+), 7 deletions(-) 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 ea3b53855b..df51c8a512 100644 --- a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx @@ -9,6 +9,7 @@ import { Toaster } from '@remix-ui/toaster' // eslint-disable-line import { 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) => { @@ -121,7 +122,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { }) debuggerInstance.event.register('newSourceLocation', async (lineColumnPos, rawLocation, generatedSources, address) => { - if (!lineColumnPos) { + if (!lineColumnPos) { await debuggerModule.discardHighlight() setState(prevState => { return { ...prevState, sourceLocationStatus: 'Source location not available, neither in Sourcify nor in Etherscan. Please make sure the Etherscan api key is provided in the settings.' } @@ -351,12 +352,21 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
- { + + {"Debug with generated sources"} + + } placement="top-start" + > + + { setState(prevState => { return { ...prevState, opt: { ...prevState.opt, debugWithGeneratedSources: checked } } }) - }} type="checkbox" title="Debug with generated sources" /> + }} type="checkbox" /> + +
{ state.isLocalNodeUsed &&
{ @@ -371,11 +381,11 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
{ state.debugging && state.sourceLocationStatus &&
{state.sourceLocationStatus}
} - { !state.debugging && + { !state.debugging &&
- When Debugging with a transaction hash, + When Debugging with a transaction hash, if the contract is verified, Remix will try to fetch the source code from Sourcify or Etherscan. Put in your Etherscan API key in the Remix settings. For supported networks, please see: https://sourcify.dev & https://etherscan.io/contractsVerified 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 eb0ebd6914..59a992dd6d 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,4 +1,5 @@ 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 }) => { @@ -67,12 +68,22 @@ export const TxBrowser = ({ requestDebug, updateTxNumberFlag, unloadRequested, t