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

[react] add missing html table attributes #60651

Conversation

tholman
Copy link
Contributor

@tholman tholman commented Jun 3, 2022

Please fill in this template.

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an npm package, match the name. If not, do not conflict with the name of an npm package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • Represents shape of module/library correctly
  • tslint.json should contain { "extends": "@definitelytyped/dtslint/dt.json" }, and no additional rules.
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

If changing an existing definition:

If removing a declaration:

  • If a package was never on Definitely Typed, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

@typescript-bot
Copy link
Contributor

typescript-bot commented Jun 3, 2022

@tholman 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

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
  • ✅ Only a DT maintainer can approve changes without tests

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 60651,
  "author": "tholman",
  "headCommitOid": "f76f08ac226a313e1f8fdba69818887656d6c644",
  "mergeBaseOid": "2450e6f60299c22aaf428ac54a09f6a6e6ef0547",
  "lastPushDate": "2022-06-03T14:35:38.000Z",
  "lastActivityDate": "2022-06-04T02:20:22.000Z",
  "mergeOfferDate": "2022-06-04T01:46:22.000Z",
  "mergeRequestDate": "2022-06-04T02:20:22.000Z",
  "mergeRequestUser": "tholman",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "react",
      "kind": "edit",
      "files": [
        {
          "path": "types/react/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "johnnyreilly",
        "bbenezech",
        "pzavolinsky",
        "ericanderson",
        "DovydasNavickas",
        "theruther4d",
        "guilhermehubner",
        "ferdaber",
        "jrakotoharisoa",
        "pascaloliv",
        "hotell",
        "franklixuefei",
        "Jessidhia",
        "saranshkataria",
        "lukyth",
        "eps1lon",
        "zieka",
        "dancerphil",
        "dimitropoulos",
        "disjukr",
        "vhfmag",
        "hellatan",
        "priyanshurav"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "rbuckton",
      "date": "2022-06-04T01:45:43.000Z",
      "isMaintainer": true
    },
    {
      "type": "approved",
      "reviewer": "eps1lon",
      "date": "2022-06-03T17:16:25.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 1146030474,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Untested Change This PR does not touch tests labels Jun 3, 2022
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Jun 3, 2022
@typescript-bot
Copy link
Contributor

@DangerBotOSS
Copy link

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

react (unpkg)

was missing the following properties:

  1. unstable_act

Generated by 🚫 dangerJS against f76f08a

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Jun 3, 2022
Copy link
Collaborator

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Did you check if we have other deprecated attributes here? Did we maybe remove these in the past or discussed it earlier?

@tholman
Copy link
Contributor Author

tholman commented Jun 3, 2022

Did you check if we have other deprecated attributes here? Did we maybe remove these in the past or discussed it earlier?

All of the attributes on Table are deprecated including the ones currently in the types file. Sadly they're also still often used, especially in email HTML (which is my failing test case). Couldn't find any discussion about nitpicking specific deprecated props to allow the ones currently in the git/comment history.

I've extended the interface locally to pass typechecks, but figured I'd extend the fix here.

Copy link
Collaborator

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

All of the attributes on Table are deprecated including the ones currently in the types file.

Gotcha. We'll mark them all as deprecated in a follow-up. Thanks for checking!

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Jun 3, 2022
@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Jun 4, 2022
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in New Pull Request Status Board Jun 4, 2022
@tholman
Copy link
Contributor Author

tholman commented Jun 4, 2022

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Jun 4, 2022
@typescript-bot typescript-bot merged commit 78f09bf into DefinitelyTyped:master Jun 4, 2022
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Jun 4, 2022
@alden-codaio
Copy link

border is typed as border?: number | undefined; -- Shouldn't this include string?

@tholman
Copy link
Contributor Author

tholman commented Jun 14, 2022

border is typed as border?: number | undefined; -- Shouldn't this include string?

Naw, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table#attr-border

@alden-codaio
Copy link

Oh, interesting! So cellpadding can be 5px but border implies pixels so it's just 5.

HTML is weird sometimes...

Thanks!

alden-codaio added a commit to alden-codaio/oy that referenced this pull request Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Maintainer Approved Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner Untested Change This PR does not touch tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants