Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't add post types to patterns #79238

Merged
merged 1 commit into from
Jul 11, 2023
Merged

Don't add post types to patterns #79238

merged 1 commit into from
Jul 11, 2023

Conversation

dsas
Copy link
Contributor

@dsas dsas commented Jul 11, 2023

Related to #79145

Proposed Changes

We were adding post types to all registered patterns based upon their block type, however this is causing issues when trying to edit template parts which include those patterns.

This change stops doing that while we investigate the issue.

Testing Instructions

  1. Apply changes to sandbox
  2. Have a sandboxed site with e.g. TT3 installed
  3. Go to edit the post-meta template part: /wp-admin/site-editor.php?postType=wp_template_part&postId=pub%2Ftwentytwentythree%2F%2Fpost-meta&categoryId=uncategorized&categoryType=wp_template_part&canvas=edit
  4. The content should show up to be edited and the block list should show spacer and group lists.
  5. If this didn't work then instead you'll see no contents and the block list will show the pattern placeholder block

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-ajp-p2)?

We were adding post types to all registered patterns based upon their
block type, however this is causing issues when trying to edit template
parts which include those patterns.

This change stops doing that while we investigate the issue.

See #79145
@dsas dsas added the [Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. label Jul 11, 2023
@dsas dsas self-assigned this Jul 11, 2023
@dsas dsas requested a review from a team as a code owner July 11, 2023 09:33
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jul 11, 2023
@github-actions
Copy link

github-actions bot commented Jul 11, 2023

@matticbot
Copy link
Contributor

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit patterns/disable-post-types on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@rcrdortiz rcrdortiz added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jul 11, 2023
@dsas dsas merged commit 03f1ae4 into trunk Jul 11, 2023
@dsas dsas deleted the patterns/disable-post-types branch July 11, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants