Skip to content

Commit bcbbf45

Browse files
committed
icon for jump buttons
1 parent 575c631 commit bcbbf45

File tree

2 files changed

+60
-45
lines changed

2 files changed

+60
-45
lines changed

libs/remix-ui/debugger-ui/src/lib/debug-layout/debug-layout.css

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,22 @@
338338
.jump-debug-btn {
339339
display: flex;
340340
align-items: center;
341-
padding: 2px 5px;
342-
height: 22px;
343-
font-size: 11px;
341+
justify-content: center;
342+
padding: 0;
343+
width: 20px;
344+
height: 20px;
345+
font-size: 12px;
344346
border: none;
345-
border-radius: 10px;
347+
background: transparent;
348+
color: var(--text-muted);
346349
transition: all 0.2s;
347350
cursor: pointer;
348-
font-family: var(--bs-body-font-family);
351+
border-radius: 3px;
352+
}
353+
354+
.jump-debug-btn:hover {
355+
color: var(--bs-info);
356+
background: rgba(var(--bs-info-rgb), 0.1);
349357
}
350358

351359
.debug-section .call-trace-type.transaction {

libs/remix-ui/debugger-ui/src/lib/debug-layout/debug-layout.tsx

Lines changed: 47 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -614,63 +614,70 @@ export const DebugLayout = ({
614614
</>
615615
)}
616616
</span>
617-
{/* Navigation action buttons - show for external calls and parent calls with children */}
618-
{!scope.isSenderNode && (hasChildren || opcode === 'CALL' || opcode === 'DELEGATECALL' || opcode === 'STATICCALL' ||
619-
opcode === 'CREATE' || opcode === 'CREATE2' || callTypeLabel === 'INTERNAL') && (
617+
{/* Navigation action buttons - show for all non-sender nodes */}
618+
{!scope.isSenderNode && (scope.firstStep !== undefined || scope.lastStep !== undefined) && (
620619
<div className="call-trace-actions">
621620
{scope.firstStep !== undefined && (
622-
<button
623-
className="btn btn-primary btn-sm jump-debug-btn fw-bold"
624-
onClick={(e) => {
625-
e.stopPropagation()
626-
if (stepManager && stepManager.jumpTo) {
627-
// Use functionEntryStep if available (skips dispatcher), otherwise use firstStep
628-
const stepToJump = scope.functionEntryStep !== undefined ? scope.functionEntryStep : scope.firstStep
629-
stepManager.jumpTo(stepToJump)
630-
}
631-
}}
632-
>
633-
Jump Into
634-
</button>
635-
)}
636-
{scope.lastStep !== undefined && (
637-
<>
621+
<CustomTooltip tooltipText="Jump Into" tooltipId={`jump-into-${scope.scopeId}`} placement="top">
638622
<button
639-
className="btn btn-primary btn-sm jump-debug-btn fw-bold"
623+
className="jump-debug-btn"
640624
onClick={(e) => {
641625
e.stopPropagation()
642626
if (stepManager && stepManager.jumpTo) {
643-
stepManager.jumpTo(scope.lastStep)
627+
// Use functionEntryStep if available (skips dispatcher), otherwise use firstStep
628+
const stepToJump = scope.functionEntryStep !== undefined ? scope.functionEntryStep : scope.firstStep
629+
stepManager.jumpTo(stepToJump)
644630
}
645631
}}
646632
>
647-
Jump End
633+
<i className="fas fa-sign-in-alt"></i>
648634
</button>
635+
</CustomTooltip>
636+
)}
637+
{scope.lastStep !== undefined && (
638+
<>
639+
<CustomTooltip tooltipText="Jump End" tooltipId={`jump-end-${scope.scopeId}`} placement="top">
640+
<button
641+
className="jump-debug-btn"
642+
onClick={(e) => {
643+
e.stopPropagation()
644+
if (stepManager && stepManager.jumpTo) {
645+
stepManager.jumpTo(scope.lastStep)
646+
}
647+
}}
648+
>
649+
<i className="fas fa-step-forward"></i>
650+
</button>
651+
</CustomTooltip>
652+
<CustomTooltip tooltipText="Jump Over" tooltipId={`jump-over-${scope.scopeId}`} placement="top">
653+
<button
654+
className="jump-debug-btn"
655+
onClick={(e) => {
656+
e.stopPropagation()
657+
if (stepManager && stepManager.jumpTo) {
658+
stepManager.jumpTo(scope.lastStep + 1)
659+
}
660+
}}
661+
>
662+
<i className="fas fa-level-down-alt"></i>
663+
</button>
664+
</CustomTooltip>
665+
</>
666+
)}
667+
{isSelected && stepManager && stepManager.jumpOut && (
668+
<CustomTooltip tooltipText="Jump Out" tooltipId={`jump-out-${scope.scopeId}`} placement="top">
649669
<button
650-
className="btn btn-primary btn-sm jump-debug-btn fw-bold"
670+
className="jump-debug-btn"
651671
onClick={(e) => {
652672
e.stopPropagation()
653-
if (stepManager && stepManager.jumpTo) {
654-
stepManager.jumpTo(scope.lastStep + 1)
673+
if (stepManager && stepManager.jumpOut) {
674+
stepManager.jumpOut(true) // true for solidity mode
655675
}
656676
}}
657677
>
658-
Jump Over
678+
<i className="fas fa-sign-out-alt"></i>
659679
</button>
660-
</>
661-
)}
662-
{isSelected && stepManager && stepManager.jumpOut && (
663-
<button
664-
className="btn btn-primary btn-sm jump-debug-btn fw-bold"
665-
onClick={(e) => {
666-
e.stopPropagation()
667-
if (stepManager && stepManager.jumpOut) {
668-
stepManager.jumpOut(true) // true for solidity mode
669-
}
670-
}}
671-
>
672-
Jump Out
673-
</button>
680+
</CustomTooltip>
674681
)}
675682
</div>
676683
)}

0 commit comments

Comments
 (0)