debugger fixes

pull/5370/head
lianahus 1 year ago
parent d3664008d4
commit 49f0e3a82c
  1. 2
      apps/remix-ide/src/app/tabs/debugger-tab.js
  2. 1
      apps/remix-ide/src/app/tabs/locales/en/debugger.json
  3. 1
      apps/remix-ide/src/app/tabs/locales/es/debugger.json
  4. 1
      apps/remix-ide/src/app/tabs/locales/fr/debugger.json
  5. 1
      apps/remix-ide/src/app/tabs/locales/zh/debugger.json
  6. 4
      apps/remix-ide/src/assets/css/themes/bootstrap-cerulean.min.css
  7. 4
      apps/remix-ide/src/assets/css/themes/bootstrap-cyborg.min.css
  8. 4
      apps/remix-ide/src/assets/css/themes/bootstrap-flatly.min.css
  9. 4
      apps/remix-ide/src/assets/css/themes/bootstrap-spacelab.min.css
  10. 2
      apps/remix-ide/src/assets/css/themes/remix-black_undtds.css
  11. 2
      apps/remix-ide/src/assets/css/themes/remix-candy_ikhg4m.css
  12. 2
      apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css
  13. 2
      apps/remix-ide/src/assets/css/themes/remix-hacker_owl.css
  14. 2
      apps/remix-ide/src/assets/css/themes/remix-light_powaqg.css
  15. 2
      apps/remix-ide/src/assets/css/themes/remix-midcentury_hrzph3.css
  16. 2
      apps/remix-ide/src/assets/css/themes/remix-unicorn.css
  17. 2
      apps/remix-ide/src/assets/css/themes/remix-violet.css
  18. 2
      libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts
  19. 10
      libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.css
  20. 24
      libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx
  21. 2
      libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
  22. 26
      libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx
  23. 2
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
  24. 4
      libs/remix-ui/vertical-icons-panel/src/lib/reducers/iconBadgeReducer.ts
  25. 2
      libs/remix-ui/workspace/src/lib/css/file-explorer-context-menu.css

