fix: WordPress 7.0 admin UI compatibility#401
Merged
Conversation
PHPUnit Test FailureOne or more PHP version targets failed in this workflow run. See all PHPUnit errors (click to expand)Affected PHP version: PHPUnit\Framework\ExpectationFailedException
Code_Snippets\Tests\Cloud_API_Featured_Test::test_empty_filters_produce_same_cache_key
Empty filter values should hash identically to no filters.
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'cs_featured_snippets_v1781173252444.3_p1_pp10_d751713988987e9331980363e24189ce'
+'cs_featured_snippets_v1781173252444.2_p1_pp10_d751713988987e9331980363e24189ce'
/home/runner/work/code-snippets/code-snippets/tests/phpunit/test-cloud-api-featured.php:383
phpvfscomposer:///home/runner/work/code-snippets/code-snippets/src/vendor/phpunit/phpunit/phpunit:106Please review the failing jobs and fix the issues before merging. |
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.
Summary
WordPress 7.0 ships the "modern" admin redesign, which enlarges native form controls (40px vs 30/32px), reduces corner radius (2px vs 3/4px), recolours secondary buttons (transparent + modern-blue
#3858E9) and changes link/icon metrics. Our admin UI was designed against the classic WP-6.9 control metrics + brand accent (#2271b1), so the redesign misaligned spacing, colours and icons across the Code Snippets screens.This adds a small WP-admin compatibility layer that restores the classic control metrics on our admin pages only, plus targeted fixes for bespoke controls. Verified against three environments — local WP 7.0, local WP 6.9, and the remote WP 6.9 reference — with the remote as source of truth.
What's included
common/_wp-admin.scsscompatibility layer (generic inputs/selects/buttons), imported into each admin bundle and ordered so it sits above WP core defaults but below the plugin's own per-control rules..subsubsub) and active-name colours.truncate-row-valuesclass now reaches the list<table>(aListTableprop-forwarding regression — the screen option did nothing on any WP version).Scoping / safety
menu,admin-bar) contain only CS-prefixed selectors. Verified other plugins (ACF, WPForms) + core screens keep their native WP 7.0 appearance.Verification
Computed-style + visual checks across edit-snippet, snippets list, settings, import and community-cloud on WP 6.9 / 7.0 / remote. No regression on WP 6.9.
src/dist/is CI-built (not committed).