Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
🤖 PR meta 🤖📦 Bundle sizeSize Change: 0 B Total Size: 8.06 MB
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsShow the failuresSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. refuses the drop and uploads nothing in
|
| selector?: `.${ string }`; | ||
| }; | ||
|
|
||
| type RefProps< ForwardsRef extends boolean > = ForwardsRef extends true |
There was a problem hiding this comment.
Looking at the manifest checks, it looks like key has now become an actual Dropdown prop, meaning that React.RefAttributes also adds the reserved key attribute.
Should we make RefProps add only ref, then regenerate the manifest to confirm the error is gone?
|
|
||
| ### TypeScript | ||
|
|
||
| - Fix internal `WordPressComponent` polymorphic typings to avoid unsupported `as` props unintentionally surfacing ([#82704](https://github.com/WordPress/gutenberg/pull/82704)). |
There was a problem hiding this comment.
This PR needs a rebase + moving this entry under the new unreleased section
What?
Related (extracted from): #70064 (comment)
Updates component polymorphism typings in
@wordpress/component'sWordPressComponentPropsto fix an issue where typings would wrongly surfaceasas an available prop.Why?
Typings accuracy.
How?
The previous issue is a result of how
booleaninterpreted as a union oftrue | falsein the checkIsPolymorphic extends trueproduces a union type{ as?: … } | {}, therefore presentingasas an available prop when it is in-fact not intended as one.Testing Instructions
Type-check should pass:
npm run typecheckDocumentation update should produce no local changes:
npm run docs:buildBonus points: Verify that you cannot add an
asprop to an instance ofMenucomponent.Use of AI Tools
Used Cursor IDE + Auto model to research and implement, plus Claude Code + Opus 4.5 for an adversarial review. Changes reviewed manually by myself.