Skip to content

build: Upgrade remaining @wordpress/* packages to .38 series#324

Merged
dcalhoun merged 4 commits intotrunkfrom
build/upgrade-wordpress-deps-to-38
Feb 25, 2026
Merged

build: Upgrade remaining @wordpress/* packages to .38 series#324
dcalhoun merged 4 commits intotrunkfrom
build/upgrade-wordpress-deps-to-38

Conversation

@dcalhoun
Copy link
Copy Markdown
Member

@dcalhoun dcalhoun commented Feb 17, 2026

What?

Upgrade all remaining @wordpress/* packages from the .36 series to the .38 series to align with @wordpress/format-library@5.38.0, and adapt the native block inserter to handle new heading level variations introduced upstream.

Why?

After upgrading @wordpress/format-library to 5.38.0 (in #323), the project had a mix of .36.0 and .38.0 packages. This caused duplicate @wordpress/components installations (v30.9.0 at the root and v32.0.0 nested under format-library), which can lead to React context mismatches and block rendering failures.

Upgrading all packages to the .38 series eliminates the duplicate installations and ensures a single, consistent dependency tree.

Additionally, the .38 series includes WordPress/gutenberg#73823, which converts heading levels (h1–h6) from an attribute-based system to block variations with scope: ['block', 'transform']. These variations are marked isSearchOnly in the inserter items — the web inserter correctly hides them from its browse view while keeping them searchable. Without changes on our side, the native block inserter displayed all six heading level variations as separate blocks in the browse grid, which is incorrect.

How?

Dependency upgrades

  1. Upgraded all @wordpress/* dependencies in package.json to their .38.0 versions
  2. Regenerated patch files for the version bumps:
    • @wordpress/block-editor 15.11.0 → 15.12.0
    • @wordpress/block-library 9.36.0 → 9.39.0 (.js.mjs)
    • @wordpress/editor 14.36.0 → 14.39.0 (.js.mjs)
    • @wordpress/rich-text 7.38.0 → 7.39.0

The underlying patch fixes are unchanged; only the target versions and file extensions were updated.

Native block inserter: search-only variations

  • JS (src/utils/blocks.js): Passes through the isSearchOnly property from inserter items and separates search-only blocks (e.g. heading level variations) into a dedicated gbk-search-only section, keeping them out of browse sections (most-used, category).
  • iOS (BlockType.swift): Added isSearchOnly property to the block data model.
  • iOS (BlockInserterViewModel.swift): Hides the gbk-search-only section from the browse view. During search, flattens all blocks (including search-only) into a single ranked list, deduplicating by ID to avoid empty grid cells caused by the same block appearing in multiple sections. This mirrors the web inserter's approach of showing a flat, relevance-ranked result list.

Testing Instructions

  • Run npm ci — all patches should apply cleanly with no warnings
  • Verify CI checks pass
  • Verify the editor loads and blocks work correctly via smoke testing
  • Open the native block inserter:
    • Browse: Verify only a single "Heading" block appears (no separate h1–h6 entries)
    • Search "Heading": Verify "Heading", "Heading 1" through "Heading 6", and "Markdown" appear in a single flat list with no duplicate entries or empty cells
    • Search "h3": Verify "Heading 3" appears in results

Accessibility Testing Instructions

No accessibility-facing UI changes — the inserter grid layout and interaction model are unchanged. The only difference is which blocks are shown and how search results are grouped.

Before After
before after

Important

The "stretchy" block type was converted to a variation, which is why it is absent in the "after" search results.

@dcalhoun dcalhoun added [Type] Build Tooling Issues or PRs related to build tooling dependencies Pull requests that update a dependency file labels Feb 17, 2026
@dcalhoun dcalhoun force-pushed the fix/format-library-upgrade branch from f85d276 to 80ba09d Compare February 17, 2026 14:47
@dcalhoun dcalhoun force-pushed the build/upgrade-wordpress-deps-to-38 branch from dbb27fe to 8236350 Compare February 17, 2026 15:02
@dcalhoun dcalhoun force-pushed the fix/format-library-upgrade branch from 80ba09d to f1f6a07 Compare February 18, 2026 02:58
@dcalhoun dcalhoun force-pushed the build/upgrade-wordpress-deps-to-38 branch 2 times, most recently from cc41f92 to 2522054 Compare February 18, 2026 17:24
Base automatically changed from fix/format-library-upgrade to trunk February 23, 2026 22:02
@dcalhoun dcalhoun force-pushed the build/upgrade-wordpress-deps-to-38 branch 2 times, most recently from 4b0be94 to 6fb1944 Compare February 24, 2026 00:45
@dcalhoun dcalhoun marked this pull request as ready for review February 24, 2026 18:17
@dcalhoun dcalhoun requested a review from kean February 24, 2026 18:17
icon: getBlockIcon( item ),
frecency: item.frecency || 0,
isDisabled: item.isDisabled || false,
isSearchOnly: item.isSearchOnly || false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This wasn't too bad, especially since the actual business logic is still in the framework.

Upgrade all @wordpress/* dependencies to their .38.0 versions to align
with @wordpress/format-library@5.38.0's requirement for
@wordpress/components@^32.0.0. The previous mix of .36.0 and .38.0
packages caused duplicate @wordpress/components installations (v30.9.0
at the root and v32.0.0 nested), which led to React context mismatches
and block rendering failures.
Regenerate patches for @wordpress/block-editor (15.11.0 -> 15.12.0),
@wordpress/block-library (9.36.0 -> 9.39.0), @wordpress/editor
(14.36.0 -> 14.39.0), and @wordpress/rich-text (7.38.0 -> 7.39.0).
The underlying fixes are unchanged; only the target versions and file
extensions (.js -> .mjs) were updated.
…view

Pass `isSearchOnly` through the block serialization pipeline and use it
to separate browsable blocks from search-only blocks (e.g. heading level
variations h1–h6 introduced in WordPress/gutenberg#73823). Search-only
blocks are placed in a dedicated `gbk-search-only` section that the
native inserter hides in browse mode but includes when the user searches,
matching the web inserter's behavior.
Instead of preserving section groupings during search, flatten all blocks
(including search-only) into one section ranked by relevance. This avoids
the same block appearing in multiple sections and provides a cleaner
search experience, mirroring the approach used by the web inserter.
@dcalhoun dcalhoun force-pushed the build/upgrade-wordpress-deps-to-38 branch from a5f53ce to ff7fdfa Compare February 25, 2026 17:38
@dcalhoun dcalhoun enabled auto-merge (squash) February 25, 2026 17:39
@dcalhoun dcalhoun merged commit 1c13abe into trunk Feb 25, 2026
12 of 14 checks passed
@dcalhoun dcalhoun deleted the build/upgrade-wordpress-deps-to-38 branch February 25, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants