Add a "Live Preview" link for theme reviewers #186
Closed
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.
Adds a "Live preview" link to the automated trac ticket comment that gets posted when a new theme version is submitted for a review. See an example of the automated comment.
The link leads to a WordPress Playground instance set up with:
WP_DEBUG
enabledCaveats
Zip URL
The zip file URL used in the comment follows this pattern:
However, I used the following URL for this PR:
Why?
fetch()
and can only interact with URLs that provide appropriateAccess-Control-*
headers. Only the latter URL does that.Missing images in the theme unit test data
The theme unit test data references images from a wordpress.com site that doesn't provide the
Access-Control-*
headers and thus can't be downloaded. A fix would involve updating the following XML file to load images fromraw.githubusercontent.com
: https://raw.githubusercontent.com/WordPress/theme-test-data/master/themeunittestdata.wordpress.xmlThis is outside of scope for this PR and can be addressed separately if needed.
Testing instructions
I am not sure how to test this PR 😆 Any suggestions @dd32 @acosmin?
Implementation
The following Blueprint is used to achieve this setup (preview in the Blueprints builder):
Trac ticket: https://meta.trac.wordpress.org/ticket/7382