-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Block Inspector: Add content tab for section blocks #71714
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
|
Size Change: +48 B (0%) Total Size: 1.95 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 000cd63. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17852510360
|
0b18c3b to
6e368dd
Compare
46939ba to
5a8cada
Compare
|
This has been rebased and fixed after changes introduce in #71708. |
5a8cada to
df32ac1
Compare
|
This is still depending on #71608 landing; however, while rough, this could be ready for some early feedback. |
9e3bdbc to
20f844a
Compare
20f844a to
f9cd1c4
Compare
|
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. |
|
With #71608 merged, I'll mark this ready for review. |
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.
All the testing steps worked well for me, and the code is looking nice and tidy.
I left one small comment about a potential bug if this and another PR are merged around the same time. The only way it's reproducible is by cherry-picking commits from another PR, but it's a small fix, so should be easy to handle before merging.
edit: Only other thing to note is that the code isn't behind the contentOnly patterns experiment flag, but when turning off the experiment I couldn't find anywhere that it shows up (and it works well anyway). It does also work in write mode, but that's also an experiment.
packages/block-editor/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js
Outdated
Show resolved
Hide resolved
|
Thanks for the thorough testing and review @talldan 🙇 I've made the preemptive fix for preventing dual display of the list and content tabs in 000cd63.
This is one thing I did mean to get clarified. As you said, it does work for sections in both the contentOnly patterns and write mode experiments so might be ok to keep as is. One benefit to this might be keeping the UI as consistent as possible. I'm definitely open to gating this behind the contentOnly pattern experiment. I can make those updates early next week. |
|
Just gave this a manual test. Great improvement. The tab is working as expected for me for template parts, query block and patterns. If it's all good with @talldan then |
|
Yep, the changes still test well for me. 🚢 |
|
I personally think this one is ok to merge without the experiment flag. |
Ok, I'll stash the updates I was working on. The fact that this only really impacts two in-progress experiments means we should have some leeway to iterate as needed |
Co-authored-by: aaronrobertshaw <[email protected]> Co-authored-by: talldan <[email protected]> Co-authored-by: ramonjd <[email protected]>
What?
Closes #71626
Depends on: #71608
Introduces a Content tab for section blocks that displays content-only descendant blocks via quick navigation
Why?
There are ongoing explorations to simplify the editing of patterns using
contentOnlymode by default for them. Part of these efforts is to also allow editing of descendant blocks via a content panel in the inspector. For more complex patterns, the number of descendant blocks can result in a very crowded inspector. This PR introduces a "content" tab to provided more real estate and better separation of content, setting, and style controls.How?
Introduces a new content tab that is similar in approach to the existing styles tab.
Testing Instructions
Screenshots or screencast