Skip to content

[No QA] refactor: OptionRowLHN — Provider + context interface #89947

@mountiny

Description

@mountiny

Part of

#89946 — OptionRowLHN compound component decomposition

Step

1 of 12 — first step, no dependencies.

What

Create RowContext and OptionRow.Provider in src/components/LHNOptionsList/.

  • Define the shared context interface: {state, actions, meta}
  • state — derived display values (focused, hovered, viewMode, brickRoadIndicator, etc.)
  • actions — press handlers
  • meta — report/optionItem references consumed by leaves
  • Export useRowContext() hook (throws if used outside provider)
  • New files: RowContext.ts, Provider.tsx (exported as OptionRow.Provider from the index)

Why

All leaf subcomponents will read from this context instead of taking individual props, enabling the main OptionRowLHN component to stay under 30 LOC and allowing future provider swaps without touching leaves.

Acceptance criteria

  • RowContext is typed with {state, actions, meta}; no any
  • useRowContext() throws a clear error if used outside OptionRow.Provider
  • No existing behavior changes (provider not yet wired into OptionRowLHN)
Issue OwnerCurrent Issue Owner: @DylanDylann

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions