Skip to content

Separate focusability from navigation policy - #25675

Open
agluszak wants to merge 2 commits into
bevyengine:mainfrom
agluszak:ui-focusable
Open

Separate focusability from navigation policy#25675
agluszak wants to merge 2 commits into
bevyengine:mainfrom
agluszak:ui-focusable

Conversation

@agluszak

@agluszak agluszak commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Objective

Solution

  • Implemented the design described by @viridia in the issue linked above

Testing

  • played around with widgets in feathers_gallery

Disclosure notice: I used an LLM during development of this PR

@viridia viridia 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.

Looks good generally.

Note: if you used an LLM to help write the code, please add a disclosure notice in the PR description in accordance with Bevy's AI policy.

use bevy_reflect::{prelude::*, Reflect};

/// Marks an entity as able to receive input focus.
#[derive(Component, Default, Debug, Clone, Copy, PartialEq, Eq)]

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.

Why does this need Eq?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You mean Eq specifically? Or PartialEq in general?

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.

PartialEq in general. Since it's a marker, there's nothing to compare.

Comment thread _release-content/migration-guides/focusable_component.md
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 4, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in UI Sep 4, 2026
@alice-i-cecile alice-i-cecile added A-Input Player input via keyboard, mouse, gamepad, and more C-Usability A targeted quality-of-life change that makes Bevy easier to use and removed C-Bug An unexpected or incorrect behavior labels Sep 4, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Input Sep 4, 2026
@alice-i-cecile alice-i-cecile added D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide labels Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Input Player input via keyboard, mouse, gamepad, and more A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage
Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

Click-to-focus doesn't work with directional navigation

3 participants