Repository navigation
Fix - Background image does not update dynamically in Customizer preview - #70
Merged
Merged
Conversation
…iew (themegrill/radiate-pro#48) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
QA suite — passed ✅All 10 checks passed. 6 passed · 0 failed · 4 skipped · 0 flaky · 12s Automated check — no AI involved. It runs the tests in this branch. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Two moderate issues remain, including invalid color updates and ineffective cache invalidation.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Fixes live Customizer background previews by syncing settings to #content, versioning the preview script, and adding regression coverage.
Changes:
- Mirrors background image settings onto
#content. - Adds preview script versioning.
- Adds an end-to-end Customizer test.
Review findings:
inc/customizer.php— Moderate (1 vote): the unchanged theme version does not invalidate cachedcustomizer.js.js/customizer.js— Moderate (3 votes): background colors need a leading#.js/customizer.js— Nit (1 vote): tests do not cover color, position, attachment, or clearing the image.
| File | Description |
|---|---|
tests/e2e/specs/customizer/background-image-preview.spec.ts |
Tests live image and repeat updates. |
js/customizer.js |
Applies background settings to #content. |
inc/customizer.php |
Enqueues the preview script with a version. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Closes themegrill/radiate-pro#48
Free counterpart of themegrill/radiate-pro#103 (issue themegrill/radiate-pro#48).
WordPress live-previews the background settings by rewriting the theme's
<style id="custom-background-css">, but Radiate paints its background on#content. In free that rewrite also deleted the theme's own#contentrule, so a chosen image never showed until publishing.customizer.jsnow mirrors the image, repeat, position, attachment and colour settings onto#content. The preview script is also versioned with the theme version, so browsers that cached the old file get this fix.Test
Adds a
@freshspec: fails ondevelop, passes 3/3. Full suite: 11 passed, 5 skipped. PHPCS: the one changed PHP line adds no violation, but the file already has many, which the file-level CI check reports.Changelog: Fix - Background image now updates live in the Customizer preview.