Skip to content

Patterns: Add the Status panel to synced patterns - #84938

Open
im3dabasia wants to merge 3 commits into
trunkfrom
update/pattern-status-panel
Open

im3dabasia wants to merge 3 commits into
trunkfrom
update/pattern-status-panel

Conversation

@im3dabasia

@im3dabasia im3dabasia commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What?

Part of #52013.

Shows the Status panel for synced patterns, so a draft pattern is visible as a draft and its status can be changed in the editor.

Why?

A draft synced pattern renders nothing on the front end, but the editor gives no hint. Changing it means going to the classic patterns screen.

How?

  • Patterns no longer share the Status panel exclusion of templates, template parts and navigation.
  • Offers Draft, Pending, Scheduled and Published.
  • Hides Private and password protection. Neither makes sense for a pattern: it either renders for everyone or for nobody.

Open question

Should Private and password protection be hidden, or kept with pattern-specific wording?

Testing Instructions

  1. Create a synced pattern and open it in the editor.
  2. The sidebar shows a Status row with Draft, Pending, Scheduled and Published, and no password option.
  3. Switch to Draft and save. The pattern leaves the inserter and renders nothing on the front end.
  4. Switch to Scheduled. A date picker appears in the popover.

Screenshots

image
Screen.Recording.2026-10-16.at.6.47.11.PM.mov

An e2e test will follow once the approach is agreed.

