这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jendrikw
Copy link
Contributor

@jendrikw jendrikw commented Nov 7, 2025

This is needed to make the Plot component work with preact (where PureComponent is an abstract class)

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

This is needed to make the Plot component work with preact (where PureComponent is an abstract class)
@typescript-bot
Copy link
Contributor

typescript-bot commented Nov 7, 2025

@jendrikw Thank you for submitting this PR!

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

This PR can be merged once it's reviewed by a DT maintainer.

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

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Only a DT maintainer can approve changes without tests

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

Inactive

This PR has been inactive for 8 days.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 74037,
  "author": "jendrikw",
  "headCommitOid": "6e896146ab4a50faa4b54e7206698235bc265e87",
  "mergeBaseOid": "aa31443ede06d3f9972a3b4e82104b3b33e6b33f",
  "lastPushDate": "2025-11-07T09:19:22.000Z",
  "lastActivityDate": "2025-11-14T10:01:43.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "react-plotly.js",
      "kind": "edit",
      "files": [
        {
          "path": "types/react-plotly.js/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "jonfreedman",
        "gricey432",
        "phuebner"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "phuebner",
      "date": "2025-11-07T14:28:04.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 3501449111,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Untested Change This PR does not touch tests labels Nov 7, 2025
@typescript-bot
Copy link
Contributor

Hey @jendrikw,

😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module.

This can potentially save days of time for you!

@typescript-bot typescript-bot moved this to Waiting for Code Reviews in Pull Request Status Board Nov 7, 2025
@typescript-bot
Copy link
Contributor

🔔 @jonfreedman @gricey432 @phuebner — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board Nov 7, 2025
@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Nov 7, 2025
@typescript-bot
Copy link
Contributor

⏳ Hi @jendrikw,

It's been a few days since this PR was approved by phuebner and we're waiting for a DT maintainer to give a review.

If you would like to short-circuit this wait, you can edit some of the test files in the package that verify how the .d.ts files work. This would allow the PR to be merged by you or the DT module owners after a re-review.

@andrewbranch
Copy link
Member

@jendrikw can you elaborate on why this is necessary? This seems like an issue with the Preact types.

@jendrikw
Copy link
Contributor Author

In Preact, Component is defined as an abstract class with render as an abstract method, which is quite reasonable I think.

This just means that a component needs to define render, which plotly does here, so everything is fine. It's just that the typed don't indicate that it does implement render.

@andrewbranch
Copy link
Member

That’s reasonable in isolation, but it causes this exact issue in every set of component typings written for React, when Preact aims to be broadly compatible with the React ecosystem. I guess there are more function components than component classes out there these days... How long has this been the case?

@jendrikw
Copy link
Contributor Author

I understand. Let me ask the preact developers what they think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Owner Approved A listed owner of this package signed off on the pull request. Popular package This PR affects a popular package (as counted by NPM download counts). Untested Change This PR does not touch tests

Projects

Status: Needs Maintainer Review

Development

Successfully merging this pull request may close these issues.

4 participants