-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
base: trunk
Are you sure you want to change the base?
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
1560e59
to
5ac2a48
Compare
Are there situations when this is not supposed to work? For me checking out this branch and making a new page just lands me in the edior - no modal, but no zoom out either :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing slightly different behaviours between themes. When using Pixl, no patterns seem to load in the inserter. This theme only has one eligible pattern (footer), but it would be nice to improve this experience even when there are no patterns:
Screen.Recording.2024-11-11.at.12.48.44.mov
When using Twenty Twenty-Five, the patterns show and everything seems to work (other than the Starter Content duplication), although it's a little slow. I'm not sure if there are any UX tricks we could use here to make this not as obvious:
Screen.Recording.2024-11-11.at.13.00.33.mov
Ah, looks like a rebase error |
I retested this and figured I need to have the pref on. Cool. Aside from what @youknowriad found about the duplication it seems to be working. |
) | ||
) { | ||
categories.unshift( starterPatternsCategory ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is causing the duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed a small deletion and this works for me now. Left a comment on.a weird change, but otherwise it's great/
'Shows starter patterns when creating a new page.' | ||
) } | ||
label={ __( 'Show starter patterns' ) } | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we remove the condition?
@richtabor @jasmussen @jameskoster Can we get some design feedback here? One thing I wanted to mention is that if we land this, we should probably do the same for the modal we have for template creation. |
</div> | ||
</Modal> | ||
); | ||
} | ||
|
||
export default function StartPageOptions() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just remove this component and transform it into a hook?
category: 'core/starter-content', | ||
} ); | ||
} | ||
}, [ shouldEnable, setIsInserterOpened ] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the way this is built, it won't reopen the panel if you use the command palette to "create a new page" when you're already creating a new page. I think we should probably add the postId as a dependency.
I think this can work. I also think further steps can be taken in terms of figuring out the full "add new page" flow: perhaps it can even start in zoomed out mode, with the starter content tab open, and that becomes the replacement for the modal. But so as to not replicate the frustration that is leading to the removal of the modal, definitely something to explore separately, see how it feels. Important to understand for all involved, though, the problem we are trying to solve here is that of making it easy for anyone authoring an entirely new page, that your theme comes with starter content that provides an excellent shortcut to your page content. A couple of additional thoughts/questions:
It's good that "All", "My patterns", and "Starter content" are at the top: Should "Featured" also be there? Or is that a custom category? To explain how these categories are special, and not subject to the usual alphabetization, we might want to show a separator, like this: |
About "Starter content" capitalization, I've separately reported the "Call to action" instead of "Call to Action", which I believe @juanfra has been working on, so it'll all be consistent. |
This is testing well for me. I don't know if the automatic opening of the inserter is still a bit intrusive. I also understand that can be disabled through the preference, though.
Yes, that's planned for 6.8. It was handled here. |
My feeling is that when you just want to start writing any distraction is going to be annoying, whether it's a modal or this Inserter UI with zoom out that you have to exit in order to concentrate on writing. That said, I agree this feels like a step in the right direction when compared against the modal.
Agree with this, though I'm not sure 'Starter content' quite captures the nature in that context. |
8a62537
to
5ac83d8
Compare
Yes, though the goal eventually is to also reduce the space that the patterns take to a single sidebar, so it shouldn't be more distracting than having the inspector open. The point is that you can see the canvas immediately and dismiss it instead of wondering what happened. |
Tested this out and wanted to note that we should update the preference to opt out of starter patterns in light of this PR to be something more in line with what we're implementing here. Otherwise, I ran into an odd situation where I couldn't select and edit the page title unless I turned off "Show Template". I was about to open an issue for it but I can't replicate when using GB nightly. testing.add.new.page.mov |
I really don't like making everything an option like that. We should remove it if we can, that's part of why this PR is here. But I do agree that it may be a bit too early. We should reduce the pattern inserter to a single column so that the load experience is less jarring. I plan to try that out at some point, though anyone is welcome to try. |
How is this work progressing? A month in I'm wondering how close we are to landing this. |
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