@im3dabasia im3dabasia self-assigned this Oct 16, 2026
@im3dabasia im3dabasia added [Type] Enhancement A suggestion for improvement. [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Oct 16, 2026
@github-actions github-actions Bot added the [Package] Editor /packages/editor label Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 428b01b trunk % Change
timeToFirstByte 31.85 ms +11.93% -3.45% 31.9 ms +9.09% -2.04% -0.16%
largestContentfulPaint 58 ms +6.9% -6.9% 58 ms +6.9% -3.45% 0%
lcpMinusTtfb 23.6 ms +24.79% -9.11% 24.35 ms +10.88% -3.49% -3.08%
wpBeforeTemplate 16.84 ms +2.85% -1.72% 16.73 ms +3.47% -0.66% 0.66%
wpTemplate 12.2 ms +8.77% -5.66% 12.24 ms +5.47% -4.25% -0.33%
wpTotal 29.03 ms +12.81% -3.55% 29.16 ms +9.88% -2.61% -0.45%
wpMemoryUsage 7.62 MB +0% -0% 7.58 MB +0% -0% 0.46%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric 428b01b trunk % Change
timeToFirstByte 24.65 ms +8.52% -0.81% 29.2 ms +4.97% -2.91% -15.58%
largestContentfulPaint 56 ms +7.14% -0% 68 ms +0% -5.88% -17.65%
lcpMinusTtfb 31.55 ms +1.9% -0.79% 37.3 ms +4.02% -3.62% -15.42%
wpBeforeTemplate 15.31 ms +12.41% -0.26% 16.26 ms +11.32% -2.4% -5.84%
wpTemplate 7.11 ms +3.8% -4.08% 10.07 ms +5.46% -4.67% -29.39%
wpTotal 22.37 ms +10.1% -1.21% 26.67 ms +5.55% -3.64% -16.12%
wpMemoryUsage 6.17 MB +0% -0% 6.24 MB +0% -0% -1.2%
wpDbQueries 10 +0% -0% 14 +0% -0% -28.57%

media-processing

Metric 428b01b trunk % Change
mediaProcessingJpeg 210.73 ms +2.12% -0.86% 221.4 ms +0.5% -1.24% -4.82%
mediaProcessingAvif 3460.51 ms +0.57% -0.31% 3618.55 ms +0.81% -0.71% -4.37%
mediaProcessingJpegToAvif 2408.54 ms +0.24% -0.6% 2491.79 ms +0.66% -1.35% -3.34%

media-upload

Metric 428b01b trunk % Change
jpegUploadProcessing 896.74 ms +53.89% -3.24% 1152.75 ms +20.8% -21.52% -22.21%
pngUploadProcessing 151.04 ms +2.06% -2.22% 170.62 ms +3.76% -5.32% -11.48%
largeJpegUploadProcessing 870.9 ms +0.64% -0.62% 948.65 ms +45.64% -5.23% -8.2%
multipleImageUploadProcessing 970.37 ms +48.73% -0.55% 1445.38 ms +2.56% -28.25% -32.86%

post-editor

Metric 428b01b trunk % Change
serverResponse 274.86 ms +6.29% -4.03% 276.91 ms +1.75% -11.05% -0.74%
firstPaint 260.05 ms +35.27% -21.23% 190.13 ms +76.28% -24.02% 36.77%
domContentLoaded 808.78 ms +3.84% -4.08% 715.27 ms +2.82% -5.51% 13.07%
loaded 810.33 ms +3.78% -4.15% 716.24 ms +2.81% -5.52% 13.14%
firstContentfulPaint 370.95 ms +2.3% -5.17% 326.99 ms +3.29% -44.36% 13.44%
firstBlock 2338.17 ms +2.5% -0.85% 2116.4 ms +2.93% -3.26% 10.48%
type 16.41 ms +4.57% -2.32% 14.08 ms +4.12% -1.28% 16.55%
typeWithoutInspector 16.22 ms +2.34% -2.22% 14.47 ms +6.7% -1.45% 12.09%
typeWithTopToolbar 20.04 ms +6.59% -6.34% 17.01 ms +5.17% -2.82% 17.81%
typeContainer 7.63 ms +2.88% -2.36% 6.42 ms +7.94% -1.87% 18.85%
focus 88.87 ms +11.63% -7.74% 79.55 ms +3.31% -3.98% 11.72%
firstFocus 168.31 ms +0% -0% 151.34 ms +0% -0% 11.21%
selectAll 372.84 ms +2.39% -3.19% 364 ms +8.38% -0.76% 2.43%
listViewOpen 45.24 ms +17.97% -4.38% 49.21 ms +8.25% -4.98% -8.07%
inserterOpen 26.52 ms +9.69% -2.79% 28.67 ms +5.37% -3.66% -7.5%
inserterHover 9.88 ms +17.11% -3.95% 9.07 ms +9.15% -7.5% 8.93%
inserterSearch 7.37 ms +1.9% -10.72% 6.51 ms +9.68% -5.22% 13.21%
loadPatterns 460.96 ms +3.58% -3.71% 447.98 ms +5.82% -2.04% 2.9%
wpTotal 268.06 ms +6.38% -4.3% 268.78 ms +1.65% -11.1% -0.27%
wpMemoryUsage 13.51 MB +0% -0% 13.47 MB +0% -0% 0.28%
wpDbQueries 54 +0% -0% 54 +0% -0% 0%

site-editor

Metric 428b01b trunk % Change
serverResponse 332.12 ms +3.28% -5.52% 328.7 ms +5.13% -3.6% 1.04%
firstPaint 221.27 ms +33.01% -7.51% 224.79 ms +74.38% -12.5% -1.57%
domContentLoaded 929.59 ms +1.55% -0.68% 924.1 ms +1.52% -0.82% 0.59%
loaded 930.34 ms +1.55% -0.65% 924.82 ms +1.52% -0.82% 0.6%
firstContentfulPaint 403.86 ms +1.14% -3.03% 408.25 ms +1.5% -1.45% -1.08%
firstBlock 3477.14 ms +0.75% -0.7% 3392.66 ms +0.97% -0.54% 2.49%
type 15.5 ms +3.55% -4.65% 15.38 ms +0.85% -2.28% 0.78%
navigate 83.91 ms +9.51% -2.65% 86.43 ms +7.99% -4.34% -2.92%
loadPatterns 974.52 ms +3.14% -5.2% 926.16 ms +17.62% -5.97% 5.22%
loadPages 1091.1 ms +0.83% -0.99% 1083.83 ms +2.58% -1.01% 0.67%
wpTotal 324 ms +3.36% -5.71% 320.16 ms +5.41% -3.65% 1.2%
wpMemoryUsage 12.56 MB +0% -0% 12.53 MB +0% -0% 0.3%
wpDbQueries 43.5 +1.15% -1.15% 43.5 +1.15% -1.15% 0%

6706b91 Run

@im3dabasia

Copy link
Copy Markdown
Contributor Author

@ntsekouras would you have a moment to review? This brings the Status panel to synced patterns, and since you worked on the panel in #60857 I'd appreciate your view on the direction.

There's one design question in the description on hiding Private and password protection for patterns.

E2E test to follow once the approach is agreed.

@im3dabasia
im3dabasia requested review from a team and ntsekouras October 30, 2026 06:01
@im3dabasia im3dabasia added the Needs Design Feedback Needs general design feedback. label Oct 30, 2026
@jasmussen

Copy link
Copy Markdown
Contributor

Interesting, thanks for contributing. If patterns support status, we definitely need this panel. Which I guess they do, then this does seem a good next step. 👍 👍

@t-hamano t-hamano left a comment

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.

Thanks for the PR.

I'm aware that patterns support post statuses internally, but I think this PR needs careful discussion.

The Patterns screen in the Site Editor only shows patterns with the publish status. If a user changes a pattern's status to something other than published, either intentionally or by mistake, the pattern disappears from both the Patterns screen and the inserter. Unless the user knows that patterns of every status can be accessed from the "classic" pattern list (/wp-admin/edit.php?post_type=wp_block), they have no way to get that pattern back.

Before moving this PR forward, I think we need to discuss and decide how post statuses should be handled for patterns, and implement a few things:

  • Deleting a pattern in the Site Editor bypasses the trash and deletes it permanently. As far as I can tell, this is an unintended regression: patterns stopped going through the trash when several actions were consolidated in #61912 (WordPress 6.6 and later). I think we should fix this regression first.
  • Should the "All patterns" screen in the Site Editor also show patterns with statuses other than published? Perhaps it should show only published patterns by default, and allow filtering by other statuses.
  • As already discussed in #52013, we need some way to indicate the status of an inserted pattern. Currently, draft, scheduled, and pending patterns are not rendered on the front end, but in the editor they can't be distinguished from published patterns.

@ntsekouras

Copy link
Copy Markdown
Contributor

Thanks for the PR @im3dabasia! I removed the status panel from the design post types in #60857 because some fields while they are supported internally(like status), they can create confusion and unexpected results. Additionally, as Aki describes, a pattern that isn't published disappears from the front end, the inserter and the Patterns page, so I don't think we should allow changing it here.

Maybe we could show the status as a read-only field instead, like sync-status, so folks at least see when a pattern isn't published? Since #85081 PostStatus isn't rendered anymore, so this would be in core-fields (stop unregistering status for wp_block and make it readOnly) and the wp_block form of the view config. What do you think?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) Needs Design Feedback Needs general design feedback. [Package] Editor /packages/editor [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants