From 866d0508456bcd5876c4e566e869c04d7b099c3f Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 15 Aug 2022 10:02:29 +0200 Subject: [PATCH] debugger redesign improvements --- .../src/tests/solidityUnittests.test.ts | 1 - .../src/lib/vm-debugger/assembly-items.tsx | 5 +++-- .../src/lib/vm-debugger/calldata-panel.tsx | 2 +- .../src/lib/vm-debugger/code-list-view.tsx | 4 ++-- .../src/lib/vm-debugger/dropdown-panel.tsx | 4 ++-- .../lib/vm-debugger/full-storages-changes.tsx | 4 ++-- .../src/lib/vm-debugger/solidity-locals.tsx | 4 ++-- .../src/lib/vm-debugger/step-detail.tsx | 4 ++-- .../src/lib/vm-debugger/vm-debugger-head.tsx | 10 +++++----- .../src/lib/vm-debugger/vm-debugger.tsx | 20 +++++++++---------- libs/remix-ui/debugger-ui/src/types/index.ts | 1 + 11 files changed, 30 insertions(+), 29 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index a62a2fe932..8c8a65b7f6 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -287,7 +287,6 @@ module.exports = { .waitForElementContainsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER', 60000) .waitForElementContainsText('*[data-id="functionPanel"]', 'checkWinningProposalFailed()', 60000) .waitForElementVisible('*[data-id="dropdownPanelSolidityLocals"]').pause(1000) - .click('*[data-id="dropdownPanelSolidityLocals"]') .waitForElementContainsText('*[data-id="solidityLocals"]', 'no locals', 60000) .goToVMTraceStep(316) .waitForElementContainsText('*[data-id="functionPanel"]', 'checkWinningProposalFailed()', 60000) diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx index b32b229f0b..815681529b 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx @@ -122,9 +122,10 @@ export const AssemblyItems = ({ registerEvent }) => { } return ( -
+
-
+
+ { assemblyItems.display.length == 0 &&
No data available
}
{ assemblyItems.display.map((item, i) => { diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/calldata-panel.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/calldata-panel.tsx index a8d5e5a736..c33dce048b 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/calldata-panel.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/calldata-panel.tsx @@ -1,7 +1,7 @@ import React from 'react' // eslint-disable-line import DropdownPanel from './dropdown-panel' // eslint-disable-line -export const CalldataPanel = ({ calldata, className }) => { +export const CalldataPanel = ({ calldata, className = "" }) => { return (
diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/code-list-view.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/code-list-view.tsx index 59df67d5ee..657f5b6f07 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/code-list-view.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/code-list-view.tsx @@ -1,9 +1,9 @@ import React, { useState, useEffect } from 'react' // eslint-disable-line import AssemblyItems from './assembly-items' // eslint-disable-line -export const CodeListView = ({ registerEvent }) => { +export const CodeListView = ({ registerEvent, className = ""}) => { return ( -
+
) diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx index 468dbe744a..5b1b5115cb 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx @@ -194,7 +194,7 @@ export const DropdownPanel = (props: DropdownPanelProps) => { const uniquePanelName = dropdownName.split(' ').join('') return ( -
+
{dropdownName}
{header} @@ -202,7 +202,7 @@ export const DropdownPanel = (props: DropdownPanelProps) => {
-
+
{ state.data && diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/full-storages-changes.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/full-storages-changes.tsx index c7aa2e14da..acfe871891 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/full-storages-changes.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/full-storages-changes.tsx @@ -1,9 +1,9 @@ import React from 'react' // eslint-disable-line import { DropdownPanel } from './dropdown-panel' // eslint-disable-line -export const FullStoragesChanges = ({ calldata }) => { +export const FullStoragesChanges = ({ calldata, className = "" }) => { return ( -
+
) diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-locals.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-locals.tsx index e201255520..51913796af 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-locals.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-locals.tsx @@ -3,7 +3,7 @@ import DropdownPanel from './dropdown-panel' // eslint-disable-line import { extractData } from '../../utils/solidityTypeFormatter' // eslint-disable-line import { ExtractData } from '../../types' // eslint-disable-line -export const SolidityLocals = ({ data, message, registerEvent, triggerEvent, className }) => { +export const SolidityLocals = ({ data, message, registerEvent, triggerEvent, className = "" }) => { const [calldata, setCalldata] = useState(null) useEffect(() => { @@ -43,7 +43,7 @@ export const SolidityLocals = ({ data, message, registerEvent, triggerEvent, cla } return ( -
+
{ +export const StepDetail = ({ stepDetail, className = "" }) => { return ( -
+
) diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger-head.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger-head.tsx index 47f7b18631..0c96ccfcb8 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger-head.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger-head.tsx @@ -100,13 +100,13 @@ export const VmDebuggerHead = ({ vmDebugger: { registerEvent, triggerEvent } }) return (
- - - + + +
- - + +
) diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger.tsx index 31d04d94f8..9ef337123b 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger.tsx @@ -53,17 +53,17 @@ export const VmDebugger = ({ vmDebugger: { registerEvent }, currentBlock, curren return (
-
- - - - +
+ + + +
-
- - - - +
+ + + +
) diff --git a/libs/remix-ui/debugger-ui/src/types/index.ts b/libs/remix-ui/debugger-ui/src/types/index.ts index 5168102bb5..a319e354be 100644 --- a/libs/remix-ui/debugger-ui/src/types/index.ts +++ b/libs/remix-ui/debugger-ui/src/types/index.ts @@ -20,6 +20,7 @@ export type RegisterEventType = (type: string, listener: any) => void // listene export type TriggerEventType = (type: string, payload: Array) => void export interface DropdownPanelProps { dropdownName: string, + className?: string, dropdownMessage?: string, calldata?: { [key: string]: string