-
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
Site editor sidebar: consolidate rename component and use TemplateActions component for patterns single view #54271
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
97f977b
Initial commit: just seeing what needs to be done to add a rename/del…
ramonjd e53365e
Use constant for template view
ramonjd beaf371
- Created `postTypeLabel` var to store notice label post type
ramonjd adc8dd5
Template Actions > Pattern Actions
ramonjd 4000fac
Testing harmonizing duplicate item - probably junk here.
ramonjd 9ffa0ba
Testing harmonizing duplicate item - probably junk here.
ramonjd 446dc32
Consolidate duplicate menu items.
ramonjd b0cc573
No duplicates for templates
ramonjd 15089b7
Open up duplicate action to theme patterns
ramonjd ddb65b7
Set isDuplicable var
ramonjd 4e87c5d
wp_template post types, for now, are not duplicable
ramonjd 2653c89
Don't render the menu if not revertable/removable/duplicable.
ramonjd 90ea73d
Don't show patterns for non-block-based or hybrid themes
ramonjd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
132 changes: 0 additions & 132 deletions
132
packages/edit-site/src/components/page-patterns/rename-menu-item.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
TODO:
Still working out whether we still need
removeTemplate
for clearing customizations to theme templates/patterns.Currently, this PR uses
revertTemplate
. Does it have the same effect?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.
As far as I tested it, there was no problem, but I'm a little unsure. Does @aaronrobertshaw know more about this?
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.
My memory is a bit foggy on this one, so take this with a grain of salt.
As I understand it, there is a difference between
removeTemplate
andrevertTemplate
in that if the template doesn't have a theme file it won't be classed as revertable and an error notice is displayed with no further action taken.If it's testing ok as Aki mentions then I'm probably missing something.