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

Replace Starter Content modal with inserter panel #66836

Merged
merged 17 commits into from
Dec 20, 2024

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Nov 7, 2024

What?

Builds on #66819.
Previously: #61489.

Closes #63865

Why?

The modal is super annoying, let's see if the inserter + zoom out is less annoying. You can double click the canvas to exit also.

A nice side effect is also that you can inserter multiple patterns, or browser other categories.

How?

Uses #61489.

Testing Instructions

Create a new page in the admin or site editor. Click patterns from this category.

Testing Instructions for Keyboard

Screenshots or screencast

Screenshot 2024-11-07 at 19 12 42

Copy link

github-actions bot commented Nov 7, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

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: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: draganescu <andraganescu@git.wordpress.org>
Co-authored-by: mikachan <mikachan@git.wordpress.org>
Co-authored-by: scruffian <scruffian@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: juanfra <juanfra@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: annezazu <annezazu@git.wordpress.org>
Co-authored-by: getdave <get_dave@git.wordpress.org>
Co-authored-by: mtias <matveb@git.wordpress.org>
Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>

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

@scruffian scruffian force-pushed the remove/starter-content-modal branch from 5ac83d8 to 2f20ab1 Compare December 17, 2024 17:18
@getdave
Copy link
Contributor

getdave commented Dec 18, 2024

Playwright test failures look legit. Let's get those fixed up and then we can look to land this one.

Copy link

github-actions bot commented Dec 18, 2024

Flaky tests detected in 36a302d.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12432233258
📝 Reported issues:

Comment on lines -427 to -429
// This is a temp workaround for dragging and dropping images from the inserter.
// This should be removed when we have the zoom out view for media categories.
await page.setViewportSize( { width: 1400, height: 800 } );
Copy link
Member

Choose a reason for hiding this comment

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

It looks like this isn't needed anymore so I went ahead and removed it.

@mikachan
Copy link
Member

I think I've fixed the failing tests, but would appreciate more eyes on the changes in case I've changed too much!

They were either failing because we'd stopped passing the full category object to the inserter, and it looks like we need access to the full object in most cases (to access name, label, and fetch); or because the inserter is now open when creating a new page, so we need to adjust a few tests to close it in order to continue the test.

These tests needed adjusting for the category object:

  • editor/various/inserting-blocks.spec.js (in 07c5db9)
  • site-editor/block-style-variations.spec.js (in 881d7b1)
  • editor/plugins/pattern-recursion.spec.js (in c6c423e)

These tests needed adjusting for the open inserter:

  • test/e2e/specs/editor/various/template-resolution.spec.js (in 2f958e0)
  • test/e2e/specs/site-editor/block-style-variations.spec.js (in 881d7b1)
  • test/e2e/specs/site-editor/pages.spec.js (in 4f9af6c)

Copy link
Contributor

@scruffian scruffian left a comment

Choose a reason for hiding this comment

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

This is looking good to me.

Copy link
Member

@mikachan mikachan left a comment

Choose a reason for hiding this comment

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

The last few commits resolved the discussion here about making sure zoom out is still invoked when creating a new page via the command palette. With that, I think this is ready to bring in 🎉

@scruffian scruffian merged commit 1185005 into trunk Dec 20, 2024
66 checks passed
@scruffian scruffian deleted the remove/starter-content-modal branch December 20, 2024 14:25
@github-actions github-actions bot added this to the Gutenberg 20.0 milestone Dec 20, 2024
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 [Type] Enhancement A suggestion for improvement.
Development

Successfully merging this pull request may close these issues.

Assemble new pages with zoom out