-
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
Refactor document actions to handle template part titles #26043
Conversation
Size Change: +167 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
bddc5e5
to
3e38b81
Compare
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 working well for me but I left one question about organizing code.
Note: this could use the same "View in navigation" flow introduced in #26003, which means that eventually template parts too would maybe need a dropdown. |
Unsure, I don't think there have been any design explorations on this yet |
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 can confirm that this works as expected in Chrome, Firefox, Safari, Edge, and IE11. 🚀
9eb817c
to
5dc7257
Compare
packages/edit-site/src/components/header/document-actions/index.js
Outdated
Show resolved
Hide resolved
This works as expected but the PR needs to be rebased now. |
5dc7257
to
5789a7f
Compare
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 🚀
Description
Resolves #25878. This refactors the
DocumentActions
component in the following ways:template
objectentityTitle
andentityLabel
so that the component can be used for generic entities.children
to the dropdown component so that the actions area is not tightly coupled to the content which could be shown there.We then utilize these changes in the header component so that:
entityTitle
can changed based on the entity being edited (so it now shows the template part slug when zoomed into a template part).Visually, the only difference should be that when you switch to a template part in the sidebar, it now displays the template part slug as the document title.
How has this been tested?
Locally in edit site.
Screenshots
Types of changes
Enhancement
Checklist: