-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Editor: Restore starter content modal #69081
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. |
Size Change: +320 B (+0.02%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
<ToggleControl | ||
__nextHasNoMarginBottom | ||
checked={ showStartPatterns } | ||
label={ __( 'Show starter patterns' ) } | ||
help={ __( | ||
'Shows starter patterns when creating a new page.' | ||
) } | ||
onChange={ ( newValue ) => { | ||
setShowStartPatterns( newValue ); | ||
} } | ||
/> |
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 just duplicated the option from the Preferences modal. Compared to "Don't show me this modal", I like neutral labeling here.
Let me know if you prefer to change anything.
It looks like the modal may be loading twice. I am not able to reproduce the same on 6.7.1 without Gutenberg. 6.7.1, this PR, Twenty Twenty-Four, Windows, Chrome: pattern-modal-25-02-07-0713.mp46.7.1, this PR, Twenty Twenty-Five, Windows, Firefox: pattern-modal-25-02-07-0732-firefox.mp4 |
If someone reduces the height of the browser, the footer (modal actions) is eventually below the |
Good catch. I think it's a conflict with the new default rendering mode. I had it disabled locally.
Do you mind sharing a screencast? I'm unable to reproduce it. |
I don't know why anyone would reduce it to this size. It doesn't behave the same if the width is narrow. pattern-modal-25-02-07-0910-height.mp4 |
Thanks for the screencast, @carolinan! It seems like a general issue with sticky footers and Modals. I can also reproduce the same behavior for the P.S. Strangely, I can't lower the browser window height that much on MacOS. I had to resort to DevTools for testing. Screencast |
This issue can also be reproduced with the font library modal with a similar fixed footer. Could this be considered an edge case for now? Videob4dbd638a4b1162daab7cbf065b4006b.mp4When "Show starter patterns" is enabled, opening and closing the preferences modal causes the starter content to re-appear. This behavior does not occur with the modal in 6.7. Is there a way to fix this? Video3ee9158787b59be0709702109199bab8.mp4What do you think about adding a skip button? Because the pattern modal that appears when you create a custom template has a skip button. |
It seems like a general problem with the Modal component. Let's mark it as an edge case for these modals rather than a blocker.
IIRC, the behavior is the same on WP 6.7. The
The "Skip" only closes the modal; it doesn't update user starter content preferences. I think changing preferences requires more explicit consent, which is hard to convey with the "Skip" button. |
What?
Closes #68736.
Reverts #66836.
PR restores the starter content modal for newly created pages, reverts the Zoom Out mode assembler, and adds a preferences toggle to the modal footer.
Todos
Why?
See: #68736 (comment)
Testing Instructions
Using TT4 or TT5
Testing Instructions for Keyboard
Same.
Screenshots or screencast