@ -5,7 +5,7 @@ import { ViewPlugin } from '@remixproject/engine-web'
import * as packageJson from '../../../../../package.json'
import React from 'react' // eslint-disable-line
import { bleach } from '@remix-ui/helper'
import { compilationFinishedToastMsg, compilingToastMsg, localCompilationToastMsg, notFoundToastMsg, sourceVerificationNotAvailableToastMsg } from '@remix-ui/helper'
import { compilationFinishedToastMsg, compilingToastMsg, notFoundToastMsg, sourceVerificationNotAvailableToastMsg } from '@remix-ui/helper'
const css = require('./styles/debugger-tab-styles')
const profile = {

@ -2,6 +2,7 @@
"debugger.displayName": "Debugger",
"debugger.debuggerConfiguration": "Debugger Configuration",
"debugger.stopDebugging": "Stop debugging",
"debugger.provideTxNumber": "Please provide a valid transaction hash",
"debugger.startDebugging": "Start debugging",
"debugger.placeholder": "Transaction hash, should start with 0x",
"debugger.debugLocaNodeLabel": "Force using local node",

@ -2,6 +2,7 @@
"debugger.displayName": "Debugger",
"debugger.debuggerConfiguration": "Debugger Configuration",
"debugger.stopDebugging": "Stop debugging",
"debugger.provideTxNumber": "Please provide a valid transaction hash",
"debugger.startDebugging": "Start debugging",
"debugger.placeholder": "Transaction hash, should start with 0x",
"debugger.debugLocaNodeLabel": "Force using local node",

@ -2,6 +2,7 @@
"debugger.displayName": "Debugger",
"debugger.debuggerConfiguration": "Debugger Configuration",
"debugger.stopDebugging": "Stop debugging",
"debugger.provideTxNumber": "Please provide a valid transaction hash",
"debugger.startDebugging": "Start debugging",
"debugger.placeholder": "Transaction hash, should start with 0x",
"debugger.debugLocaNodeLabel": "Forcer l'utilisation d'un noeud local",

@ -2,6 +2,7 @@
"debugger.displayName": "调试器",
"debugger.debuggerConfiguration": "调试器配置",
"debugger.stopDebugging": "停止调试",
"debugger.provideTxNumber": "Please provide a valid transaction hash",
"debugger.startDebugging": "开始调试",
"debugger.placeholder": "交易哈希, 应该以 0x 开头",
"debugger.debugLocaNodeLabel": "强制使用本地节点",

@ -2118,6 +2118,7 @@ textarea.form-control {
}
.btn {
cursor: pointer;
display:inline-block;
font-weight:400;
color:#495057;
@ -2150,7 +2151,8 @@ textarea.form-control {
box-shadow:0 0 0 .2rem rgba(47,164,231,.25)
}
.btn.disabled,.btn:disabled {
opacity:.65
opacity:.65;
cursor: not-allowed
}
.btn:not(:disabled):not(.disabled) {
cursor:pointer

@ -2119,6 +2119,7 @@ textarea.form-control {
}
.btn {
cursor: pointer;;
display:inline-block;
font-weight:400;
color:#adafae;
@ -2151,7 +2152,8 @@ textarea.form-control {
box-shadow:0 0 0 .2rem rgba(42,159,214,.25)
}
.btn.disabled,.btn:disabled {
opacity:.65
opacity:.65;
cursor: not-allowed;
}
.btn:not(:disabled):not(.disabled) {
cursor:pointer

@ -2121,6 +2121,7 @@ textarea.form-control {
}
.btn {
cursor: pointer;
display:inline-block;
font-weight:400;
color:#212529;
@ -2152,7 +2153,8 @@ textarea.form-control {
box-shadow:0 0 0 .2rem rgba(44,62,80,.25)
}
.btn.disabled,.btn:disabled {
opacity:.65
opacity:.65;
cursor: not-allowed;
}
.btn:not(:disabled):not(.disabled) {
cursor:pointer

@ -2121,6 +2121,7 @@ textarea.form-control {
}
.btn {
cursor: pointer;
display:inline-block;
font-weight:400;
color:#777;
@ -2153,7 +2154,8 @@ textarea.form-control {
box-shadow:0 0 0 .2rem rgba(68,110,155,.25)
}
.btn.disabled,.btn:disabled {
opacity:.65
opacity:.65;
cursor: not-allowed
}
.btn:not(:disabled):not(.disabled) {
cursor:pointer

@ -2096,6 +2096,7 @@ textarea.form-control.is-invalid {
}
}
.btn {
cursor: pointer;
display: inline-block;
font-weight: 400;
color: #d5d5d5;
@ -2127,6 +2128,7 @@ textarea.form-control.is-invalid {
.btn.disabled,
.btn:disabled {
opacity: 0.65;
cursor: not-allowed
}
a.btn.disabled,
fieldset:disabled a.btn {

@ -2314,6 +2314,7 @@ textarea.form-control.is-invalid {
}
.btn {
cursor: pointer;
display: inline-block;
font-weight: 400;
color: #0f7292;
@ -2346,6 +2347,7 @@ textarea.form-control.is-invalid {
.btn.disabled,
.btn:disabled {
opacity: 0.7;
cursor: not-allowed
}
a.btn.disabled,

@ -2097,6 +2097,7 @@ textarea.form-control.is-invalid {
}
}
.btn {
cursor: pointer;
display: inline-block;
font-weight: 400;
color: #fff;
@ -2128,6 +2129,7 @@ textarea.form-control.is-invalid {
.btn.disabled,
.btn:disabled {
opacity: 0.65;
cursor: not-allowed
}
a.btn.disabled,
fieldset:disabled a.btn {

@ -2111,6 +2111,7 @@ textarea.form-control.is-invalid {
}
}
.btn {
cursor: pointer;
display: inline-block;
font-weight: 400;
color: #fff;
@ -2142,6 +2143,7 @@ textarea.form-control.is-invalid {
.btn.disabled,
.btn:disabled {
opacity: 0.65;
cursor: not-allowed;
}
a.btn.disabled,
fieldset:disabled a.btn {

@ -2310,6 +2310,7 @@ textarea.form-control.is-invalid {
}
.btn {
cursor: pointer;
display: inline-block;
font-weight: 400;
color: #2e3145;
@ -2342,6 +2343,7 @@ textarea.form-control.is-invalid {
.btn.disabled,
.btn:disabled {
opacity: 0.7;
cursor: not-allowed;
}
a.btn.disabled,

@ -2315,6 +2315,7 @@ textarea.form-control.is-invalid {
}
.btn {
cursor: pointer;
display: inline-block;
font-weight: 400;
color: #062809;
@ -2347,6 +2348,7 @@ textarea.form-control.is-invalid {
.btn.disabled,
.btn:disabled {
opacity: 0.7;
cursor: not-allowed;
}
a.btn.disabled,

@ -2313,6 +2313,7 @@ textarea.form-control.is-invalid {
}
.btn {
cursor: pointer;
display: inline-block;
font-weight: 400;
color: #2e3145;
@ -2346,6 +2347,7 @@ textarea.form-control.is-invalid {
.btn.disabled,
.btn:disabled {
opacity: 0.7;
cursor: not-allowed;
}
a.btn.disabled,

@ -2310,6 +2310,7 @@ textarea.form-control.is-invalid {
}
.btn {
cursor: pointer;
display: inline-block;
font-weight: 400;
color: #2e3145;
@ -2342,6 +2343,7 @@ textarea.form-control.is-invalid {
.btn.disabled,
.btn:disabled {
opacity: 0.7;
cursor: not-allowed;
}
a.btn.disabled,

@ -163,7 +163,7 @@ export const DebuggerApiMixin = (Base) => class extends Base {
else this._web3 = this.initialWeb3
init.extendWeb3(this._web3)
if (this.onDebugRequestedListener) {
this.onDebugRequestedListener(hash, web3).then((debuggerBackend) => {
this.onDebugRequestedListener(hash, this._web3).then((debuggerBackend) => {
this.debuggerBackend = debuggerBackend
})
}

@ -9,8 +9,6 @@
align-items: center;
color: #fff;
}
.stepButton {
}
.stepButtonDisabled {
background-color: #005573;
@ -29,11 +27,9 @@
align-items: center;
color: #fff;
}
.jumpButton {
}
.jumpButtonDisabled {
background-color: var(--grey);
background-color: var(--gray);
border-color: #005573;
}
@ -42,10 +38,6 @@
background-color: #005573;
border-color: #005573;
}
.navigator {
}
.navigator:hover {
}
.cursorPointerRemixDebugger {
cursor: pointer;

@ -66,13 +66,13 @@ export const ButtonNavigation = ({
}
const stepBtnStyle = 'd-flex align-items-center justify-content-center btn btn-primary btn-sm stepButton h-75 m-0 p-1'
const disableStepBtnStyle = 'stepButtonDisabled'
const disableJumpBtnStyle = 'jumpButtonDisabled'
const disableStepBtnStyle = 'disabled'
const disableJumpBtnStyle = 'disabled'
const stepMarkupStructure = {
stepOverBackJSX: {
markup: (
<div
className={state.overBackDisabled ? `${stepBtnStyle} ${disableStepBtnStyle}` : `${stepBtnStyle}`}
className={`${state.overBackDisabled ? 'disabled ' : ''} ${stepBtnStyle}`}
onClick={() => {
stepOverBack && stepOverBack()
}}
@ -97,7 +97,7 @@ export const ButtonNavigation = ({
stepBackJSX: {
markup: (
<div
className={state.intoBackDisabled ? `${stepBtnStyle} ${disableStepBtnStyle}` : `${stepBtnStyle}`}
className={`${state.intoBackDisabled ? 'disabled ' : ''} ${stepBtnStyle}`}
onClick={() => {
stepIntoBack && stepIntoBack()
}}
@ -126,7 +126,7 @@ export const ButtonNavigation = ({
stepIntoJSX: {
markup: (
<div
className={state.intoForwardDisabled ? `${stepBtnStyle} ${disableStepBtnStyle}` : `${stepBtnStyle}`}
className={`${state.intoForwardDisabled ? 'disabled ' : ''} ${stepBtnStyle}`}
onClick={() => {
stepIntoForward && stepIntoForward()
}}
@ -154,7 +154,7 @@ export const ButtonNavigation = ({
stepOverForwardJSX: {
markup: (
<div
className={state.overForwardDisabled ? `${stepBtnStyle} ${disableStepBtnStyle}` : `${stepBtnStyle}`}
className={`${state.overForwardDisabled ? 'disabled ' : ''} ${stepBtnStyle}`}
onClick={() => {
stepOverForward && stepOverForward()
}}
@ -183,7 +183,7 @@ export const ButtonNavigation = ({
jumpPreviousBreakpointJSX: {
markup: (
<div
className={state.jumpPreviousBreakpointDisabled ? `${stepBtnStyle} ${disableJumpBtnStyle}` : `${stepBtnStyle}`}
className={`${state.jumpPreviousBreakpointDisabled ? 'disabled ' : ''} ${stepBtnStyle}`}
id="buttonNavigatorJumpPreviousBreakpointContainer"
onClick={() => {
jumpPreviousBreakpoint && jumpPreviousBreakpoint()
@ -191,7 +191,7 @@ export const ButtonNavigation = ({
data-id="buttonNavigatorJumpPreviousBreakpoint"
>
<button
className="btn btn-link btn-sm jumpButton m-0 p-0"
className="btn btn-link btn-sm m-0 p-0"
id="jumppreviousbreakpoint"
data-id="buttonNavigatorJumpPreviousBreakpoint"
onClick={() => {
@ -215,7 +215,7 @@ export const ButtonNavigation = ({
jumpOutJSX: {
markup: (
<div
className={state.jumpOutDisabled ? `${stepBtnStyle} ${disableStepBtnStyle}` : `${stepBtnStyle}`}
className={`${state.jumpOutDisabled ? 'disabled ' : ''} ${stepBtnStyle}`}
onClick={() => {
jumpOut && jumpOut()
}}
@ -223,7 +223,7 @@ export const ButtonNavigation = ({
id="buttonNavigatorJumpOutContainer"
>
<button
className="btn btn-link btn-sm jumpButton m-0 p-0"
className="btn btn-link btn-sm m-0 p-0"
id="jumpout"
onClick={() => {
jumpOut && jumpOut()
@ -247,7 +247,7 @@ export const ButtonNavigation = ({
jumpNextBreakpointJSX: {
markup: (
<div
className={state.jumpNextBreakpointDisabled ? `${stepBtnStyle} ${disableStepBtnStyle}` : `${stepBtnStyle}`}
className={`${state.jumpNextBreakpointDisabled ? 'disabled ' : ''} ${stepBtnStyle}`}
onClick={() => {
jumpNextBreakpoint && jumpNextBreakpoint()
}}
@ -255,7 +255,7 @@ export const ButtonNavigation = ({
id="buttonNavigatorJumpNextBreakpointContainer"
>
<button
className="btn btn-link btn-sm jumpButton m-0 p-0"
className={`${state.jumpNextBreakpointDisabled ? 'disabled' : ''} btn btn-link btn-sm m-0 p-0`}
id="jumpnextbreakpoint"
data-id="buttonNavigatorJumpNextBreakpoint"
onClick={() => {

@ -391,7 +391,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
}}
type="checkbox"
/>
<label data-id="debugGeneratedSourcesLabel" className="form-check-label custom-control-label" htmlFor="debugGeneratedSourcesInput">
<label data-id="debugGeneratedSourcesLabel" className="pt-1 form-check-label custom-control-label" htmlFor="debugGeneratedSourcesInput">
<FormattedMessage id="debugger.useGeneratedSources" />
(Solidity {'>='} v0.7.2)
</label>

@ -1,11 +1,12 @@
import {CustomTooltip} from '@remix-ui/helper'
import {CustomTooltip, isValidHash} from '@remix-ui/helper'
import React, {useState, useEffect, useRef} from 'react' //eslint-disable-line
import {useIntl, FormattedMessage} from 'react-intl'
import './tx-browser.css'
export const TxBrowser = ({requestDebug, updateTxNumberFlag, unloadRequested, transactionNumber, debugging}) => {
const [state, setState] = useState({
txNumber: ''
txNumber: '',
isTxNumberValid: false
})
const inputValue = useRef(null)
@ -16,12 +17,14 @@ export const TxBrowser = ({requestDebug, updateTxNumberFlag, unloadRequested, tr
setState((prevState) => {
return {
...prevState,
txNumber: transactionNumber
txNumber: transactionNumber,
isTxNumberValid: isValidHash(transactionNumber),
}
})
}, [transactionNumber])
}, [transactionNumber, debugging])
const handleSubmit = () => {
if (!state.txNumber || !state.isTxNumberValid) return
if (debugging) {
unload()
} else {
@ -34,14 +37,10 @@ export const TxBrowser = ({requestDebug, updateTxNumberFlag, unloadRequested, tr
}
const txInputChanged = (value) => {
// todo check validation of txnumber in the input element, use
// required
// oninvalid="setCustomValidity('Please provide a valid transaction number, must start with 0x and have length of 22')"
// pattern="^0[x,X]+[0-9a-fA-F]{22}"
// this.state.txNumberInput.setCustomValidity('')
setState((prevState) => {
return {
...prevState,
isTxNumberValid: isValidHash(value),
txNumber: value
}
})
@ -50,19 +49,20 @@ export const TxBrowser = ({requestDebug, updateTxNumberFlag, unloadRequested, tr
const txInputOnInput = () => {
updateTxNumberFlag(!inputValue.current.value)
}
const customJSX = (
<div
id="debuggerTransactionStartButtonContainer"
data-id="debuggerTransactionStartButton"
onClick={handleSubmit}
className="btn btn-primary btn-sm btn-block text-decoration-none"
className={`${!state.isTxNumberValid ? 'disabled ' : ''} btn btn-primary btn-sm btn-block text-decoration-none`}
>
<button
className="btn btn-link btn-sm btn-block h-75 p-0 m-0 text-decoration-none"
className={`${!state.isTxNumberValid ? 'disabled ' : ''} btn btn-link btn-sm btn-block h-75 p-0 m-0 text-decoration-none`}
id="load"
onClick={handleSubmit}
data-id="debuggerTransactionStartButton"
disabled={!state.txNumber}
disabled={!state.txNumber || !state.isTxNumberValid}
style={{pointerEvents: 'none', color: 'white'}}
>
<span>
@ -91,7 +91,7 @@ export const TxBrowser = ({requestDebug, updateTxNumberFlag, unloadRequested, tr
<div className="d-flex justify-content-center w-100 btn-group py-1">
<CustomTooltip
placement="bottom"
tooltipText={<FormattedMessage id={`debugger.${debugging ? 'stopDebugging' : 'startDebugging'}`} />}
tooltipText={<FormattedMessage id={`debugger.${!state.isTxNumberValid ? 'provideTxNumber' : debugging ? 'stopDebugging' : 'startDebugging'}`} />}
tooltipId={'debuggingButtontooltip'}
tooltipClasses="text-nowrap"
>

@ -296,7 +296,7 @@ export function ContractGUI(props: ContractGUIProps) {
: buttonOptions.title
}
>
<div className="d-flex wrapperElement" onClick={handleActionClick} data-id={buttonOptions.dataId} data-title={buttonOptions.title}>
<div className="d-flex btn p-0 wrapperElement" onClick={handleActionClick} data-id={buttonOptions.dataId} data-title={buttonOptions.title}>
<button
className={`udapp_instanceButton text-nowrap overflow-hidden text-truncate ${props.widthClass} btn btn-sm ${buttonOptions.classList}`}
data-id={buttonOptions.dataId}

@ -1,7 +1,5 @@
import { checkSpecialChars } from '@remix-ui/helper'
import { checkSpecialChars, bleach } from '@remix-ui/helper'
import { BadgeStatus, IconStatus } from '../components/Icon'
import { bleach } from '@remix-ui/helper'
export type IconBadgeReducerAction = {
readonly type: string

@ -11,8 +11,6 @@
}
.remixui_liitem
{
padding: 2px;
padding-left: 6px;
cursor: pointer;
color: var(--text-dark);
background-color: var(--light);

Loading…
Cancel
Save