fix: inline extractProps into applySplitNode#2427
Merged
christianhg merged 1 commit intomainfrom Mar 29, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: 44348fc The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📦 Bundle Stats —
|
| Metric | Value | vs main (c7efcdb) |
|---|---|---|
| Internal (raw) | 757.5 KB | -3.2 KB, -0.4% |
| Internal (gzip) | 142.6 KB | -484 B, -0.3% |
| Bundled (raw) | 1.37 MB | -3.2 KB, -0.2% |
| Bundled (gzip) | 306.5 KB | -480 B, -0.2% |
| Import time | 98ms | +0ms, +0.0% |
@portabletext/editor/behaviors
| Metric | Value | vs main (c7efcdb) |
|---|---|---|
| Internal (raw) | 467 B | - |
| Internal (gzip) | 207 B | - |
| Bundled (raw) | 424 B | - |
| Bundled (gzip) | 171 B | - |
| Import time | 6ms | -0ms, -0.9% |
@portabletext/editor/plugins
| Metric | Value | vs main (c7efcdb) |
|---|---|---|
| Internal (raw) | 2.5 KB | - |
| Internal (gzip) | 910 B | - |
| Bundled (raw) | 2.3 KB | - |
| Bundled (gzip) | 839 B | - |
| Import time | 12ms | +0ms, +1.2% |
@portabletext/editor/selectors
| Metric | Value | vs main (c7efcdb) |
|---|---|---|
| Internal (raw) | 60.5 KB | - |
| Internal (gzip) | 9.5 KB | - |
| Bundled (raw) | 56.9 KB | - |
| Bundled (gzip) | 8.7 KB | - |
| Import time | 10ms | +0ms, +0.2% |
@portabletext/editor/utils
| Metric | Value | vs main (c7efcdb) |
|---|---|---|
| Internal (raw) | 24.2 KB | - |
| Internal (gzip) | 4.7 KB | - |
| Bundled (raw) | 22.2 KB | - |
| Bundled (gzip) | 4.4 KB | - |
| Import time | 9ms | +0ms, +0.3% |
🗺️ . · ./behaviors · ./plugins · ./selectors · ./utils · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
00ad488 to
44348fc
Compare
extractProps into applySplitNodeextractProps into applySplitNode
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
extractPropsexisted solely to strip structural fields (childrenfrom text blocks,textfrom spans) before passing node metadata toapplySplitNode. Every caller followed the same pattern: look up the node, callextractProps, pass the result as thepropertiesparameter.Since
applySplitNodealready identifies the node type internally (it checksisSpanandisTextBlockto decide how to split), it can do its own property extraction. This removes thepropertiesparameter from the signature and lets callers pass just the path and position.The simplification cascades through 8 call sites across 7 files. Several callers had redundant
getNodelookups that only existed to feedextractProps- those are removed too sinceapplySplitNodedoes its own node lookup internally.Deletes
extract-props.tsand theNodePropstype that was only used by it.