Skip to content

Feat/UI admin menus#215

Merged
omaraelhawary merged 20 commits into
feat/admin-menusfrom
feat/ui-admin-menus
May 5, 2026
Merged

Feat/UI admin menus#215
omaraelhawary merged 20 commits into
feat/admin-menusfrom
feat/ui-admin-menus

Conversation

@omaraelhawary
Copy link
Copy Markdown
Collaborator

Related #210 and I will merge the two branches

…management features, and responsive design adjustments
…yles for better consistency and responsiveness
…consistent width for sortable helpers and improve submenu order token handling
@omaraelhawary omaraelhawary self-assigned this Apr 30, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a major redesign of the Admin Menus add-on, featuring a new popover-based item editor and a horizontal scroll layout for role columns. It enhances menu redirection logic, implements admin bar pruning based on user capabilities, and establishes a unit testing suite. Feedback suggests correcting a potential regression in the JSON decoding logic that incorrectly errors on pre-decoded arrays and recommends using more conventional naming for dynamic WordPress filters.

Comment thread addons/members-admin-menus/app/functions-admin.php Outdated
Comment thread addons/members-admin-menus/app/functions.php
@omaraelhawary
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly updates the Admin Menus add-on, featuring a UI overhaul that replaces the carousel with horizontal scrolling, introduces popover dialogs for menu editing, and adds a modal for custom menu items. Technical improvements include optimized settings storage via non-autoloaded options and enhanced admin bar filtering based on user permissions. A critical issue was identified in the custom menu redirect function, where a strict regex check for absolute URLs prevents the use of relative paths, potentially breaking existing configurations.

Comment thread addons/members-admin-menus/app/functions.php Outdated
@omaraelhawary
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements a major overhaul of the Admin Menus add-on, introducing a modernized UI with popover-based editing and improved role column navigation. Key technical enhancements include more accurate capability resolution, deep copying of menu snapshots to ensure data integrity, and optimized settings storage by disabling autoload for large options. The code review identifies several opportunities for refinement, specifically recommending the removal of redundant logic in JSON decoding and user ID processing, as well as the use of named constants instead of hardcoded hex colors to improve maintainability.

Comment thread addons/members-admin-menus/app/functions-admin.php Outdated
Comment thread addons/members-admin-menus/app/functions.php Outdated
Comment thread addons/members-admin-menus/app/functions.php Outdated
Comment thread addons/members-admin-menus/app/functions.php Outdated
@omaraelhawary
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces significant enhancements to the Admin Menus add-on, including a redesigned UI for editing menus, improved role-based capability resolution, and better handling of custom menu items. The review feedback highlights a potential open redirect vulnerability in the custom URL redirection logic, suggests strengthening the menu snapshot initialization for robustness, and recommends adding validation for user ID parsing in the JavaScript logic.

Comment thread addons/members-admin-menus/app/functions.php
Comment thread addons/members-admin-menus/app/functions-admin.php
Comment thread js/admin-menus.js
@omaraelhawary omaraelhawary merged commit 503ae89 into feat/admin-menus May 5, 2026
@omaraelhawary omaraelhawary deleted the feat/ui-admin-menus branch May 5, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant