Skip to content

[feat] Expanded tooltips: nested keyword inspection system #102

Description

@ScottyVenable

Summary

Track a follow-up feature for expanded tooltips: a nested keyword inspection system inspired by Paradox / Victoria III-style tooltip locking.

Desired behavior

  • Hover keywords in UI text to show a contextual tooltip.
  • Keep a tooltip lockable when the pointer moves into it, so the player can inspect it instead of losing it immediately.
  • Allow keywords inside a tooltip to open secondary tooltip panels in a readable stack.
  • Support keyboard focus for opening, pinning, moving between, and closing tooltip panels.
  • Support mobile through long-press or tap-to-pin behavior, with clear dismissal.

Data model ideas

  • Keyword registry keyed by stable ids for goods, factions, crew traits, ship modules, market modifiers, and glossary concepts.
  • Rich text tokens that render plain text plus keyword spans without unsafe HTML injection.
  • Tooltip panel stack that tracks origin element, parent panel, pinned state, and focus target.
  • Glossary entries for authored descriptions and generated stat summaries.

Accessibility needs

  • Focus trap for pinned tooltip panels when they behave like temporary dialogs.
  • Esc closes the active pinned panel, then unwinds the panel stack.
  • Use aria-describedby for simple hover/focus tooltips and dialog roles where panels become interactive.
  • Preserve readable contrast, keyboard order, and touch targets at mobile widths.

Future usage examples

  • Goods: legality, bulk, supply, demand, and average price context.
  • Factions and civilisations: reputation, region, and station ownership context.
  • Crew traits: stat effects, stress interactions, and hiring risk.
  • Ship modules: installation effects, slot pressure, and maintenance hooks.
  • Market modifiers: news events, station kind effects, and route risk.

Related follow-up ideas

  • Helm map improvements can ride beside this work as linked UX follow-ups: click-drag panning, route particles, animated routes, and destination hover previews.

Scope note

This is not part of PR #101. It is tracked as a follow-up backlog feature.

Related to #101.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uiScreens, layout, controls, mobile ergonomics, styling, or accessibility.channel:developmentTargets the development branch and dev build channel.enhancementNew feature or requestpriority:p2Normal priority: planned roadmap work or important polish.type:featureNew player-facing system, screen, mechanic, or workflow.

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions