Skip to content

Do not display the Flyto/JumpTo/Frame buttons in the kebab menu for SceneGraphNodes that are not focussable#227

Merged
alexanderbock merged 3 commits into
masterfrom
feature/non-focussable
Jun 11, 2026
Merged

Do not display the Flyto/JumpTo/Frame buttons in the kebab menu for SceneGraphNodes that are not focussable#227
alexanderbock merged 3 commits into
masterfrom
feature/non-focussable

Conversation

@alexanderbock

Copy link
Copy Markdown
Member

The focus button in the menu for non-focussable objects was hidden, but it was still possible to break things by opening the Kebab menu and select the navigation buttons there. This PR doesn't add these buttons if the scene graph node is marked as non-focussable.

Before:
image

After:
image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents navigation actions (FlyTo/JumpTo/Frame) from being shown in the SceneGraphNode kebab (“more”) menu when a scene graph node is marked as non-focusable, aligning the menu behavior with the already-hidden focus button and avoiding invalid navigation interactions.

Changes:

  • Add useIsSgnFocusable(uri) to determine focusability in the more-menu.
  • Conditionally render Fly/Jump/Frame NodeNavigationButtons only when the node is focusable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/panels/Scene/SceneGraphNode/SceneGraphNodeMoreMenu.tsx Outdated
Comment thread src/panels/Scene/SceneGraphNode/SceneGraphNodeMoreMenu.tsx Outdated
Co-authored-by: Andreas Engberg <48772850+engbergandreas@users.noreply.github.com>
@alexanderbock
alexanderbock merged commit da33da3 into master Jun 11, 2026
1 check failed
@alexanderbock
alexanderbock deleted the feature/non-focussable branch June 11, 2026 14:15
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.

3 participants