Skip to content

Visualizer: global variables in a footer that doesn't scroll (P53) - #60

Merged
cedricvogel-leo merged 1 commit into
mainfrom
feature/globals-footer
Nov 13, 2026
Merged

cedricvogel-leo merged 1 commit into
mainfrom
feature/globals-footer

Conversation

@cedricvogel-leo

Copy link
Copy Markdown
Collaborator

P53. With a long program or deeply nested call boxes, the column of global variables beside the code had scrolled out of view, so the arrow from a call to a global function ended outside the view. Nested boxes also grew into the column.

Footer (GlobalsFooter, .visualizer-globals)

  • The module's variables are in a footer below the scrolling view (.visualizer-view), both inside .visualizer-frame. It looks the same at every width, and the code gets the full width.
  • Entries show name and value as the column did (auswerten Funktion, x 3, abbreviated lists). They sit in a row that wraps, at most about 3 lines high, and scroll beyond that.
  • A program without globals has no footer. A program with globals has it from the start. An invisible layer with the last step's entries keeps its height, so the code area and the embed's height don't change while stepping.

Hover box (.visualizer-globals-peek)

  • Opens on hover (mouse, trackpad, pen), on a tap (touch) or on focus. Mouse, touch and pen all go through pointer events.
  • Shows a function's (or class's) whole definition, highlighted with glpython-python, even while that call is open as a box. The definition is found by globalDefinitionSource: the last def the module ran, else a module-level def in a project file. Any other value is shown in full, with its length, and with its tree under listTree.
  • It opens upwards with its bottom edge at the pointer, and is moved left where it would stick out of the visualizer. At most the visualizer's width and ⅔ of its height; longer content scrolls inside.
  • It stays open while the pointer moves into it. It closes when the pointer leaves both the entry and the box, on a tap elsewhere, or with Escape.

Arrows

  • An arrow with an end in the footer is drawn in a layer over the view and the footer (layer: 'frame') and runs vertically.
  • All arrows are measured again when the view scrolls or resizes, because the footer and a sticky row don't scroll with the code.
  • A new call box flies in from its function's footer entry.

Sticky variable row

  • The current call's box (.frame-box--current: the active frame, or the box hosting the active inline call) keeps its variable row at the view's bottom edge while the box is on screen.
  • Only that box does this, so rows never stack. The row has an opaque background and its existing top border.
  • Following the current line takes the sticky row's height into account.

Strings: visualizerGlobals (de/en), the footer's label for screen readers. The type labels reuse valueKind*.

Checks: test:console

  • New case: the footer sits below the code; an arrow runs from lang's entry; the tall box's variable row sits above the footer; the hover box shows the definition, highlighted, inside the frame and scrolling; no footer without globals.
  • Updated cases: a global's full value and its tree are now checked in the hover box, which replaces the old column's click-to-dialog and inline trees.
  • The steady-height check now waits for animations to finish before measuring.

Lint, both builds and every other check pass.

🤖 Generated with Claude Code

The module's variables leave the column beside the code for a footer below
the visualizer's view, at every width; the code gets the full width. Hover,
tap or focus on an entry opens a box over the code, upwards from the
pointer: a function's definition, highlighted, or the full value (and its
tree). Arrows to and from globals end at their footer entry, drawn over view
and footer and measured again on scroll. The current call's box keeps its
variable row sticky at the view's bottom.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cedricvogel-leo
cedricvogel-leo merged commit 3bdf4c3 into main Nov 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant