Skip to content

Conversation

@0xlukem
Copy link
Contributor

@0xlukem 0xlukem commented Oct 27, 2025

This PR adds a new active style for the TOC and fixes some spacing issues on the left side navigation.
Before:
image
After:
image

The issue was caused because mkdocs resolved that the section block explorer was a nested one (like the one above) and added a div, which caused the extra blank space. So, I added logic to check if there is real nested content or not.

Copilot AI review requested due to automatic review settings October 27, 2025 22:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the left side navigation styling by adding an active state style for Table of Contents (TOC) items and fixing unwanted spacing issues caused by empty nested navigation structures.

Key changes:

  • Adds visual styling for active TOC links with background color and border radius
  • Implements logic to conditionally render navigation containers only when they contain visible children
  • Refactors the template to pre-filter visible children instead of filtering during iteration

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
material-overrides/partials/nav-item.html Added logic to check for visible children before rendering navigation containers, preventing empty divs that cause spacing issues
material-overrides/assets/stylesheets/polkadot.css Added active state styling for TOC links with background color and border radius across different screen sizes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@0xlukem 0xlukem requested a review from eshaben November 5, 2025 15:56
@eshaben
Copy link
Collaborator

eshaben commented Nov 7, 2025

@0xlukem please tag me here or DM me in slack when this is ready for me. Thanks!

@0xlukem 0xlukem requested a review from eshaben November 11, 2025 13:18
Copy link
Collaborator

@eshaben eshaben left a comment

Choose a reason for hiding this comment

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

Thanks!

@eshaben eshaben merged commit f8ee070 into main Nov 11, 2025
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.

3 participants