Docs: Implement three-level expandable dropdown for Plugins submenu under Scheduler
Please check if the PR fulfills these requirements
- [ ] The commit message follows our guidelines
What kind of change does this PR introduce?
Documentation structure enhancement and theme template modification
What this PR does / why we need it:
This PR refactors the Plugins documentation structure to implement a three-level expandable navigation menu, addressing the limitation of Hugo v0.57.2 which doesn't natively support nested submenus.
Changes Made:
-
Split unified plugins documentation into individual pages:
- Created 11 separate plugin documentation files (gang.md, binpack.md, priority.md, drf.md, proportion.md, task-topology.md, predicates.md, nodeorder.md, sla.md, tdm.md, numa-aware.md)
- Created plugins-overview.md as the parent page listing all available plugins
-
Implemented three-level menu hierarchy:
Scheduler (expandable)
├── Overview
├── Actions
├── Plugins (expandable dropdown)
│ ├── Gang
│ ├── Binpack
│ ├── Priority
│ ├── DRF
│ ├── Proportion
│ ├── Task-topology
│ ├── Predicates
│ ├── Nodeorder
│ ├── SLA
│ ├── TDM
│ └── Numa-aware
└── Scenario & Configuration
-
Modified theme template (docs_sidebar.html):
- Added detection for second-level items with children (
.HasChildrencheck) - Implemented
toggleSubmenu()JavaScript function for Plugins dropdown - Added visual hierarchy with proper indentation (15px for second-level, 30px for third-level)
- Maintained existing
toggleMenu()function for top-level menu items - Added auto-expand functionality to open parent menus when viewing child pages
- Added detection for second-level items with children (
-
Menu configuration:
- plugins-overview.md:
parent: "scheduler",identifier: "plugins" - Individual plugin files:
parent: "plugins"
- plugins-overview.md:
Technical Implementation:
Since Hugo v0.57.2 doesn't natively support three-level menu nesting, custom template logic was required to:
- Detect children at the second level
- Render nested
<ul>elements with proper IDs - Add clickable dropdown arrows next to expandable items
- Toggle visibility via JavaScript with proper state management
- Preserve the existing styling and behavior of top-level menus
Which issue(s) this PR fixes:
Fixes #425 Optimizes #428 accurately.
Verified:
- ✅ Hugo v0.57.2 builds successfully without errors
- ✅ All 11 individual plugin pages are accessible
- ✅ Plugins item displays dropdown arrow and is expandable
- ✅ Clicking Plugins expands/collapses the plugin list
- ✅ Visual hierarchy clearly shows proper parent-child relationships
- ✅ Auto-expand works when viewing individual plugin pages
- ✅ All navigation links function correctly
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign kevin-wangzefeng for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Summary of Changes
Hello @codeEvolveZenith345, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request significantly enhances the documentation structure for the Scheduler's plugins by introducing a more organized and navigable three-level menu system. This change improves user experience by providing dedicated pages for each plugin and a clear hierarchical navigation, overcoming the default limitations of the Hugo static site generator for deeply nested menus.
Highlights
- Documentation Restructuring: The monolithic 'Plugins' documentation has been broken down into 11 individual pages, each dedicated to a specific scheduler plugin, plus a new 'plugins-overview.md' page to serve as the parent.
- Three-Level Navigation Menu: A new three-level expandable navigation menu has been implemented for the 'Plugins' submenu under 'Scheduler', addressing Hugo's native nesting limitations for deeper hierarchies.
- Custom Sidebar Logic: The 'docs_sidebar.html' theme template was modified with custom JavaScript functions ('toggleMenu', 'toggleSubmenu') to handle the expanded menu hierarchy, including visual indentation and auto-expansion for active pages.
- Menu Configuration: New 'parent' and 'identifier' front matter fields were added to the plugin documentation files to correctly integrate them into the new menu structure.
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.
Hi @JesseStutler Apologies to ping you, but I would like to request you for a review, since it's been a week, Please review this as it is a follow up for #428
Hi @JesseStutler Apologies to ping you, but I would like to request you for a review, since it's been a week, Please review this as it is a follow up for #428
/cc @JesseStutler Please review!
Adding label do-not-merge/contains-merge-commits because PR contains merge commits, which are not allowed in this repository.
Use git rebase to reapply your commits on top of the target branch. Detailed instructions for doing so can be found here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.