web: rework trace drawer layout and add instruction-object panel#254
Merged
Conversation
Fix the trace playground drawer so it fills the drawer height instead of collapsing to content height and leaving dead space below. The layout column now uses an explicit full-height grid track, and the instructions/state row grows while its header stays fixed. Render the full instruction list (removing the '...N above/below' elision) with the list scrolling internally within its panel; the active step is kept scrolled into view as the trace advances. Add a footer panel that shows the selected step's full ethdebug/format/instruction object (offset, operation, context) as formatted JSON, gated by a toggle that defaults on.
Contributor
|
The instructions/state row still rendered at content height because .trace-panels is itself a grid with no explicit row track: its single implicit row was auto-sized, so the panels never stretched to the grid's flex-grown height. Give .trace-panels (and its mobile variant) an explicit minmax(0, 1fr) row so the panels fill the drawer and the instructions list scrolls internally. Default the ethdebug/format/instruction footer toggle to off.
The instructions panel stayed fixed-height because the class names .opcodes-panel / .opcode-list are shared with the sibling TraceViewer component, whose global (non-module-scoped) stylesheet caps them with min-height: 200px; max-height: 300px. Those caps leaked onto the drawer. Scope the drawer's rules as .trace-panel.opcodes-panel to outrank the leaked single-class rule and reset max-height: none / min-height: 0 so the panel grows to fill its grid cell.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The trace playground drawer had two layout problems: the instructions/state row collapsed to its content height, leaving dead space below when the drawer was tall, and the instruction list was elided down to a window around the current step ("...N above/below").
This reworks the drawer's right-hand column into a flex column that fills the drawer:
ethdebug/format/instructionobject (offset, operation, context) as formatted JSON. A toggle in the footer header enables/disables it; it defaults on. When off, the instructions/state row reclaims the space.Display-only; no trace or compilation semantics change. Best viewed on the deploy preview (open the trace playground and step through).