Skip to content

Add labels.address: none to hide address labels - #8

Merged
iharhl merged 2 commits into
mainfrom
feature/hide-addresses
Nov 12, 2026
Merged

iharhl merged 2 commits into
mainfrom
feature/hide-addresses

Conversation

@iharhl

@iharhl iharhl commented Nov 12, 2026

Copy link
Copy Markdown
Owner

What

A third value for labels.address: none draws no address labels, for drawings where only the order and size of blocks matter (file formats, packet layouts, structs).

  • memmap/schema.py: labels.address accepts start | both | none.
  • memmap/layout/labels.py: with none, build_labels emits nothing for the column ends, internal edges or edges at unfilled space. An edge with a top_label override still prints, so none plus one override labels just that edge.
  • The left gutter is sized from the labels, so it shrinks to zero without further changes. Columns with bands keep room for their band numbers.
  • Settable in view.defaults or per column, like the other label options. (Expansions take no labels; set it on the detail column.)

Example

New examples/ota_package_format.yaml: an OTA update package (header, manifest, signature, payload) with a zoom into the header fields, sizes shown and addresses hidden. The zoom sits on the left, where the hidden addresses leave room, so its fan lines stay clear of the notes; it uses offset: 40.

Reviewer notes

  • Existing goldens are unchanged, since the default stays start. One new golden: tests/golden/example_ota_package.svg.
  • Recipe added to AGENTS.md (Hide addresses: view.defaults.labels.address: none), covered by tests/test_cli.py.
  • Not done: routing.column_box still reserves a line above and below each column for end addresses, so stacked zoom columns with hidden addresses keep a slightly larger gap than they need. Harmless; can be tightened later.
  • uv run pytest (608 passed), uv run mypy and uv run ruff check pass locally.

🤖 Generated with Claude Code

iharhl and others added 2 commits November 13, 2026 00:31
A third value for labels.address draws no addresses: not at the column
ends, not between blocks and not at unfilled space. An edge with a
top_label override still prints its address, so none plus one override
labels just that edge. The left gutter shrinks to nothing on its own,
as it is sized from the labels; columns with bands keep room for their
band numbers.

Like the other label options it can be set in view.defaults or on one
column. Add the recipe to AGENTS.md and tests for the mode, overrides,
the gutter and a single column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Draw a file format instead of memory: an update package with header,
manifest, signature and payload, and a zoom into the header fields.
Only order and size matter, so it uses labels.address: none with byte
sizes shown. The zoom sits to the left, where the hidden addresses
leave room, so its fan lines stay clear of the notes, and is offset
down 40 px. Add a golden and a README row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iharhl
iharhl merged commit 2c7cd75 into main Nov 12, 2026
3 checks passed
@iharhl
iharhl deleted the feature/hide-addresses branch November 14, 2026 10:21
@iharhl iharhl mentioned this pull request Nov 14, 2026
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