Repository navigation
Block Editor: PR 59: Clean up the types of the converted components - #85213
Conversation
🤖 PR meta 🤖🎉 PropsIf 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. Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 9.05 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 testsSome 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. Regression: updating a specific option will only change its value and will not corrupt others in
|
355a290 to
7f0384b
Compare
… click handlers locally
8d7fb96 to
abb94cb
Compare
What?
See #67691. Part of the effort to convert
@wordpress/block-editorto TypeScript, stacked on #85036. Follow up to #84848 and #84875.Cleans up the types of the converted components: leaves ineffective props out, types the color lookups by the fields they read, and drops
@wordpress/componentstypes where a plain type does.Why?
Review of the conversion found props that do nothing, such as
minonLineHeightControl(comment), lookups that required fullColorobjects (comment), and coupling to@wordpress/componentstypes that makes a@wordpress/uimigration harder (comment).How?
@wordpress/componentstypes of props the components forward to the wrapped component, such aspopoverPropsand icons, since narrowing them would reject calls that work.No runtime changes.
Testing Instructions
npm run test:unit -- packages/block-editor/src/components/colorsnpm run clean:package-types && npm run typecheckUse of AI Tools
Written with Claude Code, reviewed by me.