Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bevy_input_focus improvements (follow-up PR) #16665

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

viridia
Copy link
Contributor

@viridia viridia commented Dec 5, 2024

This adds a few minor items which were left out of the previous PR:

  • Added synchronization from bevy_input_focus to bevy_a11y.
  • Initialize InputFocusVisible resource.
  • Make input_focus available from bevy module.

I've tested this using VoiceOver on Mac OS. It works, but it needs considerable polish.

- Initialize InputFocusVisible resource.
- Make `input_focus` available from `bevy` module.
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Dec 5, 2024
@@ -135,6 +138,13 @@ fn dispatch_keyboard_input(
}
}

/// System which synchronizes the a11y focus state with the input focus state.
fn sync_a11y_focus(focus: Res<InputFocus>, mut a11y_focus: ResMut<Focus>) {
Copy link
Member

Choose a reason for hiding this comment

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

This seems silly: shouldn't we just change the a11y focus to use the new resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uh, I did it this way because my understanding was (based on our previous discussion) that we couldn't have bevy_a11y depend on bevy_input_focus.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm. Maybe I'm misremembering or maybe there was a micommunication, but bevy_a11y depending on bevy_input_focus definitely seems more correct than the reverse (like it is now).

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

I think we should split off the bevy_a11y changes and merge the rest as trivial :)

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Missed a change, but once that's done this LGTM and I'll merge as trivial.

crates/bevy_input_focus/Cargo.toml Outdated Show resolved Hide resolved
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Dec 6, 2024
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy A-Input Player input via keyboard, mouse, gamepad, and more A-UI Graphical user interfaces, styles, layouts, and widgets S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Dec 6, 2024
Merged via the queue into bevyengine:main with commit bc572cd Dec 6, 2024
36 of 37 checks passed
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-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants