Skip to content

Info pane: Legend + Explore split, plus a view & chrome polish pass#89

Merged
thalida merged 19 commits into
mainfrom
feat/issue-88-legend
Jul 12, 2026
Merged

Info pane: Legend + Explore split, plus a view & chrome polish pass#89
thalida merged 19 commits into
mainfrom
feat/issue-88-legend

Conversation

@thalida

@thalida thalida commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Closes #88.

Started as issue #88's "How this city is built" Legend and grew (by request) into a cohesive Info-pane, view, and chrome pass.

Legend (the #88 ask)

  • New static Legend subtab: each world layer renders as an accented header + a cue → meaning key, plus a "Reading the city" group (root gem, hover fade). Purely explanatory — no rendering change.
  • Audited every data-driven encoding in the renderer and put the salient ones in the key:
    • Buildings — height ← lines, footprint ← file size, color & roof icon ← file type, brightness ← recent edits, grime & lean ← age.
    • Billboards — shape ← aspect ratio, width ← file size, video ← play button.
    • Streets — width ← file count, length ← content, label ← name.
    • Forest — height ← commit age, canopy ← commit size, color ← day busyness, position ← age.
    • Fireflies — color ← author identity, size ← commit count.

Sidebar information architecture

  • Info = interpret → Overview + Legend.
  • Explore = browse (new pane, Compass icon) → File tree + Readme. Readme moved out of Info; TreePane became body-only (ExplorePane owns the chrome), mirroring InfoPane.
  • The left sidebar now starts closed and force-closes (reset to Info) on every world load; its open state is no longer persisted.

Camera

  • New World → Camera section: live Elevation + Azimuth sliders that set the angle the default view frames the city from (always looking at the root gem). Autosave + ChangeRoute.Live, so dragging re-frames immediately (the rig subscribes and snaps). Framing direction moved from hardcoded constants to a pure, unit-tested computeFramingDir().
  • Default framing is a near-horizon 5° / 0°.

Chrome polish

  • Search: field moved into the pane header (one compact row), uniform padding, single-click/Enter to select (dropped double-click-to-focus).
  • Shortcuts modal: vague "General" → labeled Keyboard / Mouse sections.
  • Settings: "Updates" tab → Live updates.
  • Close buttons: sidebar/pane × matches the app-header icon buttons; modal × is large + square.
  • Project switcher: dropped the redundant Map icon (freed for the Legend).
  • Right sidebar: defaults to a third of the viewport.

Single-sourcing / cleanup

  • Layer copy consolidated into one LAYER_LEGEND in almanac.ts; Overview tooltips compose from it.
  • Per-layer accents promoted to shared --cc-layer-* tokens (Legend, Overview, landing icons, StreetPane); streets retuned to teal.
  • SECTION_ICON lifted to a shared module.

Verification

just lint + just test green — 2485 tests, including new LegendPane, ExplorePane, and computeFramingDir coverage plus updated Info/Explore/sidebar/search/close-button tests. Eyeballed live via just dev.

thalida and others added 5 commits July 11, 2026 20:26
Consolidate each world layer's title + encoding rule into one exported
LAYER_LEGEND in almanac.ts (was split across the section builders and a
private SECTION_TIPS); the builders read title+tip from it. Lift SECTION_ICON
to a shared sectionIcons module and relocate the --sec-accent map to
InfoPane.css scoped to .info-body, so the upcoming Legend subtab and the
Overview sections read one source for copy, icon, and accent.

Normalize the buildings/forest rules to colons (house style bans em-dashes in
visible copy) since they are about to become prominent legend text.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A static "Legend" subtab (Overview | Legend | Readme) promotes the per-layer
encoding rules from hidden section-header tooltips into an always-visible
map-key: each world layer as accented icon + name + its one-line rule, read
verbatim from LAYER_LEGEND. A "Reading the city" group covers the two
non-layer cues (root gem, hover fade). Purely explanatory: no rendering change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…okens

Promote the five per-layer accent hues to shared --cc-layer-* tokens so the
Info Legend + Overview section accents, the landing 'what it does' cue icons,
and StreetPane all read one source instead of hand-copied hexes. Retune the
streets accent to teal so it no longer reads as the fireflies gold.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Audited every data-driven visual encoding across buildings, billboards,
streets, forest, and fireflies. Restructure LAYER_LEGEND from one rule string
per layer into a lead line + cue → meaning rows, and render each layer as an
accented header + that key. Overview section tooltips compose from the same
source. Covers the previously-missing cues: building color/roof-icon (file
type) and grime/lean (age); billboard width + video play button; street
length; tree color (day busyness) + age-ordered position; firefly size
(commit count).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The chip already carries the repo label, @Branch pill, and a ChevronsUpDown
switch cue, so the leading icon was redundant; removing it also frees the Map
glyph to unambiguously mean the Info Legend.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@thalida thalida linked an issue Jul 12, 2026 that may be closed by this pull request
thalida and others added 14 commits July 11, 2026 22:43
Reframe the left rail: Info now hosts Overview + Legend (computed facts + how
to read them), and a new Explore pane hosts the File tree + Readme (the repo's
actual content). Readme moves out of Info; the Tree section becomes Explore
(Compass icon) with PaneTabs, mirroring InfoPane's shell.

TreePane becomes body-only (ExplorePane owns the Pane chrome + tab strip), its
layout custom-props move onto .tree-root. Tests updated for the moved Readme,
the tree/explore rename, and body-only TreePane; adds ExplorePane subtab
coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The search input replaces the 'Search' title bar and shares the header row with
the close button (a .pane-header--search variant, like --tabs), folding two
rows into one for a tighter pane. Keeps an aria-label since the visible title
is gone.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Search results keep single-click / Enter to select; the double-click focus
interaction is removed. Prunes the now-dead onFocus prop and its focusPath
wiring in LeftSidebar, plus the covering test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the single vague 'General' heading (which sat only above the keyboard
keys, leaving the mouse group unlabelled) with two clear sections. Drops the
in-list null divider now that each group carries its own heading.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The shared PaneCloseButton drops btn-icon--text for a plain .btn-icon (24x24),
so the sidebar/pane × matches the icon-only buttons in the app header. Modal
closes keep their large btn-icon--lg treatment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a World > Camera section with two live sliders that set the direction the
default view frames the city from; the camera stays targeted on the root gem.
The CAMERA store is autosave (write-through) and ChangeRoute.Live, so dragging
a slider re-frames immediately: the cameraRig subscribes to the store and
hard-snaps to the freshly-computed pose.

The offset direction moves from two hardcoded constants (FRAMING_DIR_Y/LATERAL)
to computeFramingDir(elevation, azimuth, streetAxis) — a pure, unit-tested
helper. Defaults (44°/17°) reproduce the previous framing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The sidebar no longer opens by default or restores an open state — it starts
collapsed and is force-closed (and reset to Info) whenever a world commits, so
a fresh load or world switch shows the city unobscured. The open state is no
longer persisted; drop the now-unused leftSidebarCollapsed storage key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@thalida thalida changed the title Info tab: add a "How this city is built" Legend subtab Info pane: Legend + Explore split, plus a view & chrome polish pass Jul 12, 2026
@thalida thalida merged commit 3d96aeb into main Jul 12, 2026
1 check passed
@thalida thalida deleted the feat/issue-88-legend branch July 12, 2026 04:02
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.

Info tab: add a "How this city is built" legend section

1 participant