Repository navigation
Preserved mobile menu close icon with Wave classes - #4706
Conversation
There was a problem hiding this comment.
🟡 Changes requested
The close button picks menu icons in registration order, not layout order, so it can show a different icon than the toggle that opened the sidebar.
Validation details
- Files reviewed: 3/3 changed files.
- The three new PHPUnit tests pass at HEAD with PHP 8.3 and the WordPress test library:
rm /var/www/html/wp-content/themes/repo; ln -s /repo /var/www/html/wp-content/repo; cd /repo; set -o pipefail; timeout 2…printedOK (3 tests, 41 assertions)(run R12) - Against the base code, all three tests fail on the close-button markup. This base-tree helper run has no run record.
- A copy of the tests with a reversed mobile layout rendered a Wave close button instead of Dots:
cd /workspace/checks/R4 && mv test-order.php TestNeveHfgMenuIconOrder.php && cd /repo && set -o pipefail; timeout 300 ph…(run R14, exit 0) - The Neve Pro menu icon registration was read from
Codeinwp/neve-pro-addonat commit3f9930c. - The
neve_menu_icon_classescallback accepts and uses the new second argument.
Untested areas
- The close button is shared by the desktop and mobile toggles. Please confirm which toggle it should mirror when each device uses a different menu icon.
- The real browser rendering of the close glyph was not checked.
🤖 Automated review · run code-review-agent_6afee40f41d115.41543533.
🤖 Review agent — review posted ✅ on b5b73c44 · changes requested · 1 finding · 27 min
Run code-review-agent_6afee40f41d115.41543533 · trail
There was a problem hiding this comment.
🟢 Approved
The PR passes: the earlier layout-order finding is conceded, and the close button always gets CSS for the icon it shows.
Validation details
- Files reviewed: 3/3 changed files. The only commit since the last review changes the
get_close_button_icon()docblock, and the new text matches the loop. - A source check this run showed that an active menu icon enqueues its glyph CSS on the frontend. Its
.hamburger--<icon>selectors reach the close button. - The three new PHPUnit tests passed at
b5b73c4with PHP 8.3 in run code-review-agent_6afee40f41d115.41543533 (R12, not rerun).
Untested areas
- The variant pass was not rerun because the new commit changes only a docblock.
- The real browser rendering of the close glyph was not checked.
🤖 Automated review · run code-review-agent_6afeed427d50b3.56321001.
🤖 Review agent — review posted ✅ on 07b53187 · approved · 0 findings · 11 min
Run code-review-agent_6afeed427d50b3.56321001 · trail
There was a problem hiding this comment.
🟡 Changes requested
The close button must follow the header's render order, but the new lookup follows the saved layout order instead.
Validation details
- Files reviewed: 3/3 changed files. The review focused on commit 747be82, the only commit since the last review.
- The close-button test file passed at 747be82 with PHP 8.3 and PHPUnit 9.6.
cd /repo; set -o pipefail; timeout 280 phpunit --do-not-cache-result --filter 'TestNeveHfgMenuIconCloseButton::' 2>&1 | …(run R2, exit 0) - Each new test failed on an assertion against pr-base or 07b5318 source. These A/B runs have logs but no run records.
- A source check found that every shipped header preset and the migration save rows and slots in render order.
- The variant pass found no other place where an unused menu icon picks rendered classes.
Untested areas
- The real browser rendering of the close glyph was not checked.
- Neve Pro's own menu icon class is outside this checkout.
🤖 Automated review · run code-review-agent_6affd27badd610.02325027.
🤖 Review agent — review posted ✅ on 747be82c · changes requested · 1 finding · 25 min
Run code-review-agent_6affd27badd610.02325027 · trail
There was a problem hiding this comment.
🟢 Approved
The PR passes: the close button now follows the header's render order, and the earlier finding is fixed.
Validation details
- Files reviewed: 4/4 changed files. Two history questions stayed unchecked: "Warning printed in PHP8.0/8.1 from header builder" and "Blue rectangle surrounding the first menu item on Iphone".
- The close-button tests pass at HEAD with PHP 8.3 and PHPUnit 9.6.
cd /repo; set -o pipefail; timeout 280 phpunit --do-not-cache-result --filter 'TestNeveHfgMenuIconCloseButton::' 2>&1 | …printedOK (8 tests, 130 assertions)(run R3) - PHPStan 2.1.22 with the repository configuration reports no error on the two changed classes.
cd /workspace/checks/C7/head; set -o pipefail; timeout 280 vendor/bin/phpstan analyse --memory-limit=2G --configuration=…(run R8, exit 0) - A source trace found that rows, slots and legacy items follow the renderer's order.
Untested areas
- The new tests ran against 747be82 and pr-base without run records.
- "Warning printed in PHP8.0/8.1 from header builder": a hand-made legacy item that is not an array now stops the sort. No builder code saves one.
- "Blue rectangle surrounding the first menu item on Iphone": not checked again at HEAD.
- Neve Pro's menu icon source is not public.
- The close glyph was not checked in a browser.
- The variant pass did not settle these places, where the fixed cause may still reach:
header-footer-grid/Core/Components/MenuIcon.php:720-744— unverified: Every active instance’s appearance rules target the shared close button, irrespective of the selected close-icon owner. Whether an additional Pro instance inherits this implementat…
🤖 Automated review · run code-review-agent_6affde21173b23.76154576.
🤖 Review agent — review posted ✅ on 42d89a43 · approved · 0 findings · 33 min
Run code-review-agent_6affde21173b23.76154576 · trail
|
@girishpanchal30 — heads-up: this PR left Symptom: Cause: the new Why it needs a decision, not just a patch: the two tests this PR added encode opposite contracts for
Options:
Since you added both the function-color path and these tests, you'll know whether the function-color path was meant to also cover |
Summary
Improved mobile sidebar close button icon selection to mirror the first menu icon actually rendered in the header layout, preventing unused or inactive menu icons from affecting its appearance. Added comprehensive unit tests to verify icon selection across different header configurations.
Check before Pull Request is ready:
Closes #4704