RichText: Remove dead exports and consolidate deprecations - #83461
Conversation
🤖 PR meta 🤖📦 Bundle sizeSize Change: -57 B (0%) Total Size: 8.22 MB 📦 View Changed
⚡ 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. A button allows the block to switch from legacy mode to editable mode in
|
There was a problem hiding this comment.
Minor: This pull request removed the last bit of JSX syntax from this file and we could have renamed it to .js. As part of #80123, I considered future expansion to the rule to help detect this. Though in this case, it likely would not have surfaced as a distinct error since the rule was already being suppressed in suppressions.json.
What?
Removes the unused
PrivateRichTextprivate API and the deadcreateLinkInParagraphutil, moves theonSplitdeprecation intowithDeprecations, and breaks thecontent.jsx/index.jsximport cycle. No user-visible change.Why?
PrivateRichTextexisted soCaptioncould passreadOnly(#58916); its last consumer was dropped in #74771.createLinkInParagraphwas React Native only (#35204) and lost its caller in #78747.How?
All deprecated prop handling (array
value,multiline,onSplit) now sits inwithDeprecations.isEmptymoves toutils.jsx, socontent.jsxno longer imports the component from./.withDeprecationskeeps itsforwardRefsince@wordpress/elementstill supports React 18.Testing Instructions