-
Notifications
You must be signed in to change notification settings - Fork 216
Hide empty Dokan Dashboard submenu in Dokan admin menu. #2835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds a nested LESS rule to hide empty anchor tags within the Dokan admin submenu under the WordPress admin menu. No other selectors or logic are altered. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
assets/src/less/global-admin.less (1)
321-329: Hide the entire list item for robustness (use :has).Hiding only the anchor works in most cases, but hiding the parent
avoids any residual spacing/hover gaps and matches the file’s existing usage of :has. Apply this diff:
-#adminmenu { - #toplevel_page_dokan { - .wp-submenu { - a:empty { - display: none; - } - } - } -} +#adminmenu { + #toplevel_page_dokan { + .wp-submenu { + // Hide empty submenu entries in Dokan Dashboard (see getdokan/dokan-pro#4578) + li:has(> a:empty) { + display: none; + } + } + } +}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
assets/src/less/global-admin.less(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: e2e tests (2, 3)
- GitHub Check: e2e tests (1, 3)
- GitHub Check: e2e tests (3, 3)
- GitHub Check: api tests (1, 1)
🔇 Additional comments (2)
assets/src/less/global-admin.less (2)
321-329: Change aligns with the objective; scoped and low risk.This cleanly hides empty submenu anchors under Dokan’s admin menu without affecting other menus. Meets the PR’s intent.
324-326: Verify anchors are truly empty; whitespace or child spans will bypass :empty.If the submenu anchors include whitespace text nodes or decorative spans, a:empty will not match. Confirm the generated markup is strictly empty for these entries; otherwise we should address the markup or broaden the selector.
Would you confirm via browser devtools that the affected submenu anchors contain no whitespace or child elements? If not, we can adjust either the PHP that outputs the menu (to emit an empty string) or add a complementary CSS approach.
|
@mrabbani vai, need your kind update here |
All Submissions:
Closes
How to test the changes in this Pull Request:
Changelog entry