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

Updates to (recently added) keyboarding events + add ability to have split buttons on macOS #691

Merged
merged 7 commits into from
Jan 21, 2021
Merged

Updates to (recently added) keyboarding events + add ability to have split buttons on macOS #691

merged 7 commits into from
Jan 21, 2021

Conversation

nakambo
Copy link
Collaborator

@nakambo nakambo commented Jan 20, 2021

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

  • Switch key down and key up to direct events. Because views need to specify what events they're interested in, they should probably only receive those events (and nothing else). But because these were added as bubbling events, views can receive events they never asked for, since these events "bubbled" (to their ancestors, from the RN side, not the native\OS side -- which makes sense on say, Win32, where there's no such specification on what events views are interested in, but not so much on the Mac)
  • Fix wrong keyUp -> keyDown redirection in RCTView
  • Minor fixes in keyboard events example to test the above
  • Add custom accessibility role override + actions on button. Plumb to underlying touchable.
  • Add new accessibility roles (menu button, pop up button)
  • Add new custom split button example that demonstrates possible usage of the above

Test Plan

  • Tested various keys on the button (g, h, i, x, j, k, l) and the enclosing view (a, b, c, d, x, left arrow, right arrow). Ensured there are no "duplicate" events
  • Tested VO with the custom split button example -- checked role, accessibility hint, press (VO+space), and show menu (VO+shift+m) actions
  • The above, this time with accessibility inspector instead
  • Ensured no new warnings in RNTester
Microsoft Reviewers: Open in CodeFlow

@nakambo nakambo requested a review from alloy as a code owner January 20, 2021 19:31
@pull-bot
Copy link

pull-bot commented Jan 20, 2021

Messages
📖

📋 Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • macOS
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

Generated by 🚫 dangerJS against b93bc48

React/Views/RCTView.m Outdated Show resolved Hide resolved
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