Skip to content

[react-native] Add hover props to PressableProps#62344

Merged
eps1lon merged 3 commits intoDefinitelyTyped:masterfrom
Saadnajmi:pressable-hover
Sep 21, 2022
Merged

[react-native] Add hover props to PressableProps#62344
eps1lon merged 3 commits intoDefinitelyTyped:masterfrom
Saadnajmi:pressable-hover

Conversation

@Saadnajmi
Copy link
Copy Markdown
Contributor

@Saadnajmi Saadnajmi commented Sep 20, 2022

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested

====

This is a followup to my now (ancient feeling) change that exposed new props on the Pressable component in React Native. This adds it to the types.

My change won't make it to React Native till RN 0.68, but I've backported it to older React Native macOS and React Native Windows releases.
Relevant PRs:

RN Core change (0.68+): facebook/react-native#32405

RN macOS and Windows changes + back ports:

(RN macOS - 0.64) - microsoft/react-native-macos#923
(macOS skipped RN 0.65, and went straight to 0.66)
(RN macOS - 0.66) - microsoft/react-native-macos#884

(RN Windows - 0.64) - microsoft/react-native-windows#9350
(RN Windows - 0.65) - microsoft/react-native-windows#9349
(RN Windows - 0.66) - microsoft/react-native-windows#9348
(RN Windows - 0.67) - microsoft/react-native-windows#9347

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Sep 20, 2022

@Saadnajmi Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

1 package in this PR

@Saadnajmi: I see that you have added yourself as an owner, are you sure you want to become an owner?

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Most recent commit is approved by a DT maintainer

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 62344,
  "author": "Saadnajmi",
  "headCommitOid": "f6af53f899cd0bbdc6783a0b25fde26ff7b158f1",
  "mergeBaseOid": "6f8ea96cbc3714f453a3a16a071ff96f3223c657",
  "lastPushDate": "2022-09-21T01:23:12.000Z",
  "lastActivityDate": "2022-09-21T01:23:12.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "react-native",
      "kind": "edit",
      "files": [
        {
          "path": "types/react-native/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-native/test/index.tsx",
          "kind": "test"
        },
        {
          "path": "types/react-native/v0.68/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-native/v0.69/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "alloy",
        "huhuanming",
        "iRoachie",
        "timwangdev",
        "kamal",
        "alexdunne",
        "swissmanu",
        "bm-software",
        "mvdam",
        "esemesek",
        "mrnickel",
        "souvik-ghosh",
        "nossbigg",
        "saranshkataria",
        "tykus160",
        "jakebloom",
        "ceyhun",
        "mcmar",
        "theohdv",
        "romain-faust",
        "bebebebebe",
        "Naturalclar",
        "chinesedfan",
        "vtolochk",
        "SychevSP",
        "sasurau4",
        "256hz",
        "doumart",
        "drmas",
        "jeremybarbet",
        "ds300",
        "natsathorn",
        "connectdotz",
        "alexeymolchan",
        "alexbrazier",
        "kuasha420",
        "phvillegas",
        "eps1lon",
        "ZihanChen-MSFT",
        "kelset",
        "MateWW",
        "lunaleaps"
      ],
      "addedOwners": [
        "saadnajmi"
      ],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "stale",
      "reviewer": "lunaleaps",
      "date": "2022-09-21T01:00:00.000Z",
      "abbrOid": "721e74d"
    }
  ],
  "mainBotCommentID": 1252986401,
  "ciResult": "pass"
}

@typescript-bot
Copy link
Copy Markdown
Contributor

@Saadnajmi
Copy link
Copy Markdown
Contributor Author

Saadnajmi commented Sep 20, 2022

@lunaleaps I spoke to @kelset who mentioned I should also open this PR against the RN repo. Any opposition to doing so? And should I only do that after this one merges?

EDIT: Went ahead and made facebook/react-native#34740

@lunaleaps
Copy link
Copy Markdown
Contributor

lunaleaps commented Sep 21, 2022

Thanks @Saadnajmi! Yes since this is a fix, let's have dual PRs, the order of landing doesn't matter.

@Saadnajmi
Copy link
Copy Markdown
Contributor Author

Thanks @Saadnajmi! Yes since this is a fix, let's have make dual PRs, the order doesn't matter.

Thanks! I'm also kinda curious how these props with the new pointer API but I guess I'll find out eventually =)

@typescript-bot typescript-bot added the Edits Owners This PR adds or removes owners label Sep 21, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

@lunaleaps Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@eps1lon eps1lon merged commit 92c5bb5 into DefinitelyTyped:master Sep 21, 2022
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Sep 21, 2022
Summary:
This is a mirror of DefinitelyTyped/DefinitelyTyped#62344 . I am updating some typescript types for props that were added with #32405

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Fixed] - Fixed missing Pressable hover props in typescript definition

Pull Request resolved: #34740

Test Plan: Added a test case.

Reviewed By: lunaleaps

Differential Revision: D39688606

Pulled By: cortinico

fbshipit-source-id: 98ea5f64e6ac264772466455e6d5ab99a8427d3a
@Saadnajmi Saadnajmi deleted the pressable-hover branch September 21, 2022 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Edits Owners This PR adds or removes owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants