Skip to content

Add measureChildrenLayout option to skip child layout measurement - #242

Merged
xavi160 merged 3 commits into
mainfrom
add-measure-children-layout-option
Jul 30, 2026
Merged

Add measureChildrenLayout option to skip child layout measurement#242
xavi160 merged 3 commits into
mainfrom
add-measure-children-layout-option

Conversation

@xavi160

@xavi160 xavi160 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add measureChildrenLayout option (default true) to useFocusable. When false, a
    container's direct children skip layout measurement during navigation and updateAllLayouts
    useful for containers driven by their own nextFocusResolver, which don't need coordinates to
    pick the next target (each measurement is a bridge round-trip on React Native TV).
  • Warn in debug mode when the flag is false with no nextFocusResolver and 2+ focusable
    children, since that silently breaks default coordinate-based navigation.
  • Document nextFocusResolver (previously undocumented) and the new option in a new
    docs/guides/next-focus-resolver.md guide, cross-linked from distance-calculation.md and
    performance.md.

@xavi160 xavi160 self-assigned this Jul 30, 2026
@xavi160
xavi160 requested a review from a team as a code owner July 30, 2026 12:00
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 040f288

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@noriginmedia/norigin-spatial-navigation-core Minor
@noriginmedia/norigin-spatial-navigation-react Minor
@noriginmedia/norigin-spatial-navigation Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@xavi160
xavi160 merged commit b816f56 into main Jul 30, 2026
1 check passed
@xavi160
xavi160 deleted the add-measure-children-layout-option branch July 30, 2026 12:56
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.

2 participants