-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Patterns: Add pattern name to document toolbar when editing in spotlight #73208
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: +410 B (+0.02%) Total Size: 2.54 MB
ℹ️ View Unchanged
|
|
|
||
| // Use pattern info if a pattern block is unlocked, otherwise use document/entity info | ||
| const title = | ||
| unlockedPatternInfo?.patternTitle || |
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 a great change, I like!
Should it work for synced patterns and "templateLock":"contentOnly" blocks as well? Both receive content only treatment.
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 it work for synced patterns and "templateLock":"contentOnly" blocks as well?
Not sure about those, but I updated this PR to work with synced patterns and template parts. Hope you don't mind!
…oved section detail retrieval - Removed inline logic for fetching details of the currently edited content-only section. - Added a new custom hook, useEditedSectionDetails, to encapsulate the logic for retrieving pattern and template part details. - Updated DocumentBar to utilize the new hook for cleaner and more maintainable code.
da9c72d to
9c6ab9c
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.
This is behind an experiment. It works as it should.
blocks with templateLock are currently not catered for but that can be a follow up if it's at all necessary.
Thank you!
What?
When a contentOnly pattern is being editing in the canvas, we should show the pattern name and a back button in the document toolbar.
Why?
This tells the user that they are editing a pattern, and gives them a mechanism to finish editing.
Alternative to #73088
How?
Updates the document toolbar to detect when a pattern is being edited.
Testing Instructions
Screenshots or screencast
Kapture.2025-11-26.at.11.38.02.mp4