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

Site Editor: creating a new page doesn't invoke pattern selection #55108

Closed
annezazu opened this issue Oct 5, 2023 · 6 comments · Fixed by #60745
Closed

Site Editor: creating a new page doesn't invoke pattern selection #55108

annezazu opened this issue Oct 5, 2023 · 6 comments · Fixed by #60745
Assignees
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@annezazu
Copy link
Contributor

annezazu commented Oct 5, 2023

When using Twenty Twenty-Four and adding a new page in the Site Editor, despite having patterns registered for page creation, the starter pattern modal never appears causing you to enter an empty page, despite there being patterns registered for this creation process. This stands in contrast to when you create a new page using Pages > Add New Page.

cc @richtabor for flagging this and @aaronrobertshaw in case you can help :)

Visual

CleanShot.2023-10-05.at.17.22.47.mp4
@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Oct 5, 2023
@annezazu annezazu moved this to Needs Dev / Todo in WordPress 6.4 Editor Tasks Oct 5, 2023
@talldan
Copy link
Contributor

talldan commented Oct 6, 2023

I think the pattern selection modal was only ever implemented in the post/page editor. I'll have a look to see if I can port it to the site editor.

@talldan
Copy link
Contributor

talldan commented Oct 6, 2023

This is technically an enhancement btw, as it was a never implemented feature rather than a bug.

I'll look into what it takes to implement it, hopefully have a PR, and then we can decide what to do about it and 6.4.

@talldan
Copy link
Contributor

talldan commented Oct 6, 2023

#55117 is almost there. Just debugging an issue with there being no patterns in the block editor store when editing a new page via the site editor (wp.data.select( 'core/block-editor' ).getPatternsByBlockTypes( 'core/post-content' ); returns an empty array).

At the end of my day now so will pick it up on Monday.

@richtabor
Copy link
Member

Thanks @talldan!

@annezazu annezazu removed the [Type] Bug An existing feature does not function as intended label Oct 6, 2023
@annezazu
Copy link
Contributor Author

annezazu commented Oct 6, 2023

Great to know! Removing from 6.4 in that case. Thank you for diving in.

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Oct 9, 2023
@talldan
Copy link
Contributor

talldan commented Oct 9, 2023

I think I've managed to get it working here - Add starter patterns to site editor new page

However I haven't had time to update the PR description. That'll be a tomorrow task.

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 [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
5 participants