This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Set the origin of custom templates to 'plugin' and fix plugin name on REST requests #5375
Merged
Conversation
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
rubikuserbot
requested review from
a team and
dinhtungdu
and removed request for
a team
December 13, 2021 14:18
Size Change: 0 B Total Size: 819 kB ℹ️ View Unchanged
|
7 tasks
Aljullu
force-pushed
the
fix/custom-templates-plugin-origin
branch
from
December 13, 2021 15:58
0007c48
to
63b0d93
Compare
Aljullu
added
focus: FSE
Work related to prepare WooCommerce for FSE.
status: needs review
focus: template
Related to API powering block template functionality in the Site Editor
labels
Dec 13, 2021
Aljullu
changed the title
Set the origin of custom templates to 'plugin'
Set the origin of custom templates to 'plugin' and fix plugin name on REST requests
Dec 13, 2021
gigitux
approved these changes
Dec 15, 2021
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!
The only thing that is not clear to me: what does the theme variable represent?
github-actions
bot
added
status: ready to merge
and removed
status: needs review
labels
Dec 15, 2021
Thanks for the review @gigitux!
That's what Gutenberg uses to know what's the theme/plugin the template belongs to. I agree it's confusing using |
jonny-bull
pushed a commit
to jonny-bull/woocommerce-gutenberg-products-block
that referenced
this pull request
Dec 16, 2021
… REST requests (woocommerce#5375) * Set the origin of custom WC templates to 'plugin' * Fix plugin name
This was referenced Dec 17, 2021
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
focus: FSE
Work related to prepare WooCommerce for FSE.
focus: template
Related to API powering block template functionality in the Site Editor
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.
Fixes #5327.
Templates that had been edited by the user were considered as being theme templates even though they are plugin templates. This PR fixes that setting the
origin
toplugin
in those cases.This PR also fixes the plugin name, after some investigation I found it must be in the form
woocommerce/woocommerce
.Manual Testing
WooCommerce
instead ofwoocommerce
(notice the capital letters).Note: This PR introduces a regression, the 'blue' circle on top of the icon indicating that it has been customized by the user does not appear when the origin is a plugin. I think that's a bug in Gutenberg and I created a PR in that repo: WordPress/gutenberg#37329.
User Facing Testing
These are steps for user testing (where "user" is someone interacting with this change that is not editing any code).
Changelog