-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Patterns: Add edit section to the list view instead of Ungroup #73199
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
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: +166 B (+0.01%) Total Size: 2.42 MB
ℹ️ View Unchanged
|
| } = select( blockEditorStore ); | ||
| const { isSectionBlock: _isSectionBlock } = unlock( | ||
| select( blockEditorStore ) | ||
| ); |
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.
Nit: You can access private and non-private selectors for same select.
| onClose(); | ||
| } } | ||
| > | ||
| { _x( 'Edit pattern', 'Editing a pattern block in the Editor' ) } |
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 like the updated copy.
@andrewserong raised an interesting point - are we referring to everything as patterns? E.g., template parts and templateLock: 'contentOnly'?
I'm fine with that by the way. 😄
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 thinking that for new users who may not know what a pattern is, it might be more clear to say "edit section", plus that includes patterns, template parts etc..
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.
Updated to edit section...
| ! ( | ||
| isSectionBlock && window?.__experimentalContentOnlyPatternInsertion | ||
| ); | ||
|
|
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.
Once we merge #73183 we won't need this. It's simpler to ensure that section blocks are never ungroupable, because there aren't any circumstances under which we'd want to ungroup them.
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.
Yeah this all got removed in the rebase.
821468b to
b38fcf4
Compare
|
I think this is ready for another review. |
a493fff to
034d174
Compare
ramonjd
left a comment
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.
LGTM I checked on selected single and multiple patterns.
"Edit section" is consistent.
Thanks!
What?
From #72574
If a pattern is a section block then rather than offering an "Ungroup" option we should offer "Edit section".
Why?
This connects block actions in the List View to the contentOnly editing work for patterns.
How?
Creates a new hook to share the selectors between the new menu item and the "edit contents" button.
Testing Instructions
contentOnlyexperimentScreenshots or screencast