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

[0.64] Pull in upstream fixes to expose hover props on Pressable #884 #885

Closed

Conversation

Saadnajmi
Copy link
Collaborator

Same as #884 except targeting the 0.64-stable branch.

Saadnajmi and others added 30 commits March 22, 2021 14:59
[pull] master from microsoft:master
#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
[pull] master from microsoft:master
[pull] master from microsoft:master
* Deprecated api (microsoft#853)

* Remove deprecated/unused context param
* Update a few Mac deprecated APIs

* Packing RN dependencies, hermes and ignoring javadoc failure,  (microsoft#852)

* Ignore javadoc failure

* Bringing few more changes from 0.63-stable

* Fixing a patch in engine selection

* Fixing a patch in nuget spec

* Fixing the output directory of nuget pack

* Packaging dependencies in the nuget

* Fix onMouseEnter/onMouseLeave callbacks not firing on Pressable (microsoft#855)

* add pull yml

* match handleOpenURLNotification event payload with iOS (microsoft#755) (#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* fix mouse evetns on pressable

* delete extra yml from this branch

* Add macOS tags

* reorder props to have onMouseEnter/onMouseLeave always be before onPress

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* Grammar fixes. (microsoft#856)

Updates simple grammar issues.

Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Saad Najmi <saadnajmi2@gmail.com>
Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>
)

* Build & Packaging changes for bringing up RN64 in devmain

* Fixing gradle clean

* Disable gradle clean in PR builds
* Add the missing android folder to files in package.json

* Fix for submit button disappear bug in comments

Co-authored-by: Mayuresh Gharpure <Mayuresh.Gharpure@microsoft.com>
…essibility-focus-notification

fix: Post NSAccessibilityLayoutChangedNotification when we call setAccessibilityFocus on macOS
Fixes for publishing from stable branches
* nullable compat

* undo last nullable check

* nullable compat
Summary:
Several desktop forks (`react-native-macos`, `react-native-windows`, `react-native-web`) support mouse events, and while the stock Pressable component has the ability to support mouse events, it seems we aren't forwarding some props properly from Pressable -> Pressability.

Pressability will calculate onMouseEnter / onMouseLeave event handlers based on the `onHoverIn/onHoverOut` callbacks passed into PressabilityConfig.
https://github.com/facebook/react-native/blob/ad0d4534a751ed05f84ff971714c8f7a4d1deb3a/Libraries/Pressability/Pressability.js#L552
 However, Pressable does not pass take in onHoverIn/onHoverOut props to pass to PressabilityConfig, so we can't take advantage of this functionality. This change should simply address that by passing the props through.

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Fixed] - Pressabel not passing hover props and event handlers to PressabilityConfig

Pull Request resolved: facebook#32405

Test Plan: I fixed a similar issue in `react-native-macos` that I am now trying to contribute back upstream. microsoft#855

Reviewed By: yungsters

Differential Revision: D31667737

Pulled By: sota000

fbshipit-source-id: f0bbe48302703bb2c45280d2afeec8d7a4586b6a
@Saadnajmi Saadnajmi requested a review from HeyImChris November 4, 2021 20:14
@Saadnajmi Saadnajmi requested a review from alloy as a code owner November 4, 2021 20:14
@Saadnajmi Saadnajmi changed the title [0.64] Pull in upstream fixes to expose Hover props on Pressable #884 [0.64] Pull in upstream fixes to expose hover props on Pressable #884 Nov 4, 2021
@pull-bot
Copy link

pull-bot commented Nov 4, 2021

Warnings
⚠️

❔ Base Branch - The base branch for this PR is something other than master. Are you sure you want to merge these changes into a stable release? If you are interested in backporting updates to an older release, the suggested approach is to land those changes on master first and then cherry-pick the commits into the branch for that release. The Releases Guide has more information.

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.

📖 📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.
📖 📋 Missing Summary - Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change.

Generated by 🚫 dangerJS against 02d8438

@acoates-ms
Copy link
Collaborator

This looks like a breaking change? Shouldnt we support the old property names (with warning) for a period of time to allow apps to transition?

@Saadnajmi
Copy link
Collaborator Author

Saadnajmi commented Nov 4, 2021

This looks like a breaking change? Shouldnt we support the old property names (with warning) for a period of time to allow apps to transition?

Right, I wanted opinions about that. The "old" property names (onMouseEnter/onMouseLeave) didn't actually work until #855 which was 22 days ago. I assume nobody has actually gone and used the old property names in the last 22 days. However, react-native-windows explicitly supports both for backwards compatibility, which is why I added @rectified95 / @NickGerleman to ask their opinions about supporting both.

I can pull in the changes from react-native-windows to support both onMouseEnter/onMouseLeave AND onHoverIn/onHoverOut, but if nobody is using the former, we can reduce diffs by not supporting it.

@acoates-ms
Copy link
Collaborator

My opinion:
If it wasn't available in 0.63, then we can probably assume people are not using them.
There isn't need to support properties that react-native-windows supported. - Its fine to just support the new ones.

@Saadnajmi
Copy link
Collaborator Author

My opinion:
If it wasn't available in 0.63, then we can probably assume people are not using them.
There isn't need to support properties that react-native-windows supported. - Its fine to just support the new ones.

It's available in the very latest 0.63.x release with #857 . I think it's safe to assume the only person possibly using it was me at the time.

@acoates-ms
Copy link
Collaborator

So it was in one dot release, maybe you can do the rename in 0.63 too.. So its not around for long. Otherwise people on 0.63 might start using it before switching to 0.64?

@Saadnajmi
Copy link
Collaborator Author

@acoates-ms That's fair, I can make a 3rd PR to pull this into 0.63-stable as well.

rasaha91 and others added 14 commits November 4, 2021 18:33
Rename directory for ship .so files to be ship instead of release
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v4.4.13...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…rn/packages/react-native-macos-init/tar-4.4.19

Bump tar from 4.4.13 to 4.4.19 in /packages/react-native-macos-init
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](npm/hosted-git-info@v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…rn/packages/react-native-macos-init/hosted-git-info-2.8.9

Bump hosted-git-info from 2.8.8 to 2.8.9 in /packages/react-native-macos-init
* revert dev mode on ship builds

* rctuicolor

* remove unused variable

* pod install
@Saadnajmi
Copy link
Collaborator Author

Closing in favor of #922

@Saadnajmi Saadnajmi closed this Dec 7, 2021
@Saadnajmi Saadnajmi deleted the upstream-pressable-hover branch December 7, 2021 21:49
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.

9 participants