Skip to content

Feat/map selection highlight polish - #740

Merged
gaidheal1 merged 10 commits into
developmentfrom
feat/map-selection-highlight-polish
Aug 9, 2026
Merged

Feat/map selection highlight polish#740
gaidheal1 merged 10 commits into
developmentfrom
feat/map-selection-highlight-polish

Conversation

@gaidheal1

Copy link
Copy Markdown
Member

This pull request introduces several UI and code structure improvements focused on detail card layouts, list compactness, and button styling, as well as refactors supporting components for greater flexibility and maintainability. The most notable changes are grouped below.

Detail Card and Panel Refactoring:

  • Refactored DetailCard to remove the "right" placement variant and extracted the header/content layout into a new DetailCardBody component, simplifying the code and clarifying the separation between modal and docked panel variants. [1] [2] [3] [4] [5]
  • Enhanced DetailSurface to accept a custom container prop, allowing dialogs to be portaled into a specific DOM node (enabling map-relative positioning for docked panels). [1] [2]

List Component and Styling Enhancements:

  • Added a compact prop to List for denser list layouts, and improved hover/select styling for better usability in nested panels (e.g., for residents/workers lists in BuildingDetail). [1] [2] [3] [4] [5] [6] [7] [8] [9]

Button Component and Styling Updates:

  • Introduced a size prop (with a new small option) and improved icon sizing and alignment in Button, supporting more compact header buttons. [1] [2] [3] [4]

Character and Building Detail Improvements:

  • Improved the ordering and conditional rendering of facts in CharacterDetail for better clarity, and updated the tooltip test to reflect the new display logic. [1] [2] [3]

Testing and Test Utilities:

  • Enhanced the FakeMap test utility to support setPaintProperty and configurable queryRenderedFeatures results, enabling more robust and flexible map-related tests. [1] [2] [3]

These changes collectively improve UI consistency, component reusability, and test coverage, while laying the groundwork for more flexible and maintainable detail panel layouts.

gaidheal1 and others added 10 commits August 9, 2026 21:40
…d hover affordance

Fades the selected-building/character outline in via a paint-opacity
transition instead of snapping instantly, swaps the hardcoded #ffb703
for the semantic accent color, and adds a dimmer hover-only preview
ring on buildings/characters. Also fixes the hover rings rendering at
full opacity instead of their intended dimmer resting state.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds a `compact` prop to the shared List component (tighter item
padding/gap) and applies it to BuildingDetail's residents/workers
lists, which are nested inside an already-dense detail panel.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011H8vdMQa7b5tHiz32seC6v
…l character tooltips

- A character standing inside a building was triggering both the
  building's and the character's hover outline at once, since MapLibre
  fires per-layer mousemove handlers independently for overlapping
  features. The buildings-fill hover handler now checks whether the
  same point also hits the "characters" layer and defers to it,
  mirroring the existing click-priority pattern.
- Character map tooltips now show a single status line - "[Activity]
  at [Building]", "[Activity] outside", "Walking to [Building]", or
  "Walking outside" - instead of separate Currently/Lives at/Works at
  lines.
- CharacterPointFeatureSerializer exposes current_location_type and
  destination_location_type, resolving through Node.interior_space as
  well as Node.building so characters in interior rooms (not just at a
  building's entrance node) resolve to that building instead of
  reading as "outside".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011H8vdMQa7b5tHiz32seC6v
Show "Currently" above Age/Sex in CharacterDetail, and reduce the
non-modal DetailCard variant's max-width from 280px to 200px.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011H8vdMQa7b5tHiz32seC6v
Also read "home" instead of "house" when the character is at or
walking to their own residence.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011H8vdMQa7b5tHiz32seC6v
Cursor is inherited, so without an explicit default, hovering any
plain text (tooltip copy, list items, etc.) showed the browser's
text-selection I-beam. Sets cursor: default on body and restores
cursor: text only on actual text inputs/textareas/contenteditable
elements.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011H8vdMQa7b5tHiz32seC6v
…ails button

Header now has a target-icon button (secondary variant, same size as
Close) that recenters the map on whichever entity is selected. Also
fixes Button's icon prop rendering unsized (no CSS constrained its
SVG), and adds a small Button size used for the tooltip's View
details action.
…e 768px

Most body text read as too large on wider viewports; drop the md/lg
font-size escalation from the shared type scale so text stays the
same size at every breakpoint instead of growing past 768px.
Extracts MapDetailCard from DetailCard so the docked panel portals into
Map's own wrapper (via a new DetailSurface `container` prop) and positions
relative to the map instead of the viewport, fixing it sitting far too high
on the page. It stays docked top-right through a wider range of narrow
viewports before falling back to the mobile bottom sheet, and sits closer to
the zoom controls. DetailCard itself is now always a centered modal.

Also gives the character/building lists in the detail card a stronger hover
effect (List's existing background/border hover rule was nearly invisible).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011H8vdMQa7b5tHiz32seC6v
@gaidheal1
gaidheal1 merged commit b603217 into development Aug 9, 2026
2 checks passed
@gaidheal1
gaidheal1 deleted the feat/map-selection-highlight-polish branch August 9, 2026 22:39
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