Skip to content

navigation-menu: no indicator part, so the indicator recipes style nothing #229

Description

@fponticelli

Found by the new VALUE-level arm of scripts/test/registry-attrs.test.ts (the name-level arm was green on it).

registry/llui/ui/navigation-menu.ts carries two recipes ported from Radix:

export const NavigationMenuIndicatorTrack = classPart(
  div,
  '… data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in',
)
export const NavigationMenuIndicatorArrow = classPart(div, '… rotate-45 …')

Radix's NavigationMenuIndicator is driven by the viewport with data-state="visible" | "hidden". @llui/components/navigation-menu has no indicator part at all, so nothing in the package ever produces that attribute and both animation rules match nothing. A consumer that uses the pair has to position AND drive it themselves.

Not urgent — the arrow simply does not animate, and nothing in the demo renders it (only NavigationMenuIndicator, the trigger chevron, is used).

Options

  1. Add an indicator part to the machine — publishes data-state="visible"|"hidden" plus the active trigger's offset/width so the arrow can track it. Matches Radix, and makes the ported recipes live.
  2. Delete both exports. They are the only registry recipes with no state source. A consumer wanting a tracking arrow builds it.
  3. Leave as consumer-driven and document it on the export. This is what ships today, recorded in VALUE_ALLOWED with a reason pointing here.

Leaning (1) — the offset/width tracking is the part a consumer cannot reasonably derive without reaching into the machine's internals, which is the usual argument for it living in the machine.

Definition of done

  • Decision recorded
  • If (1): indicator part on the machine, rendered in examples/registry-demo, and the VALUE_ALLOWED entries removed
  • If (2): both exports deleted and the VALUE_ALLOWED entries removed

Metadata

Metadata

Assignees

No one assigned

    Labels

    components@llui/components packageneeds-triageMaintainer needs to evaluate

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions